AjaxChat Integration (latest version 3.2.1)

Started by .HuNTeR., August 27, 2008, 12:59:06 AM

Previous topic - Next topic

mrtrc266

Quote from: psyxeon on May 09, 2010, 06:05:49 PM
The same  ;)

In the pic it looks like the padding on the left and right are ok now?

I think we might be conflicting with <div id="shoutbox_wrapper"> in your index.template and the <div id="sb"> in the Shout.template.php

Get rid of this in your index.css
#shoutbox_wrapper
{
   padding: 1em;
   /*margin: 0 10px;*/
}


In your index.template.php
Find
        // Relocate shoutbox using this code by omg_noob
       
        echo '<br class="clear">
            <div id="shoutbox_wrapper">';
        template_shout_above();
        echo '</div>';
       
    //Below the menu ads
    if (function_exists("show_indexAds"))
    {
        $ads = show_indexAds();   
        if(!empty($ads))
            if($ads['type']==0)
                echo $ads['content'];
            else
                eval($ads['content']);
        unset($ads);
    }   
       


    echo '
            <br class="clear" />';

        // Show the navigation tree.

Replace with
      // Relocate shoutbox using this code by omg_noob
     
      echo '<br class="clear">';

      template_shout_above();
       
    //Below the menu ads
    if (function_exists("show_indexAds"))
    {
        $ads = show_indexAds();   
        if(!empty($ads))
            if($ads['type']==0)
                echo $ads['content'];
            else
                eval($ads['content']);
        unset($ads);
    }   

        // Show the navigation tree.


The you can add some top and bottom padding in the chat/css/shoutbox.css
#sb {
    padding-left:9px;
    padding-right:9px;
    padding-bottom ?px;
    padding-bottom ?px;
}


Hopefully that does it

psyxeon

Thx for you help.

It does work like a charm but the spacing is there.



Not a big deal. "just weird"

mrtrc266

Attach your index.template 1 more time with what you have there please.

mrtrc266

#6163
Custom Member Groups & Colors in Chat Room and Shout Box (So far this will add one (1) Custom member Group)

A couple minor tweaks from AJAX Chat Wiki's tut for phpBB3

Take note of what's edited below to add more Member Groups, this will get you started. You can change all instances of "VIP' to what you like and also take note of the colors used in this tutorial, change the color code to the color code of the Member Group you're adding.

Find /chat/lib/config.php
// Define AJAX Chat user roles:
Replace with
// Define AJAX Chat user roles:
if(!defined('AJAX_CHAT_VIP'))
    define('AJAX_CHAT_VIP',         5);


Find /chat/lib/class/CustomAJAXChat.php
      // Check if we have a valid registered user:
      if($userData['chat_access']) {
         if ($context['user']['is_guest'])
            return $this->getGuestUser($userData);
         else{   
            $userData['userID'] = $context['user']['id'];
               
            $userData['userName'] = $this->trimUserName($context['user']['name']);
     
            if($context['user']['is_admin'])
               $userData['userRole'] = AJAX_CHAT_ADMIN;
            elseif(allowedTo('chat_mod'))
               $userData['userRole'] = AJAX_CHAT_MODERATOR;
            else
               $userData['userRole'] = AJAX_CHAT_USER;

         return $userData;
         }
      }else
         return null;   

Replace with (Thank you Yağız... for your help.)
      // Check if we have a valid registered user:
      if($userData['chat_access']) {
         if ($context['user']['is_guest'])
            return $this->getGuestUser($userData);
         else{   
            $userData['userID'] = $context['user']['id'];
               
            $userData['userName'] = $this->trimUserName($context['user']['name']);
     
            if($context['user']['is_admin'])
               $userData['userRole'] = AJAX_CHAT_ADMIN;
            elseif(allowedTo('chat_mod'))
               $userData['userRole'] = AJAX_CHAT_MODERATOR;
            else
            {
               // Check if we have a member of our custom user group
               if(in_array(9, $user_info['groups']))
                  $userData['userRole'] = AJAX_CHAT_VIP;
               else
                  $userData['userRole'] = AJAX_CHAT_USER;
            }

         return $userData;
         }
      }else
         return null;


Find /chat/lib/class/AJAXChat.php
($this->getUserRole() == AJAX_CHAT_MODERATOR || $this->getUserRole() == AJAX_CHAT_USER))
Replace with
($this->getUserRole() == AJAX_CHAT_MODERATOR || $this->getUserRole() == AJAX_CHAT_VIP || $this->getUserRole() == AJAX_CHAT_USER))
Find
if($userData['userRole'] == AJAX_CHAT_USER || $userData['userRole'] == AJAX_CHAT_MODERATOR || $userData['userRole'] == AJAX_CHAT_ADMIN) {
Replace with
if($userData['userRole'] == AJAX_CHAT_USER || $this->getUserRole() == AJAX_CHAT_VIP || $userData['userRole'] == AJAX_CHAT_MODERATOR || $userData['userRole'] == AJAX_CHAT_ADMIN) {
Find
} else if($this->getUserRole() == AJAX_CHAT_USER && $this->getConfig('allowUserMessageDelete')) {
Replace with
} else if(($this->getUserRole() == AJAX_CHAT_USER || $this->getUserRole() == AJAX_CHAT_VIP) && $this->getConfig('allowUserMessageDelete')) {

Find /chat/js/chat.js
if(this.userRole == 1 || this.userRole == 2 || this.userRole == 3) {
Replace with
if(this.userRole == 1 || this.userRole == 2 || this.userRole == 3 || this.userRole == 5) {
Find
if((((this.userRole == 1 && this.allowUserMessageDelete && (userID == this.userID ||
Replace with
if(((((this.userRole == 1 || this.userRole == 5) && this.allowUserMessageDelete && (userID == this.userID ||
Find
return 'chatBot';
Add after
            case 5:
                return 'vip';


Find /chat/css/font.css
#content #chatList span.moderator {
Add before
#content #chatList span.vip {
    font-weight:bold;
}


Find /chat/css/[STYLE_NAME].css (Do this for every style you use)
#content .moderator {
Add before
    #content .vip {
        color: #660099;
    }


Find /chat/css/print.css
#content .moderator {
        color:#00AA00;

Add before
    #content .vip {
        color: #660099;
    }


Find /chat/css/shoutbox.css
#ajaxChatContent #ajaxChatChatList span.moderator {
Add before
#ajaxChatContent #ajaxChatList span.vip {
    font-size: 0.9em;
    font-weight: bold;
}

Find
#ajaxChatContent .moderator {
Add before
#ajaxChatContent .vip {
    color: #660099;
}

TheListener

Hey mrt has it been tested? Can we see it working?


mrtrc266

Quote from: Brack1 on May 09, 2010, 08:50:58 PM
Hey mrt has it been tested? Can we see it working?

Yeah it's been tested and it seems to be working HERE.

The member "test" is in Member Group #9 as in the tutorial and his color in the Member Group is set to  #660099 as in the Tutorial as well.

TheListener

That is great news and  see the post reply notification works too.

*Looks for the edit*

mrtrc266

Quote from: Brack1 on May 09, 2010, 09:19:56 PM
That is great news and  see the post reply notification works too.

*Looks for the edit*

Post Notification

amcb10

I have this mod installed and running but I have a question I cannot find. Is there a command to clear the screen or the logs, as it is, when I log in, I see all the previous text and login notificatiobs etc.

Thanks

psyxeon

Quote from: mrtrc266 on May 09, 2010, 07:51:38 PM
Attach your index.template 1 more time with what you have there please.

I´m using default curve as theme. We just changed some images.

skinmi

Hello,

Please help me to do this. that the chat show message when you register a new member.

Use AjaxChat Inegration 3.2.1 to SMF 2.0 RC1.2


TheListener

Hey mrt I found the usericon edit and have applied it to my forums chat.

The only problem I found was the user name shrank and the icon is above the name and not next to it.

Just an observation.

@Skinmi

It looks to me as tho it may be related to the post notification edit which is available.

mrtrc266

Quote from: psyxeon on May 10, 2010, 07:34:20 AM
Quote from: mrtrc266 on May 09, 2010, 07:51:38 PM
Attach your index.template 1 more time with what you have there please.

I´m using default curve as theme. We just changed some images.

Try this, if it doesn't work create me a temp account to your site, I can't see the shout box only the source code.

mrtrc266

Quote from: skinmi on May 10, 2010, 10:02:37 AM
Hello,

Please help me to do this. that the chat show message when you register a new member.

Use AjaxChat Inegration 3.2.1 to SMF 2.0 RC1.2

That would require the Welcome   Topic Mod and the Post Notification Edit

TheListener




skinmi

This mode makes a new topic when someone registers.
I have not thought of it.
How to show system messages to Shoutbox when registering a new member.
Similar information for the new post or reply.

I have shown in the picture what needs to be seen.

mrtrc266

skinme, you can't just have a message pop into the shout box when someone registers.

Empire of the Sun uses the Welcome Topic Mod which creates a topic when someone registers. Then it uses the Post Notification in insert that Topic into the Shout Box immediately after the user registers.

skinmi

And how do I connect this mode with Shoutbox.

If you can help me please.

I assume that there is a solution, but I'm not a programmer. So please help.

I installed this mod. Now I need to connect with Shoutbox.

Advertisement: