Forums / Cotonti / Development / Chat plugin - need advice

tensh
#23602 2010-03-17 09:09
But of course! Otherwise I would not write it here :)

Added 4 hours later:

Here you go:

ajax_chat_253.zip

Installation:

REQUIRED STEP: change the $cfg['system_dir'] in your datas/config.php to reflect the absolute path to the system folder (like: $cfg['system_dir'] = '/path/to/your/cotonti_root/system'; - note lack of "dot" at the beginning, don't forget to remove it when typing down the absolute path). Otherwise, the includes in external chat script won't work. Don't worry, it won't mess your Cotonti installation.

1. Copy the folder structure as is to the Cotonti root
2. Run COTONTI_ROOT/chat/install.php - it will install database tables. Should work okay... if not, execute the chat.sql file in your mySQL client.
3. Install plugin ajaxchat
4. Add the tags where applicable (Index and Header available out of the box)
5. Enjoy. :)

I made this chat a popup window. Guests are set to autologin, but it can be changed in chat/lib/config.php. Developers, please test if it's an okay integration. All credits to Kaan.

I added "last messages" functionality on index page.

Tip: in chat/lib/class/CustomAJAXChat, there's a function getValidLoginUserData() at the very bottom. It assigns different user roles depending on Group Level. Be sure to adjust it accordingly, both in your Cotonti administration and in this function.
This post was edited by tensh (2010-03-17 17:01, 14 years ago)