1 (edited by kerphi 2006-01-14 12:02:27 PM)

Topic: phpFreeChat uses xajax

Hello,
I'm proud to announce you the first public release of phpFreeChat.

phpFreeChat is a opensource (LGPL), simple, fast and customizable chat server written in php. It uses a simple filesystem for messages and nicknames storage. It doesn't use Mysql.
JavaScript (XAJAX) is used to softly refresh the chat.

Don't hesitate to try it : see the demo !

regards,

Kerphi.

Re: phpFreeChat uses xajax

Very nice, but i think templates should be fixed.

Re: phpFreeChat uses xajax

What do you mean by

mstar wrote:

templates should be fixed.

?

Re: phpFreeChat uses xajax

Ok, I think I know why you said that.
Didn't you try the demo with IE ?

I made the mistake not to test the chat with IE, I have only tested it with Firefox.
I have just sumitted a patch that allows to nicely display the chat on IE too.

Re: phpFreeChat uses xajax

Wow, that's really impressive, well done. What did you choose not to use MySQL?

Re: phpFreeChat uses xajax

rogueConnect wrote:

Wow, that's really impressive, well done.

Thank you.

rogueConnect wrote:

What did you choose not to use MySQL?

Because I wanted the chat to be as simple as possibe and as fast as possible.
Just unzip/untar the archives and you get a working chat browsing to the demo directory.

However, I have developped a "plugin" system which allows developpers to create there own "containers". Actually the only container I created is filesystem but it is pretty easy to  developpe a mysql one.

Re: phpFreeChat uses xajax

I just released 0.3 (a major bug fix release), don't hesitate to test it :

    * Add a clientid JS variable used to identify each open window. This makes possible to open 2 windows on the same chat without any conflicts or strange behaviours.
    * Add english and french README and INSTALL files.
    * Bug fix: Smileys was not displayed in /notice and /me commands.
    * Bug fix: Nicknames were not filtered everywhere so nicknames could be too long or with only spaces.
    * Bug fix: On IE, first time the chat was displayed, the nicknames list was hidden.
    * Bug fix: the internal chat identifier was badly calculated and threw randomly strange errors.

Re: phpFreeChat uses xajax

nice chat, but file access-problems can be many more difficult than a mysql-db. smile

i wrote a very simple xajax-chat <1> (user color, simlies, private messages, different rooms), it needs 300 lines php an 300 lines js-code, uses mysql, is ie/ff/opera-compatible and fast enough to manage more than 100 users (but it's in german, sorry).

<1> http://www.granatenmaessigrecherchiert.de/chat.html

Re: phpFreeChat uses xajax

I just released 0.4, see the changelog :

    * New feature: Add a nice connect/disconnect icon used to manualy connect or disconnect from the chat.
    * Bug fix: Nicknames with special caracteres (ex: < >) are not displayed correctly in the nickname list and in the notice messages.
    * Bug fix: shownotice option didn't work (set it to 0 to remove every notice, set it to 1 to show only nicknames changes, set it to 2 to show 1+ connect/disconnect notice)
    * Bug fix: At first connexion, messages history was shown twice.
    * Replace png smileys by gif smileys to avoid black background on th crappy IE.
    * Bug fix: Blocking warning could happen when E_ALL was set in php parameters, it made the chat unworkable!
    * Bug fix: Add an alternative to file_get_contents which is used by phpfreechat but was not defined on php version < 4.3.0
    * Bug fix: :'( smiley was not correctly displayed.
    * Bug fix: Nicknames highlighting did not work as excepted.

Re: phpFreeChat uses xajax

I just released 0.5, see the changelog :

    * Nickname's colorization for a better readability. Nicknames are colorized using a predefined color list (same as XChat). It's also possible to toggle enable/disable colorization using a button.
    * Add the ability to show/hide the dates/hours by pressing a simple toggle button.
    * Bug fix: Remove wait cursor when an update occures.
    * Bug fix: Fix problems with UTF8 / UNICODE nicknames and '\' charactere.
    * Refactoring of internal libraries install process (xajax, ie7, javascript-libs).
    * Bug fix: When the last user quit the chat, his nickname was not disconnected as long as next user connect, so it was not possible to connect again and take the same nick.

Re: phpFreeChat uses xajax

I just released 0.6, see the changelog :

v0.6 on 02/07/2006

    * New minimize/maximize button. Then you can easily integrate your chat to weblogs or forums !
    * connect_at_startup option added. Turning off this option will not connect user at startup, to connect he shall click on the login button.
    * nickmarker option added. Turning off this option disable nickname colorization.
    * clock option added. Turning off this option will disable date/hour display.
    * Reorder smileys and add tux and gnu smileys (Thanks to Kaella for the nice tux and gnu smileys!)
    * Bug fix: When the rootpath was empty, it was not set to '.'. The xajax relative path (and other depending on this path) was broken! (Thanks to Kaella for reporting this bug)
    * Bug fix: When setting same config parameters in two scripts, it makes problems because the two script share the same cache id.
    * Bug fix: The active option should not be used to initialize the auto-connect state because when a user quit, the active option is set to false and is stored in session. Then, when the user come back, he wasn' auto-connected as it should. This option is replaced by connect_at_startup.
    * Bug fix: The nicknames colors are limited to 15. So when a 16th user connect, his nickname is not colorized. Moreover, the disconnected users listed in the message history was colorized.
    * Bug fix: On servers where php is executed as cgi, the SCRIPT_FILENAME variable doesn't point on the script filename but on thhhe php.cgi file. It made problems to calculate relative paths in phpfreechat. Now the PATH_TRANSLATED variable is used for cgi configuration.

See the new design :
http://www.phpfreechat.net/images/screen1.jpg

Re: phpFreeChat uses xajax

kerphi, I've been working on a modification of xajax so that the server can send updates to the client, without the client polling the server every second.  would this be of interest to you: i'm kind of looking for motivation for finishing off the code and publishing it?

Re: phpFreeChat uses xajax

HuG ? How this would be possible ?
A HTTP request is only initiate by client side, isn't it ?
How the server can warn the clients ?!!?

Maybe my HTTP knowlege is incomplete ? isn't it ? Or is it a "magic" xajax feature ? big_smile

Re: phpFreeChat uses xajax

BigBrownChunx wrote:

kerphi, I've been working on a modification of xajax so that the server can send updates to the client, without the client polling the server every second.  would this be of interest to you: i'm kind of looking for motivation for finishing off the code and publishing it?

I investiguated on this very interesting feature.
I found something about HTTP_Streming (http://ajaxpatterns.org/HTTP_Streaming). Is it what you are talking about ?

Because this feature is really interesting for a chat. smile

Re: phpFreeChat uses xajax

BigBrownChunx wrote:

kerphi, I've been working on a modification of xajax so that the server can send updates to the client, without the client polling the server every second.  would this be of interest to you: i'm kind of looking for motivation for finishing off the code and publishing it?

Where is BBC,i m interesting too....

Re: phpFreeChat uses xajax

I just woke up smile

Yeah, that's the idea.  I didn't realise there was other people who have already done it.  Kind of similar to that page, just picking up on updates as they come in from the server while keeping a persistent connection open that resets, after a predefined amount of time eg 1 minute or something.

I was also thinking of using the apc_store() PHP function to send information between processes.

I think there'll be a lot less memory problems than what that article says too, since the connection is purposfully reset and xajax (hopefully) doesn't have any memory leaks.

I'll consider working on it more now smile

Re: phpFreeChat uses xajax

I just released 0.7, see the changelog :

0.7 on 02/15/2006

    * Implement a simple i18n system and add French/English translation of all the messages (contributions are welcomed for other translations).
    * Add the chinese translations (thanks to guoxianghao)
    * Add the formal and informal german translation (thanks to bsemf)
    * Add the arabic translation (thanks to sandra rizk)
    * Bug fix: add dirname(__FILE__) to xajax require_once to avoid problems on badly configured php servers.
    * Switch minimize and maximize icon.
    * Add "phoenity" smiley theme. These smileys have been developed by Lim Chee Aun and ported to PHPFreeChat by Robin Monks.
    * Add a function existance check into intialization step. The aim is to have a better control on why phpFreeChat doesn't work on such server configuration.
    * Add "famfamfam" smiley theme based on the icons at www.famfamfam.com. Ported to PHPFreeChat by Robin Monks.
    * Add client_script option which can be used to force the script location if the autodetection doesn't work well.
    * Bug fix: on php cgi installation, the automatic script filename detection didn't work. (thanks to Wendy Novianto for the report)
    * Few container's interface clarifications. (thanks to Bernhard J. M. Grün for the report)
    * Add the $return parameter to print* methods. Setting this paraméter to true will return result instead of printing it (thanks to Wendy Novianto for the contribution).
    * phpFreeChat now uses a simple php based template engine in order to handle easily i18n translations. This modification removes Smarty library dependency.
    * Bug fix: Clicking on the message list area will set focus to input box only if the mouse didn't move after the mousedown event (stay static).
    * Use CSSTidy to optimise and to parse the CSS code. (thanks to Nemako for this contribution)
    * Make template directory configurable (vars tplpath and tpltheme) like smileys directories (thanks to Wendy Novianto for the suggestion)
    * Bug fix: on windows servers, the relativepath was incorrect (thanks to bsemf for the patch)
    * Add a shield for unreconized parameters. These parameters can be obsolete or not well written.
    * Add the title attribute on smileys (thanks to BenXbox for the idea)

Re: phpFreeChat uses xajax

I just released 0.8 !

This release add a flexible theme architecture (see examples: 1, 2, 3, 4 ), make possible to easily create custom commands (see the dice demo), some refactoring has been done on the JavaScript code using the prototype library, add lot of new translations : portuguese from brazilian, japanese, serbian/croatian, italian, spanish, indonesian, swedish, russian and portuguese from portugal, three new smiley themes : phpbb2, cerutti and blune, BBCODE support, a new memory container, bandwidth optimizations and many bug fixes!

The full changelog :

    * Add themes support : a theme is a directory containing all the necessary ressources (smileys, templates, images) to completly customize the chat appearance. When a new theme is created, only the wanted ressources can be changed, the default theme is allways the fallback, it means a empty theme will work because the default theme will be the fallback for the all the ressources.
    * Now a command is a class in a file. So, it's very easy to define your own commands (see the demo27 for a quick example).
    * Bug fix: Using a none default value for prefix makes problems with session.
    * Bug fix: The clock variable doesn't work as expected.
    * Bug fix: it was impossible to create multiple rooms using url parameters because server_script_url and client_script_url didn't take into account the url query string.
    * Rename all the i18n directories to match the unix locales standards : fr_FR, en_US, ja_JP, ar_LB ... Don't forget to update your config file !
    * New brazilian portuguese pt_BR translation (many thanks to fredcosta)
    * New japanese ja_JP translation (many thanks to elf2000)
    * New smiley theme : phpbb2 + Eusa (thanks to bsemf for the contribution)
    * New smiley theme : cerutti (thanks to Victor Cerutti for the contribution)
    * Bug fix: on iis6/win2003 webserver, the WINDIR variable is lowercase.
    * Add a demo to explain how to use server_script_url, client_script_url and smileyurl parameters, very useful for strange server configurations.
    * New serbian / croatian sr_CS translation (many thanks to Smilie)
    * Add a timeout parameter to the $params array uses to tune the time of inactivity to wait before to considere to disconnecte user.
    * Optimize bandwidth : let the client launch each refresh step
    * New italian it_IT translation (many thanks to bellakioma)
    * Refactoring of Javascript code (pfcClient class) : new code is now based on prototype library.
    * New spanish es_ES translation (many thanks to drjoju)
    * New indonesian id_ID translation (many thanks to Wendy Novianto)
    * New swedish sv_SE translation (many thanks to Pär Smårs)
    * openlinknewwindow parameter added. Setting this option to true will open the followed link in a new window.
    * Bug fix: Changing nickname to alt, img or anything contained into the smiley html image code will make problems because the nickname colorization parse also the html smiley code.
    * Move smileys, link and nickname highlight parsing to client side (done with JavaScript RegExp)
    * Integrate bbcode syntaxe. Use text to bold the text, use text for italic, use text for underline, use [s]text[/s] for line-through, use myemail@mydomain.com or text for emails, and text for colorize your text (thanks to Nemako for this contribution)
    * usecsstidy parameter added. Setting this option to true will use the CSSTidy library to optimize the CSS output (by default this parameter is false because it make problems on strange server configurations).
    * showwhosonline parameter added. Used to show/hide online users. (thanks to Nemako for the contribution)
    * showsmileys parameter added. Used to show/hide the smiley list. (thanks to Nemako for the contribution)
    * Bug fix: the max_msg parameter could make problem when a low value is used because this parameter was used to purge the history file.
    * New russian ru_RU translation (many thanks to Stanislav Kondratyuk)
    * Bug fix: it was possible to takeover a nickname and it was possible to read messages although no nickname was choosen (thanks to softwareNerd and Nemako for the detailed bug report)
    * Add btn_sh_whosonline and btn_sh_smileys parameters use to show/hide the showsmileys and showwhosonline buttons (Thanks to Bernhard J. M. Grün for the contribution)
    * New Portuguese from Portugal pt_PT translation (many thanks to Paulo Bras)
    * New shared memory container based on PEAR::SharedMemory package (many thanks to Bernhard J. M. Grün for this great contribution)

Now a screen shot (notive the BBcode buttons smile )
http://img222.imageshack.us/img222/4127/pfc084xj.jpg

Re: phpFreeChat uses xajax

I just released 0.9, it uses new xajax release 0.2.3 without any problems !

This release add the abality to use the TAB key for nicknames completion and to choose a permanent color for the written text. It also fixes some major bugs : a crash due to a memory leak on IE6, the nicknames was case sensitive and add few new translations: ukrainian, dutch from netherlands and norwegian.

The full changelog :

    * Handle correctly (on FF, IE, Konqueror) the TAB key and use it for basic nicknames completion like on IRC.
    * Make possible to change the written text color permanently. (internaly it uses the bbcode colors)
    * Bug fix: On IE6 when showing/hiding the nickname list and the smileys list, these boxes disappeared curiously. The workeround is to load an image with a very long (>4550 characteres) src url. Why ? I don't know !
    * Bug fix: When the chat window was leaved open, Internet Explorer could crash. This was caused by a memory leak in the xajax v0.2 library. The xajax upgrade fix the problem.
    * Bug fix: Nickname are case sensitive, so in the same chat there can be both a "BOB" and a "bob". This is a bug. it should be doing a case-insensitive compare so that BOB and bob register as the same username.
    * Bug fix: nicknames didn't render correctly in Firefox (nowrap CSS rule don't work as expected), I noticed the "white-space: pre" rulez works on IE and FF. (thanks to JoeHaley for the report)
    * Bug fix : email tag won't work if email address starts with letter s when use the email syntax email address, if type in an email address starting with letter 's', it will print out incorrectly.
    * New ukrainian translation ua_UA (thanks to Ivan Kravets aka X-MAN)
    * New dutch from netherlands nl_NL translation (many thanks to Robert de Ruiter)
    * New norwegian no_NO translation (many thanks to Anders Bondehagen)

Re: phpFreeChat uses xajax

I just released 0.9.1

This release fix minor bugs on parsing (urls, colors ...), try to fix again the IE display bug and add a new translation: bosinian.

The full changelog :
    * Bug fix: When a empty text is typed, nothing should be sent. Only a error message must be shown.
    * Bug fix: Links auto-detections didn't work
    * Bug fix: Now openlinknewwindow parameter is used also for the phpfreechat logo link.
    * Bug fix: When the connection to the server is bad, refresh_delay is automaticaly adjusted (multiplied by 2 when it fails).
    * Bug fix: If you write something that is as long as your set maximum message length, the color code is shown in chat not the actual chosen text color it self.
    * Bug fix: There is no line break in chat. If you send long messages they just continue in one row, and a horizontal scroll list appears. (this doesn't work with the crappy IE).
    * Bug fix: do not send message containing only spaces.
    * Bug fix: remove the annoying "HTTP status 12002" popup dialog
    * Bug fix: Using width parameter in not a good idea because of a display bug in IE6. I just removed temporary the width parameter. Please refere to this topic for a workeround http://www.phpfreechat.net/forum/viewto … d=867#p867
    * Bug fix: setting showsmileys parameter to false and btn_sh_smileys to false didn't work (thanks to Yusuke for the bug report).
    * Improve HTTP URL parsing : now long urls are splited with '...' (doesn't work on IE6)
    * Now shownotice uses a flag system : 0 = show nothing, 1 = shows nicknames change, 2 = shows connect/disconnect, 3 = (2+1) shows nicknames change and connect/disconnect
    * New focus_on_connect parameter: Setting this to true will give the focus to the input text box when connecting to the chat. It can be usefull not touch the focus when integrating the chat into an existing website because when the focus is changed, the viewport follows the focus location.
    * New quit_on_closedwindow parameter: Setting this to true will send a /quit command when the user close his window. It's not set to true by default because on IE and Konqueror/Safari, when the user reload his page this event occurs.
    * New bosnian ba_BA translation (many thanks to Emin Jasarevic)

Re: phpFreeChat uses xajax

I just released 0.9.2.

This release fixes minor bug (IE display bug is now cleanly fixed) and adds two new translations: turkish and greek.

The full changelog :
    * New turkish tr_TR translation (many thanks to mesut)
    * New greek el_GR translation (many thanks to Speedy)
    * Bug fix: a path was broken with php's safe_mode enable in xajax 0.2.3
    * Bug fix: openlinknewwindow parameter was ignored on Firefox
    * Bug fix: very long text with colors were truncated (thanks to Kachel for the report)
    * Bug fix: a cleaner workaround (based on document.recalc() function from ie7library) for IE6 smileys/nicklist resize bug

Re: phpFreeChat uses xajax

I just released 1.0-beta3.

This release adds a censor proxy which filters bad words, a new /identify command used to get admin rights with a login/password, and a new API used to query the chat info from external scripts (who is online, N last posted messages). A lot of annoying bugs were fixed.

You can see the full change log here.

Here a small screenshot to show the new defaut look of the 1.x branche :
http://img125.imageshack.us/img125/5549/screen8zu.jpg

Re: phpFreeChat uses xajax

I released 1.0-beta5.

This releases is a deep refactoring. It has been done in order to :

    * optimize the chat weight (before: 80ko, now: 30ko) so it will load faster.
    * simplify the initialisation process, it should support more configurations (ex: suphp or suexec).
    * simplify theme creation (no more php into the css file)

This release also fixes lot of bugs, adds new translations and improve usability of the chat.

Don't hesitate to try it and download it.

Re: phpFreeChat uses xajax

VERY very nice prog...
some questions:

1.Is the STREAMING already included? Will it be included?
2.Is the traffic noe low enough for limited traffic servers? Is it now comparable with an IRC chat?
3.Is it possible to get the chatroom focus on the last lines, not on the first when you change tabs?
4.Where do I change Nick colors?
5. Couldn't find anything about XAJAX in the installation guide. Dont want to have it double...

would be happy to use it on my new page..

Re: phpFreeChat uses xajax

1. No the streaming is not already included, as it's not available in current 0.2.4 release, I'm waitining the 0.5 release to integrate it.

2. The bandwidth trafic is not a problem: only new messages are transmitted. However it can be CPU consuming on some servers, see this topic for explaination: http://www.phpfreechat.net/forum/viewtopic.php?id=317

3. It should work: the scrollbar position is saved when you switch tabs, it's position is restored when you come back and should go to last line when new messages are posted.

4. use the 'nickname_colorlist' parameter example:

$params['nickname_colorlist']= array('#CCCCCC','#000000','#3636B2','#2A8C2A','#C33B3B','#C73232','#80267F','#66361F');

5. you can use the 'xajaxpath' parameter to indicate another location of the xajax library. However the current used version is 0.2.3 so maybe it will not work with lastest versions (I didn't test it).