News:

Join the Facebook Fan Page.

Main Menu

[RC] AJAX Chat

Started by madblueimp, September 04, 2007, 03:50:27 AM

Previous topic - Next topic

madblueimp

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)

Neorics

i get this error when installing it

The package you tried to upload either is not a valid package or has become corrupted.
[For Hire] I can help you with anything regarding Simple Machines Forum  ~ My Portfolio

madblueimp

To install it, follow the installation instructions in the  provided readme in the download archive:

Quote1.   Creation of database tables
   ---------------------------

   Execute the provided SQL script chat.sql by using phpMyAdmin:
   http://www.phpmyadmin.net/ [nofollow]
   
   On phpMyAdmin, select your SMF database and click on "Import".
   Select the file chat.sql from your local harddisk and click on "OK".
   This should execute the included commands to create the tables needed by this chat.


5.   Upload to the server
   --------------------

   Upload the chat folder to your server into your SMF forum directory:
   e.g. http://example.org/forum/chat [nofollow]


Ready! Just place a link to the chat directory on your forum. :)

feline

I don't understand, why you not use the DB functionen used by SMF. The SSI.php have everything which is need for this.

Fel

feline

Quote from: Neorics on October 15, 2007, 09:34:42 AM
The package you tried to upload either is not a valid package or has become corrupted.

That is no mod .. must by installed manually ...

Fel

madblueimp

Quote from: feline on October 16, 2007, 08:15:54 AM
I don't understand, why you not use the DB functionen used by SMF. The SSI.php have everything which is need for this.
The answer is simple - AJAX Chat is not a SMF modification - it is a standalone software which can easily be integrated into existing authentication systems, like that of SMF.
If you visit the project page, you'll see that I provide integrations for phpBB2, phpBB3, PunBB and SMF.
Apart from that, SMF's database functions miss one critical thing, a function to call mysql_real_escape_string on user input values, to make SQL queries safe against SQL injections.
I know that SMF has its own security functionality to prevent attacks - yet in my opinion, while using PHP, mysql_real_escape_string on any user input used for SQL is the best way to go.

Neorics

Quote from: madblueimp on October 16, 2007, 04:29:55 AM
To install it, follow the installation instructions in the  provided readme in the download archive:

Quote1.   Creation of database tables
   ---------------------------

   Execute the provided SQL script chat.sql by using phpMyAdmin:
   http://www.phpmyadmin.net/
   
   On phpMyAdmin, select your SMF database and click on "Import".
   Select the file chat.sql from your local harddisk and click on "OK".
   This should execute the included commands to create the tables needed by this chat.


5.   Upload to the server
   --------------------

   Upload the chat folder to your server into your SMF forum directory:
   e.g. http://example.org/forum/chat


Ready! Just place a link to the chat directory on your forum. :)

oops my bad... i forgot...

and feline... are you actually releasing your version or no?
[For Hire] I can help you with anything regarding Simple Machines Forum  ~ My Portfolio

feline

I will take a look at the last changes, they madblueimp have made.
Then i distribute my release as a mod for smf.

Fel

feline

Quote from: madblueimp on October 16, 2007, 08:25:08 AM
Quote from: feline on October 16, 2007, 08:15:54 AM
I don't understand, why you not use the DB functionen used by SMF. The SSI.php have everything which is need for this.
Apart from that, SMF's database functions miss one critical thing, a function to call mysql_real_escape_string on user input values, to make SQL queries safe against SQL injections.

Uhm .. that is very simple to integrate ..
If you have load the SSI.php, you have the global variable $db_connection and so you can use this for mysql_real_escape_string.
You have made a customer part for SMF, also .. why not use the given SMF functionality?

Fel

Neorics

Quote from: feline on October 17, 2007, 07:25:17 AM
I will take a look at the last changes, they madblueimp have made.
Then i distribute my release as a mod for smf.

Fel

cool... that would be great... good luck...
[For Hire] I can help you with anything regarding Simple Machines Forum  ~ My Portfolio

madblueimp

Quote from: feline on October 17, 2007, 07:40:07 AMYou have made a customer part for SMF, also .. why not use the given SMF functionality?
I do use SMF's functionality - In lib/class/CustomAJAXChat.php, the global variables $db_prefix, $db_name, $db_connection, $context, $user_info, $settings and $scripturl which have been set by SMF are used by AJAX Chat. :D

feline

Quote from: madblueimp on October 17, 2007, 12:25:38 PM
Quote from: feline on October 17, 2007, 07:40:07 AMYou have made a customer part for SMF, also .. why not use the given SMF functionality?
I do use SMF's functionality - In lib/class/CustomAJAXChat.php, the global variables $db_prefix, $db_name, $db_connection, $context, $user_info, $settings and $scripturl which have been set by SMF are used by AJAX Chat. :D
Ok, ok .. I notice that you have not understand the functionality of SSI.php.
It's your project, but I cannot recommend this without full SMF integration .. sorry

Fel

madblueimp

Quote from: feline on October 17, 2007, 02:50:25 PMOk, ok .. I notice that you have not understand the functionality of SSI.php.
It's your project, but I cannot recommend this without full SMF integration .. sorry
Please don't get offending - I understand what's the purpose of SSI.php.
But like I said, AJAX Chat is a standalone software that integrates easily into existing authentication systems.
It uses SMF's functionality where it needs to - and that's getting the list of accessible forum's to use them as channels/rooms and authenticating registered users.

In my opinion, one of the best features of AJAX Chat is its easy installation - you don't need to change anything, not a single file on your SMF installation:
Just create the database tables, upload the chat folder into your SMF forum directory and you're done. :)

Maybe you'll understand better if you have a look at the different versions of AJAX Chat - bundeled to use it with phpBB2, phpBB3, PunBB or SMF.
Most of the code for the different versions is exactly the same - only the following files are different:
- lib/class/CustomAJAXChat.php (used to set the SMF db connection and to override authentication code and channels initialization)
- lib/template/loggedOut.html (used to redirect to the SMF login, if a password is given)
- lib/custom.php (used to include SMF's initialization code)
- lib/config.php (used to set SMF specific settings, like not creating a new session on chat initialization)

feline

#33
Quote from: madblueimp on October 18, 2007, 08:55:01 AM
Quote from: feline on October 17, 2007, 02:50:25 PMOk, ok .. I notice that you have not understand the functionality of SSI.php.
It's your project, but I cannot recommend this without full SMF integration .. sorry
Please don't get offending - I understand what's the purpose of SSI.php.
aha .. hmmm ..  8)

Quote
In my opinion, one of the best features of AJAX Chat is its easy installation - you don't need to change anything, not a single file on your SMF installation:
Just create the database tables, upload the chat folder into your SMF forum directory and you're done. :)
cool ...
* no button necessary (who can i click to start the chat ?)
* each user can enter (why have smf rights for users and groups ?)

Quote
Most of the code for the different versions is exactly the same - only the following files are different:
- lib/class/CustomAJAXChat.php (used to set the SMF db connection and to override authentication code and channels initialization)
- lib/template/loggedOut.html (used to redirect to the SMF login, if a password is given)
- lib/custom.php (used to include SMF's initialization code)
- lib/config.php (used to set SMF specific settings, like not creating a new session on chat initialization)
I need only SSI.php .. no manually settings for the database, not loginscreen and so one.

and installation is tooo simple .. only get the smf packed and install.
It's create the need button and uses the permissions from smf.
And .. that run inside smf (with a template) or outside as popup.

I mean, that is simple better  ;)

Fel

madblueimp

Quote from: feline on October 18, 2007, 04:01:55 PM* no button necessary (who can i click to start the chat ?)
You only need to put a link to the chat somewhere on your forum - you don't need an installation procedure for such a task.

Quote from: feline on October 18, 2007, 04:01:55 PMeach user can enter (why have smf rights for users and groups ?)
You can define in the AJAX Chat settings if you want to enable/disable guest user access. The right to enter a specific channel is directly taken from the forum rights. If a user has no access to a certain forum, he'll have no access to the channel that is set up for this forum.

Quote from: feline on October 18, 2007, 04:01:55 PMI need only SSI.php .. no manually settings for the database, not loginscreen and so one.
Since version 0.5 of AJAX Chat you don't have to edit any database settings anymore - the existing db connection of SMF is used.
The login screen of AJAX Chat is needed if you want to allow guest users to choose their own username.
IF a registered user wants to login, the login directs to the SMF login and redirects to the chat.

Quote from: feline on October 18, 2007, 04:01:55 PMand installation is tooo simple .. only get the smf packed and install.
It's create the need button and uses the permissions from smf.
And .. that run inside smf (with a template) or outside as popup.
You can use the official AJAX Chat version as shoutbox embedded whereever you want on your site or as a standalone chat - it's all configurable.

I mean, it's up to you to modify the chat to your liking - it's one of the benefits of open source software.

RvG

coollll.... another shoutbox on the go. :)

1 question to those who have used this: what was the load on the server (depends small, meduim, large communities?)

RvG

ok have tested it...

any instructions how to show it in the index forum and add a shortcut to the menus?

feline

Just I have upload the first release of FNW Ajaxchat on my site.
This is the Popup version as run on my site.
A "inside forum" version follow.

Inside the archive you find a small "Block Code Snippet" for TinyPortal to get a list of online Chatuser in a sideblock.

A complete documentation you can found at:
http://feline-networks.com/index.php?page=fnw_ajaxchat_install

Download (registered user)
http://feline-networks.com/index.php?action=tpmod;dl=item105

Fel

Neorics

is there a way not to make it a pop up though?
[For Hire] I can help you with anything regarding Simple Machines Forum  ~ My Portfolio

feline

as I say .. a "inside forum" version comming next.

Fel

Advertisement: