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

mrtrc266

#3400
@ htgr2001

For the the edit you couldn't find do this

Find
            // Only tell them about their messages if they can read their messages!
            if ($context['allow_pm'])
                echo '<li>' ,$txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'],'</li>';


Add After
             // Show # of Users in Chat below PM
         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>';


For your Chat Button use this


    // 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;"', '><span>', $txt['chat'], ($num > 0) ?  ('('.$num.')') : '' , '</span></a></li>';



Regarding the Chat Button dissapearing when chaging languages, in your Themes/default/languages make the same edits for that you did to your Modifications.english.php file to your Modifications.english-utf8.php file as well if you have you forum set to UTF-8



mrtrc266

Quote from: Baloch on August 07, 2009, 09:56:05 AM
My members are unable to log into chat room. while as an admin I am able to login.
www.baask.com/diwwan/chat

Plz advice what to do?

Thanks in advance for your prompt response.

Regards
Raji

Be sure to set the permission in your Forum Admin

mrtrc266

Quote from: bound2bmine on August 07, 2009, 06:48:36 AM
OK I have looked all over this topic for an answer to this. Why do post in shout box sometimes disappear.

Thanks in advance if someone can help me out.

You mean it disappears before you eyes or you come back after awhile and it's gone?

You can set how many lines you want to appear and for how long you want them to stay for in your /chat/lib/config.php file

mrtrc266

Quote from: htgr2001 on August 07, 2009, 04:18:02 AM
Thanks, dont know php at all but the thread had all i needed  ;)

..............


Ok i still have an issue I need help with; I can only login to the chat using the admin account.  I get the following message with the other account: "You can't access the chat."

Checked the configuration file and I found the permission code which seems to be correct:


// If enabled, the chat will only be accessible for the admin:
$config['chatClosed'] = false;


All other settings on the config file are default, anything else i am missing?

You will also need to set the permissions for your Membergroups in your forums Admin Panel

bound2bmine

Quote from: mrtrc266 on August 07, 2009, 10:40:01 AM
Quote from: bound2bmine on August 07, 2009, 06:48:36 AM
OK I have looked all over this topic for an answer to this. Why do post in shout box sometimes disappear.

Thanks in advance if someone can help me out.



You mean it disappears before you eyes or you come back after awhile and it's gone?

You can set how many lines you want to appear and for how long you want them to stay for in your /chat/lib/config.php file

No they disappear after a while. I see where you adjust how many lines to show but not duration.

Mu3rt3

#3405
What would be best way to remove sounds from shoutbox?

Also thank you for awesome mod.  :D

Baloch

Quote from: mrtrc266 on August 07, 2009, 10:18:08 AM
Quote from: Baloch on August 07, 2009, 09:56:05 AM
My members are unable to log into chat room. while as an admin I am able to login.
www.baask.com/diwwan/chat

Plz advice what to do?

Thanks in advance for your prompt response.

Regards
Raji

Be sure to set the permission in your Forum Admin
Thanks

htgr2001

@ mrtrc266 thanks for your reply and help, most seems to be working fine now but one thing.


Quote from: mrtrc266 on August 07, 2009, 10:13:37 AM
Regarding the Chat Button dissapearing when chaging languages, in your Themes/default/languages make the same edits for that you did to your Modifications.english.php file to your Modifications.english-utf8.php file as well if you have you forum set to UTF-8

I dont have the Modifications.english-utf8.php file but i do have the following files in the same folder:

Modifications.english.php~
Modifications.portuguese_pt.php (portuguese is the installed custom language)

Should i apply the code changes done for Modifications.english.php to any of these? if yes i also had to change the Help.english.php file, should i replicate those changes to any of these files:

Help.english.php~
Help.portuguese_pt.php


Thanks for your help


philcross


OK - here is the solution for anyone who has Chat installed BUT cannot post anything when it opens - they just have a (mostly) blank page and the rooms etc are missing.

You need to download your .htaccess file from your forum directory (filezilla is a great free utility http://filezilla-project.org )

Edit the .htaccess file and add the following line in the actions area

RewriteRule ^chat/?$ ./chat/index.php [L,QSA]

Upload the .htaccess back to the forum directory.

Refresh your forum and then you can click Chat button and it all works OK.




nicole_2008

Hey i am trying to uninstall this mod but i keep getting this error.


An Error Has Occurred!
This package cannot be uninstalled, because there is no uninstaller!

Please contact the mod author for more information. 


Is there a way to uninstall and delete this, any help appreciated.

I have the latest version installed if that helps.

planethax

There is no automatic uninstall.

You would need to remove the changes manually.

Quote from: nicole_2008 on August 07, 2009, 06:09:54 PM
Hey i am trying to uninstall this mod but i keep getting this error.


An Error Has Occurred!
This package cannot be uninstalled, because there is no uninstaller!

Please contact the mod author for more information. 


Is there a way to uninstall and delete this, any help appreciated.

I have the latest version installed if that helps.

Swayforth

Quote from: TheListener on August 06, 2009, 09:37:30 PM
I use the same theme as you.

What does the actual error say?

Your site looks awesome! and thanks for the reply.

I have tried so many different ways to appling the code but still can not get it to work. So i have come to the conclusion that i will be happy if i could just get one of the 2 edits in the index.template.php file done then i would call it a done deal. :)

error 1 (index1.template.php)...file attached


Parse error: syntax error, unexpected T_ELSE in <EDIT BY ME>/forums/Themes/BlackRain_v/index.template.php on line 628

619: // the [chat] button
620: $chatPath = str_replace("index.php", "chat/index.php", $scripturl);
621: $num = (empty($modSettings['enableChatButtonNo'])) ? 0 : count(chatOnlineUsers());
622: echo $context['browser']['is_ie4'] ? '<td class="maintab_active_' . $first . '"> </td>' : '', '
623: <td valign="top" class="maintab_back">
624: <a href="', $chatPath, '"', empty($modSettings['chatPopUp']) ? 'target="_blank"' : ' onclick="openWindow(this.href);this.blur();return false;"', '>', $txt['chat'], ($num > 0) ?  ('('.$num.')') : '' , '</a>
625: </td>';
626:
627: // Otherwise, they might want to [logout]...

628: else

629: echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><span>', $txt[108], '</span></a></li>';
630:   echo '</ul></div>';
631: }
632:


if i move the edits on the end of "// Otherwise, they might want to [logout]..." code then i do not get an error. But i do end up with a chat button below the main menu with a text"chat" button however it does not show how many users are in the chat.

Did you get the button to work for you?

Sure would love to get some help on this great mod. everything else works great!

thanks

TheListener

The button was no problem for me  :)

it is usually a theme related problem.

Swayforth

i agree i just don't know php well enough to change the code to match the them :(

mrtrc266

Quote from: htgr2001 on August 07, 2009, 01:48:33 PM
@ mrtrc266 thanks for your reply and help, most seems to be working fine now but one thing.


Quote from: mrtrc266 on August 07, 2009, 10:13:37 AM
Regarding the Chat Button dissapearing when chaging languages, in your Themes/default/languages make the same edits for that you did to your Modifications.english.php file to your Modifications.english-utf8.php file as well if you have you forum set to UTF-8

I dont have the Modifications.english-utf8.php file but i do have the following files in the same folder:

Modifications.english.php~
Modifications.portuguese_pt.php (portuguese is the installed custom language)

Should i apply the code changes done for Modifications.english.php to any of these? if yes i also had to change the Help.english.php file, should i replicate those changes to any of these files:

Help.english.php~
Help.portuguese_pt.php


Thanks for your help

That is exactly correct, just add the same edits to you specific language files.

TheListener


mrtrc266

Quote from: Swayforth on August 08, 2009, 01:30:13 AM
i agree i just don't know php well enough to change the code to match the them :(

I messed with you index.template but it looks like it heavily Modded.

Create a test account on your forum and PM me the details, I'll take a look in the morning

mrtrc266

Quote from: TheListener on August 08, 2009, 01:49:10 AM
Hiya stranger hows the new pc?

I'm lovin the new laptopm :D Still transfering all data tryin to get everything back in order LOL

TheListener

Quote from: mrtrc266 on August 08, 2009, 01:56:30 AM
Quote from: Swayforth on August 08, 2009, 01:30:13 AM
i agree i just don't know php well enough to change the code to match the them :(

I messed with you index.template but it looks like it heavily Modded.

Create a test account on your forum and PM me the details, I'll take a look in the morning

Er It is morning (7am).

In the UK it is anyways.

Swayforth

#3419
Quote from: mrtrc266 on August 08, 2009, 01:56:30 AM
Quote from: Swayforth on August 08, 2009, 01:30:13 AM
i agree i just don't know php well enough to change the code to match the them :(

I messed with you index.template but it looks like it heavily Modded.

Create a test account on your forum and PM me the details, I'll take a look in the morning

pm sent

thank you for taking the time to help me!

Advertisement: