1 (edited by madblueimp 2008-01-23 12:56)

Topic: [RC] Yet Another AJAX Chat - Integration without forum modification

AJAX Chat is a free and open source web chat software.

It is implemented using Asynchronous JavaScript And XML on Client-Side and PHP, MySQL and XML on Server-Side.

Features:

    * Easy installation
    * Multiple Channels
    * Private Messaging
    * Private Channels
    * Kick/Ban offending Users
    * Ignoring offending Users
    * Online users list
    * Emoticons / Smilies
    * Easy way to add custom emoticons
    * BBCode support
    * Clickable Hyperlinks
    * Splitting of long words to preserve chat layout
    * IRC style commands
    * Easy interface to add custom commands
    * Multiple languages (auto-detection of ACCEPT_LANGUAGE browser setting)
    * Multiple styles
    * Persistent style switcher included
    * Chat window adjusts to browser window with included styles
    * Easy customization through stylesheets (CSS) and templates
    * Automatic adjustment of displayed time to local client timezone
    * Standards compliance (XHTML 1.0 strict)
    * Accepts any text input, including code and special characters
    * Support for unicode (UTF-8) and non-unicode content types
    * Bandwidth saving update calls (only updated data is sent)
    * Survives connection timeouts
    * Small filesizes (see Download below)
    * Logging of chat messages in XML format
    * Easy integration into existing authentication systems
    * Sample phpBB2 (PHP Bulletin Board Version 2) integration provided
    * Sample phpBB3 (PHP Bulletin Board Version 3) integration provided
    * Sample PunBB integration provided
    * Sample Simple Machines Forum (SMF) integration provided
    * Provided Log File Viewer using XSLT
    * Separation of layout and code
    * Well commented Source Code

AJAX Chat


Important:
As the time and effort spent to support the AJAX Chat project has increased my support here on this topic will discontinue.
I will continue to answer support requests on the Official SourceForge project site.
Feel free to use this topic for user-to-user support.

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

You forget two features, that all web-chat have:

    * Bringing down your server by using an asynchronous, not adapted, not designed for, technology
    * Bringing your hosting manager, or server administrator, hunting you down for this last feature

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

Wow, what a nice welcome. wink

Jérémie, you're right on the notion that HTTP is not the ideal protocol for a Chat.
In a perfect world we would all use Jabber anyway.

While not overcoming the limitations of a stateless protocol, the AJAX technology at least made it possible to implement a web chat that does not bring down the server.
At least this web chat is designed to do most of the work on client side. The language handling, the BBCode, Hyperlinks and Emoticons Replacement is all done by JavaScript on client side.

The data sent between client and server is as small as possible as well. Most of the Requests and Responses will look like this (without HTTP headers):

Request:

GET /chat/?ajax=true&lastID=20087 HTTP/1.1

Response:

<?xml version="1.0" encoding="UTF-8"?><root><users><user role="0"><![CDATA[testing]]></user></users><messages></messages></root>

Sure, several chat clients pulling the server for data every 2 seconds does put a certain load on the server, but:
* The time between update calls can be configured with a configuration option - the default is 2 seconds.
* The operations the server has to do are not complex, the queries to the database held simple
* The data sent between client and server is as small as possible (see above).

In my opinion, a web chat is no replacement for a real chat protocol like IRC or Jabber, but it can be a nice to have if all you need is a browser to chat with the people on your forum. smile

4

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

Well I don't know how much strain it puts on a server but it's really easy to use with good ergonomics and looks.
It's really neat. Good job.

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

cool smile

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

How i can add online list of this chat on index.php of my forum?

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

spycam wrote:

How i can add online list of this chat on index.php of my forum?

I'm not a PunBB expert, so I can't tell you where to put it on your PunBB forum, but the following code fragment will give you two arrays with the online chat users ID's and user names, using the DataBase methods of PunBB:

    // Chat online users:
    $chat_online_user_ids = array();
    $chat_online_user_names = array();
    $sql = 'SELECT
             userID,
             userName
          FROM
             `ajax_chat_online`;';
    $result = $db->query($sql);
    while ($row = $db->fetch_assoc($result))
    {
       array_push($chat_online_user_ids, $row['userID']);
       array_push($chat_online_user_names, $row['userName']);
    }
    $db->free_result($result);

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

Some new version releases have happened:

Version 0.5  (12.10.2007):
-------------------------------

New features:
- Realtime monitoring and server-side log viewer replaces log files creation.
- Invitation system to invite users to the current channel.
- Private channels based on invitation system.
- Possibility to access restricted channels by invitation.
- Possibility to use persistent font colors.
- Client-side settings are stored persistently in a settings cookie.
- /me and /describe and /action (new) messages are displayed in a custom style class.
- Added config variable to limit the number of available cannels.
- Added config variable to define the max users logged in.
- Added config variable to enable/disable private messages.
- Added config variable to enable/disable private channels.
- Added config variable to force auto-login.
- Added config variables to adjust guest usernames.
- Added config variable to enable/disable the display of channel messages login/logout, channel enter/leave.
- Added config variables to define the time of day and the days in the week the chat is opened.
- Styles from different chat versions are now included in all packages.
- Restructured CSS styles to separate Positioning, Borders, Fonts and Colors.
- Restructured DataBase code and added support for MySQLi.
- Chat versions with forum integration now use the existing database connection.
- Improved (multibyte) encoding support.

Bugfixes:
- Several (10) XMLHttpRequest objects are created for POST requests to allow real asynchronism.
This way messages sent before the server could respond don't result in an error message anymore.
- JavaScript links (private message links in online list) were not escaped properly.
- Removed Byte Order Mark at the beginning of finnish language files which caused unwanted output.
- Session handling now allows to keep the current session on logout.

Other changes:
- Code refactoring to cleanup the code and avoid naming collisions.
- Removed PHP Code from Template files - using a simple template system with custom tags.
- License change => Creative Commons Attribution-Share Alike (still free and open source).

Changed files:
- all (all versions)



Version 0.5.0.1  (13.10.2007):
-------------------------------

Changes:
- Moved forum integration code out of class files and into lib/custom.php.

Changed files:
- index.php (all versions)
- lib/custom.php (all versions - new)
- lib/class/CustomChat.php (all versions except standalone)



Version 0.5.1  (14.10.2007):
-------------------------------

New features:
- Added simple flood control (two new config variables).

Bugfixes:
- Ignored userNames were not escaped properly for message filter query [SECURITY RISK].
- /roll messages were being displayed as user messages instead of chatBot messages (Code refactoring mistake).
- No display of invitations/uninvitations or /roll messages from ignored users.
- Preventing robots from being logged in automatically (phpBB3 version).

Changed files:
- lib/config.php (all versions)
- lib/class/AJAXChat.php (all versions)
- lib/class/CustomAJAXChat.php (phpBB3 version)

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

AJAX Chat has reached Version 0.6.3 with some bugfixes and new features. smile
You will also find a comprehensive documentation linked on the project page.

10

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

would the code still work if i edited all the selct mysql codes to get the message and add in a WHERE, and then update the INSERT code to add the WHERE ??? would that still work?

Sorry. Unactive due to personal life.

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

Probably though I wouldn't recommend this. What do you want to achieve?

12

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

based on this idea:

each Person/Group/Band/Site has there own page, and on that page they each have there own "guestbook"..and thus using the ajax chat as that!

Sorry. Unactive due to personal life.

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

OK. What about just using one specific channel for each Person/Group/Band/Site?
You could also use different chat setups sharing the same database table.

14 (edited by Utchin 2007-11-30 23:47)

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

I havnt used this chatbox yet, but is that possible to create a channel, and then it will retive all the messages from that?

cheers

EDIT: just installed. looks good. is     "<div style="width:200px;"><?php echo getShoutBoxContent(); ?></div>" the code to get it into what you have on the main page of your site?

Sorry. Unactive due to personal life.

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

Just have a look at the features and the demo: AJAX Chat.
Although the demo only shows one channel you can have as many channels as you want.
The AJAX Chat PunBB integration version takes over the forum names as channel names as well as the access rights.
You could as well define your own custom list of channels as described in the AJAX Chat documentation linked on the project page.
To open the chat with a specific channel you can either use the channel name (e.g. http://example.org/path/to/chat/?channe … me_Channel) or the channel ID (e.g. http://example.org/path/to/chat/?channelID=123).

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

Important:
As the time and effort spent to support the AJAX Chat project has increased my support here on this topic will discontinue.
I will continue to answer support requests on the Official AJAX Chat Support Forum.
Feel free to use this topic for user-to-user support.

P.S.:
A new version will be released shortly including support to push updates over a Flash based socket connection - this prevents the chat clients from constant pulling and will increase performance.

17

Re: [RC] Yet Another AJAX Chat - Integration without forum modification

i would like to see sometype of admin control for the mod.
for creating channels( a channel called shoutbox) and such.
and how to integrate this in to punbb more?
not talking about iframes.
creating a punbb page and droppin the code to pull the chat.

so sometype of example on how to create styles for it so that it like the main site with links and such.


Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!