We could create a new chat module, as an alternative.
I will help you.
- AJAX technology is used to smoothly refresh (no flicker) and display the chat and nickname zone.
- Messages and nicknames are stored into a simple filesystem, so that server resources are saved as much as possible.
- Bandwidth is preserved because the server never transmits the same data twice, only new messages are transmitted.
- No problems with firewalls
- Bandwidth is preserved because the server never transmits the same data twice, only new messages are transmitted.
- No problems with firewalls
I don't mean to be overly negative, it is just that I have ten years of dissapointment and frustration with Javascript so I am very, very cautious when it is suggested and AJAX is a JavaScript based technology. Having said that I have switched to doing all my primary writing in the Google docs module and absolutely love the Google HTML chat system. Bear in mind that those Google folks are very, very smart. Ok OK so are the moodle folks (grins).
Marcus
I believe GOOGLE uses HTML with AJAX technology on their chat system. (if im not wrong?)
I hope others can share better idea to better improve Moodle chat system. (I'm being optimistic...)
General Features
- Skin support
- Multilangauge support
- Private Message Logging
- Custom and predefined status messages
- Offline Message support
- Private Chats between two members
- Full message styling, font, font size, font color, and font style
- Full profile
- Full settings panel
- Ability to ignore users
- User-level word filter -- Each user defines the words they want filtered
- Unlimited Number of Rooms
- Password Protected Rooms
- Public and Private Rooms
- Moderated Rooms (Only voiced members can speak)
- Message Logging
- Room-level word filter -- Each user defines the words they want filtered
- Ability to ban users from a specific room
- Ability to define room specific auto-link words (keywords)
- Operator, Voice and Mute list allows you to control who has what permissions in your room.
- Chat room logging
- Kicking and muting ability
- Invisibility
- Ability to ban users by IP, E-Mail and Username.
- Ability to ban for a certain time period or for forever
- Live news from us informs you when new updates or fixes are released
- Ability to mass-add smilies allows you to add tons of smilies at one time, quickly and easily.
- Mass mail ability allows you to E-Mail all of your members
- The Calender allows you to inform your members of group chats and other events
- The log managers allows you to manage all aspects of the chat script's logging functions
- The bandwidth panel allows you to limit that amount of bandwidth that each person can use each month.
- The bandwidth panel also allows you to view the current bandwidth usage of each member
- The room manager allows you to manage all the rooms on your server
- The user manager allows you to manage all of your user accounts
- The user group system makes editing permissions for groups of users incredibally easy
- Full control of permissions for all aspects of the chat server
- The word filter allows you to censor bad words
- The theme manager allows you to edit and delete existing themes as well as install new ones or create your own
- The settings panel allows you to modify all aspects of your chat server. Everything from the max number of characters in a username to the GD library is customizable
- Invision Board 1.X
- Invision Board 2.X
- Mambo 4.5.X
- MercuryBoard 1.1.X
- PhpBB 2.0.X
- PhpNuke 7.X
- PostNuke 0.075
- XMB 1.9
- SMF 1.X
- Xoops
- YabbSE 1.5.X
I think you are right, but one of the interesting thing about the google system is not that they have used AJAX, but that they have been very careful about how much AJAX they use. Thus they seem to have leveraged the ability to do refresh without an entire HTTP round trip, but they have managed to keep the "client" very small and responsive.
One way of getting an idea of how good the Google chat is by firing up the msn web client
(http://webmessenger.msn.com)
I do use that web client, but it is overblown and clumsy by contrast with the minimalist efficiency of the Google tool.
- A web browser: Microsoft Internet Explorer 5.0 or later, Netscape 7.1 or later, or Mozilla 1.6 or later, running in Microsoft Windows.
- An Internet connection (56 Kbps or faster recommended)
We really had trouble with moodle chat so I hacked together phpfreechat. Here is what I did. Take it for what it is worth (which isn't much). I did this about 6 months ago so I may be missing something.
moodle/mod/chat/phpchatfree/index.php
add to the top of the file (don't leave any spaces before or after <? ?>
<?php
require_once('../../../config.php');
$chatid = $_GET['id'];
$groupid = optional_param('groupid', 0, PARAM_INT); //only for teachers
if (!$chat = get_record('chat', 'id', $id)) {
error('Could not find that chat room!');
exit;
}
if (!$course = get_record('course', 'id', $chat->course)) {
error('Could not find the course this belongs to!');
exit;
}
/// Check to see if groups are being used here
if ($groupmode = groupmode($course, $cm)) { // Groups are being used
if ($groupid = get_and_set_current_group($course, $groupmode, $groupid)) {
if (!$group = get_record('groups', 'id', $groupid)) {
error("That group (id $groupid) doesn't exist!");
}
$groupname = ': '.$group->name;
} else {
$groupname = ': '.get_string('allparticipants');
}
} else {
$groupid = 0;
$groupname = '';
}
$strchat = get_string('modulename', 'chat'); // must be before current_language() in chat_login_user() to force course language!!!
$userid=$USER->id; // Set the user id for Moodle
global $chatid, $userid, $groupid;
// END MOODLE - Don't leave any space between the php indicators below or you will receive xhmtl error
?>
Then in the params for phpfreechat in the same index.php file, add
$params["serverid"] = $_GET['id']; // use moodle id for chat
You can also make the $USER->firstname and $USER->lastname variable from moodle the user name in phpchatfree if you like. Something like
$params["nick"] = $USER->firstname.' '.$USER->lastname;
It would be nice to add something that checks if the user entering the chat is an admin or teacher and adding "$params["isadmin"] = true;" if they are. I am currently just hacking this by using an array $admin_users:
$admin_users[0]='Jane Doe';
$admin_users[1]='John Smith';
foreach ($admin_users as $value) {
IF($value=="$USER->firstname $USER->lastname")
$params["isadmin"] = true; // just for debug ;)
}
}
----------------------------------------------------------------
in file moodle/mod/chat/phpchatfree/src/containers/file.class.php in the setMeta function below
// store the value in the memory cache
//@todo
// $this->_meta[$enc_type][$enc_subtype][$enc_key] = $value;
add the following so that it stores the messages in the moodle chat_messages table.
// MOODLE
IF($group=='channelid-to-msg'){
$pos1 = stripos($leafvalue,'send')+5;
$moodleleafvalue = substr("$leafvalue", $pos1);
$msg = &New stdClass;
$msg->chatid = $GLOBALS[chatid];
$msg->userid = $GLOBALS[userid];
$msg->groupid = $GLOBALS[groupid];
$msg->system = 0;
//$msg->message = addslashes($leafvalue); // have to undo the browser's encoding
$msg->message = addslashes($moodleleafvalue); // have to undo the browser's encoding
$msg->timestamp = time();
// Commit to DB
insert_record('chat_messages', $msg, false); // Moodle function
}elseif($group=='nickid-to-metadata' && $leaf=='nick'){
$msg = &New stdClass;
$msg->chatid = $GLOBALS[chatid];
$msg->userid = $GLOBALS[userid];
$msg->groupid = $GLOBALS[groupid];
$msg->system = 0;
$msg->message = 'enter';
$msg->timestamp = time();
// Commit to DB
insert_record('chat_messages', $msg, false);
}
//END MOODLE
--------------------------------------------------------------------
Lastly, in moodle/mod/chat/view.php look for
link_to_popup_window ("/mod/chat/gui_$CFG->chat_method/index.php?id=$chat->id$groupparam","chat$course->id$chat->id$groupparam", "$strenterchat", 500, 700, get_string('modulename', 'chat'));
and comment it out and add it with
link_to_popup_window ("/mod/chat/phpchatfree/?id=$chat->id$groupparam","chat$course->id$chat->id$groupparam", "$strenterchat", 700, 700, get_string('modulename', 'chat'));
I think I included everything here. This is a pretty bad hack but it will probably work ok if you need something quick.
Thanks
I am a novice when it comes to installation of Moodle but I just did it to prove a point! I can't program and I do not dare to tinkle with any codes etc. for fear that I might screw up the system.
My users face problems with the current chat (I have Moodle 1.84).
I tried Wiziq and found it good but for some reasons, I have not been able to log in after 7 pm my time (about 23:00 GMT).
I am looking at X7 Chat Lite at present to see if this will solve my problem.
Hey Chris,
It would be great to have phpfreechat turned into a module. I don't know what they plan to do with the chat in moodle but it is unusable for a large number of people so any alternative would be great.
Brian
The line
if (!$chat = get_record('chat', 'id', $id)) {
should read
if (!$chat = get_record('chat', 'id', $chatid)) {
Hello Moodle ajax chat thread.
I just came across this thread in a seach. I am devoloping an ajax chat system, that I believe is really good. Actually better than google html chat..
I would like very much to hear your comments and feedback about it .
There is a demo chat room here: www.basechat.com/demo1.aspx
I agree in what you write about using AJAX, its very effective but its really takes a lot of work to make it work perfect for all browsers. My system is not perfect, as it is not working for Opera.
Besides than you should be aware of server performarce even if you say AJAX does only send nessesary information, e.g. do not make a system that saves messages in files between sessions, use ram instead (and save message log to DB).
Best Regards.
Anders Both, Denmark - Germany.
I search a little and found 2 products that i think it´s not difficult to integrate with moodle
123flashchat
dimdim
The first i think that´s very easy to integrate, because has a phpnuke integration