I just ran across the Lace chat script. It seems to be *very* responsive (it uses XMLHttpRequest, so no full-page refreshes), but would need some work in order to be used with Moodle. It uses a flat file rather than storing the info in a database (probably not too hard to change). It'd need to be "Moodleized" to use proper authentication, add those nice user pictures, etc.
I haven't looked at the actual code, so I don't know how ugly/pretty it is. It's PHP and GPL, though. It doesn't require a server daemon, either.
They claim graceful degradation on non-Ajax browsers.
Scalability? Unknown.
This is great find! I would be curious to see how Lace compare to PhpOpenChat and other jabber clones...
By the way, I just did a google search and found out there are other AJAX based chat programs out there, just thought that some of you might want to check them out:
http://ajax.phpmagazine.net/2006/02/ajax_powered_chat_applications.html
I also found that it's not too hard to "replace" the build-in Moodle chat engine with the lace engine, you just have to modify the /mod/chat/view.php and point to your lace installation like this (search for the link_to_popup_window).
I'm working on a better integration, and would like to know if anyone in the community is also working on a AJAX based solution (using XMLHttpRequest) to replace the original Moodle chat module?? Thanks!
http://ajax.phpmagazine.net/2006/02/ajax_powered_chat_applications.html
I also found that it's not too hard to "replace" the build-in Moodle chat engine with the lace engine, you just have to modify the /mod/chat/view.php and point to your lace installation like this (search for the link_to_popup_window).
I'm working on a better integration, and would like to know if anyone in the community is also working on a AJAX based solution (using XMLHttpRequest) to replace the original Moodle chat module?? Thanks!
Just thought that I would report to the community, that the lace probably is not the right solution for Moodle.
It seems that there is not _easy_ solution to open up multiple Lace chat room windows (based on chatroom_ID), although there are ways:
The most straight forward way to do this has only 1 constraint: there
must be a known number of rooms, each pre-installed with Lace. If you
need a variable number of rooms, it gets more complicated.
For each room that you need, create a seperate installation of Lace as
a subdirectory of some parent directory. If you need 20 rooms, you
need 20 Lace installs. Here's an example:
http://www.somesite.com/lace <-- parent
http://www.somesite.com/lace/room1
http://www.somesite.com/lace/room2
...
http://www.somesite.com/lace/room{n}
Then, in the parent directory, you'll need to fashion up a script that
will send people to the proper room based on some GET or POST
variable. Here's a very basic (untested) GET example:
<?php
$roomRoot = "http://www.somesite.com/lace";
$rooms = array('room1, 'room2', ... , 'room{n}');
if (in_array($_GET['room'], $rooms))
{
header('Location: '.roomRoot.'/'.$_GET['room']);
}
else
{
echo 'Invalid room.';
}
?>
It seems that there is not _easy_ solution to open up multiple Lace chat room windows (based on chatroom_ID), although there are ways:
The most straight forward way to do this has only 1 constraint: there
must be a known number of rooms, each pre-installed with Lace. If you
need a variable number of rooms, it gets more complicated.
For each room that you need, create a seperate installation of Lace as
a subdirectory of some parent directory. If you need 20 rooms, you
need 20 Lace installs. Here's an example:
http://www.somesite.com/lace <-- parent
http://www.somesite.com/lace/room1
http://www.somesite.com/lace/room2
...
http://www.somesite.com/lace/room{n}
Then, in the parent directory, you'll need to fashion up a script that
will send people to the proper room based on some GET or POST
variable. Here's a very basic (untested) GET example:
<?php
$roomRoot = "http://www.somesite.com/lace";
$rooms = array('room1, 'room2', ... , 'room{n}');
if (in_array($_GET['room'], $rooms))
{
header('Location: '.roomRoot.'/'.$_GET['room']);
}
else
{
echo 'Invalid room.';
}
?>