News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

AjaxChat Integration (latest version 3.2.1)

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

Previous topic - Next topic

Stigmartyr

Quote from: mrtrc266 on April 27, 2010, 10:47:16 PM
@ Stigmartyr

Find /Themes/Ps_Black/BoardIndex.template.php
', $txt[140], ':<br />', implode(', ', $context['list_users_online']);
Add after
    // users in chat
    if (isset($context['chat_links'])){
        if (count($context['chat_links']) == 0 )
          echo '<br />' . $txt['chat_no_user'];
        elseif (count($context['chat_links']) == 1 )
          echo '<br />  1' . $txt['chat_aUser']. ':<br />', implode($context['chat_links']);
        else
          echo '<br /> ' . count($context['chat_links']). $txt['chat_users']. ':<br />', implode(', ', $context['chat_links']);
  }


Find /Themes/Ps_Black/index.template.php
function template_menu()
{
    global $context, $settings, $options, $scripturl, $txt;

Replace with
function template_menu()
{
    global $context, $settings, $options, $scripturl, $txt, $modSettings;


Find
echo '<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br /><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
Replace with
        echo '<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br /><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a>';

            if (!empty($modSettings['enableChatBelowPM'])){
            $count = count(chatOnlineUsers());
            if ($count == 0 )
            echo '<br />' . $txt['chat_no_user'];
            elseif ($count == 1 )
              echo '<br />  1' . $txt['chat_aUser']. '<br />';
            else
              echo '<br /> ' . $count . $txt['chat_users']. '<br />';
        }
        echo '                </span>';

Find
// Otherwise, they might want to [logout]...
Replace with
// the [chat] button
    $chatPath = str_replace("index.php", "chat/index.php", $scripturl);
    $num = (empty($modSettings['enableChatButtonNo'])) ? 0 : count(chatOnlineUsers());
    echo $context['browser']['is_ie4'] ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '', '
        <li><a href="', $chatPath, '"', empty($modSettings['chatPopUp']) ? 'target="_blank"' : ' onclick="openWindow(this.href);this.blur();return false;"', '>', $txt['chat'], ($num > 0) ?  ('('.$num.')') : '' , '</a></li>';
       
    // Otherwise, they might want to [logout]...


Thank you very much for your help.  I made all the changes as you prescribed, but my chat button in the menu still doesn't show the users in chat count, nor does the Who's Online list indicate a user is in chat..

:( I do thank you in advance again for all the great help you provide here.

If you would like to demo the chat feature for yourself, I made a demo account:

User: test
pwd: test
URL: http://realperformancemustangs.com

mrtrc266

Quote from: brion on April 28, 2010, 01:55:28 PM
Quote from: mrtrc266 on April 27, 2010, 10:57:08 PM
Quote from: brion on April 27, 2010, 10:44:17 PM
Here is an image of what I mean, the top links like profile, search, home, etc. Would show number of users in chat.

That should be a default feature for AJAX Integration.

In your Forums Admin Enable online chat users numbering on chat   button?

For SMF 1.1.X Admin/Configuration/Features and Options/
For   SMF 2 RC1  Admin/Configuration/Modifications/Chat/

Ok I found out the button was unchecked, however it didn't fix it. Here is the two coding places for my chatroom button. I added it manually.

<link rel="chatroom" href="/chat/index.php" target="_BLANK" />

if ($context['allow_search'])
    echo '<li', $current_action == 'search' ? ' class="chosen"' : '', '><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';
    echo '<li', $current_action == 'gallery' ? ' class="chosen"' : '', '><a href="', $scripturl, '?action=gallery">Gallery</a></li>';
    echo '<li', $current_action == 'chatroom' ? ' class="chosen"' : '', '><a href="/chat/index.php" target="_BLANK">Chatroom</a></li>';
    echo '<li', $current_action == 'game' ? ' class="chosen"' : '', '><a href="game.php">Game</a></li>';


You're missing the code that allows you to show the # of user in chat on the chat button in your index.template.php file.
Find
echo '<li', $current_action == 'chatroom' ? ' class="chosen"' : '', '><a href="/chat/index.php" target="_BLANK">Chatroom</a></li>';
Replace with

   // the [chat] button
   $chatPath = str_replace("index.php", "chat/index.php", $scripturl);
   $num = (empty($modSettings['enableChatButtonNo'])) ? 0 : count(chatOnlineUsers());
   echo $context['browser']['is_ie4'] ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '', '
      <li class="chosen">
         <a href="', $chatPath, '"', empty($modSettings['chatPopUp']) ? 'target="_blank"' : ' onclick="openWindow(this.href);this.blur();return false;"', '>', $txt['chat'], ($num > 0) ?  ('('.$num.')') : '' , '</a>
      </li>';


Attach your index.template.php file if that doesn't work.

mrtrc266

@ Stigmartyr

Your BoardIndex.php is installed correctly (users in chat is working fine on the bottom of your forum)

Attach your index.template.php file here please.

Stigmartyr

Quote from: mrtrc266 on April 29, 2010, 01:12:11 AM
@ Stigmartyr

Your BoardIndex.php is installed correctly (users in chat is working fine on the bottom of your forum)

Attach your index.template.php file here please.

O?  I guess I was looking in the wrong place.  I was looking at index.php?action=who and also there is a Users Online block (its that DashBoard block), if you click the servers tab where it shows recent posts.  Attached Ps_Blank/index.template.php file as requested.


mrtrc266

#6044
Quote from: Stigmartyr on April 29, 2010, 01:19:54 AM
Quote from: mrtrc266 on April 29, 2010, 01:12:11 AM
@ Stigmartyr

Your BoardIndex.php is installed correctly (users in chat is working fine on the bottom of your forum)

Attach your index.template.php file here please.

O?  I guess I was looking in the wrong place.  I was looking at index.php?action=who and also there is a Users Online block (its that DashBoard block), if you click the servers tab where it shows recent posts.  Attached Ps_Blank/index.template.php file as requested.


LOL I hope it's as simple as this, attached is a screen shot of the file you just attached (unedited) on my test site that seems to be working fine.

Did you enable these setting in your Admin? ;)

       
  • Please be sure   to check the following settings in the Admin Panel.
  • For SMF 1.1.X Admin/Configuration/Features and Options/
Enable the ShoutBox?
Check for ShoutBox on any page or uncheck for only in index page:
Integrate shout box and chat room?
Chat in popup page?
Enable online chat users numbering on chat button?
Show online users below total logged in time section?

mrtrc266

Quote from: OZZIE on April 28, 2010, 08:38:47 PM
im open to suggestions....

ive tried just about everything in this thread chmod'ing/new htaccess files manual upload etc etc and for the life of me all i keep geting in the shout is   ChatBot: Error: Connection status: 404...im at my wits end and about to give up anyone got any thing else i can try????

Is it just the shoutbox or both that chat and the shout?

mrtrc266

Very nice hcfwesker and thank you very much.

I will the link to the FAQ's ASAP.

Stigmartyr

Quote from: mrtrc266 on April 29, 2010, 01:36:00 AM
Quote from: Stigmartyr on April 29, 2010, 01:19:54 AM
Quote from: mrtrc266 on April 29, 2010, 01:12:11 AM
@ Stigmartyr

Your BoardIndex.php is installed correctly (users in chat is working fine on the bottom of your forum)

Attach your index.template.php file here please.

O?  I guess I was looking in the wrong place.  I was looking at index.php?action=who and also there is a Users Online block (its that DashBoard block), if you click the servers tab where it shows recent posts.  Attached Ps_Blank/index.template.php file as requested.


LOL I hope it's as simple as this, attached is a screen shot of the file you just attached (unedited) on my test site that seems to be working fine.

Did you enable these setting in your Admin? ;)

       
  • Please be sure   to check the following settings in the Admin Panel.
  • For SMF 1.1.X Admin/Configuration/Features and Options/
Enable the ShoutBox?
Check for ShoutBox on any page or uncheck for only in index page:
Integrate shout box and chat room?
Chat in popup page?
Enable online chat users numbering on chat button?
Show online users below total logged in time section?

You are the man.  You have my permission to slap me with a large trout.  I totally forgot to set the features options.  I checked perms.  I think I need a vacation :P

mrtrc266

LOL, glad you got it sorted Stig. Happens to the best of us ;D

Stigmartyr

Quote from: mrtrc266 on April 29, 2010, 02:19:14 AM
LOL, glad you got it sorted Stig. Happens to the best of us ;D

Ive gotten soft on SMF 2.  The layout is so much better for admins.

ProfDrDenis

my user want to invite from the chat other forum user with pm  :( for example:

in the chat they write (for example)  /invitepm USERNAME and than a mail goes with a simple text to the forum user with pm. Is this going? and who can help?

Ozzie

Quote from: mrtrc266 on April 29, 2010, 01:40:36 AM
Quote from: OZZIE on April 28, 2010, 08:38:47 PM
im open to suggestions....

ive tried just about everything in this thread chmod'ing/new htaccess files manual upload etc etc and for the life of me all i keep geting in the shout is   ChatBot: Error: Connection status: 404...im at my wits end and about to give up anyone got any thing else i can try????

Is it just the shoutbox or both that chat and the shout?

-------------------------


i get the same error on both mrtrc266

2000+ games available to download

mrtrc266

Quote from: OZZIE on April 29, 2010, 05:06:49 AM
Quote from: mrtrc266 on April 29, 2010, 01:40:36 AM
Quote from: OZZIE on April 28, 2010, 08:38:47 PM
im open to suggestions....

ive tried just about everything in this thread chmod'ing/new htaccess files manual upload etc etc and for the life of me all i keep geting in the shout is   ChatBot: Error: Connection status: 404...im at my wits end and about to give up anyone got any thing else i can try????

Is it just the shoutbox or both that chat and the shout?

i get the same error on both mrtrc266

What's the link you your site? PM me a temp admin account on your forum and FTP access and I'll take a look when I get a sec if you want.

mrtrc266

Quote from: ProfDrDenis on April 29, 2010, 05:02:47 AM
my user want to invite from the chat other forum user with pm  :( for example:

in the chat they write (for example)  /invitepm USERNAME and than a mail goes with a simple text to the forum user with pm. Is this going? and who can help?

I don't thing that's possible

ProfDrDenis

Quote from: mrtrc266 on April 29, 2010, 10:11:42 AM
Quote from: ProfDrDenis on April 29, 2010, 05:02:47 AM
my user want to invite from the chat other forum user with pm  :( for example:

in the chat they write (for example)  /invitepm USERNAME and than a mail goes with a simple text to the forum user with pm. Is this going? and who can help?

I don't thing that's possible

why not? You think its a big deal?

Arantor

Possible, sure. Anything's *possible*. It's about whether it's worth the effort of doing it, since sending a PM - as I learned earlier today when adding such a facility into a new area in SimpleDesk - is significantly more complex than it sounds like it should be.

mrtrc266

Quote from: ProfDrDenis on April 29, 2010, 10:23:10 AM
Quote from: mrtrc266 on April 29, 2010, 10:11:42 AM
Quote from: ProfDrDenis on April 29, 2010, 05:02:47 AM
my user want to invite from the chat other forum user with pm  :( for example:

in the chat they write (for example)  /invitepm USERNAME and than a mail goes with a simple text to the forum user with pm. Is this going? and who can help?

I don't thing that's possible

why not? You think its a big deal?

That would probably be a question for the developers of AJAX Chat. They would have a better idea on how to do it if it can be done.
http://sourceforge.net/projects/ajax-chat/support

rajeshn

Hi,
Thanks for the Chat integration. Is it possible to place the chat below all the categories?

Thanks
Rajesh

Abavagada

I managed to set up a button on each forum to open the chat to the proper channel automatically.

I have a question now which (I hope) is easier to answer.
According to the sourceforge page on setting custom moderators:
http://sourceforge.net/apps/mediawiki/ajax-chat/index.php?title=Custom_moderators_and_admins
the forum admins become chat admins, and forum moderators become chat moderators in the forum integration versions of the chat.

However, when a forum moderator becomes a chat moderator, they can moderate ALL channels. I'm wondering if there is a way to restrict them being moderators to just the forums they moderate.

Thanks

PDW

an idea for a "mod" for this chat that would make it even more awesome,
have a "nudge" function.. it would liek like this.
*say i wanted to talk to someone but there not lookin at the chat, just lookin at the posts and abut to go offline after
*I could type /nudge /personsname/
*a popup would display telling them they have been nudged

OR something like that. would it be possible?

Advertisement: