simple ajax chat

simple ajax chat

by John St -
Number of replies: 10
I made a simple ajax chat to replace the one(s) moodle came with. Quick and dirty but it seems to work okay. Uses divs instead of frames and the messages and users auto-refresh. Messages are also posted without page refresh.

Unpack the files, go to mod/chat/gui_basic and upload the files (back up old ones first ;) ). Then, include jquery in your header template file.

Finally visit your chat (version without frames, etc) and try it out. Probably not suitable for chats with huge numbers of concurrent chatters... but fun to play with anyway. This isn't production ready, just an experiment, I'm working on including tinymce, etc.

edited to add- it uses all of the php code of the default chat system, so from that perspective it is the same. I just split the file up for inclusion via ajax...
Average of ratings: -
In reply to John St

Re: simple ajax chat

by Girish Nediyadath -

Hi,

I created an ajax enabled chat module (already implemented in production with about 1500 users).  I have some queries regarding moodle chat.

1. Is it possible to have moodle chat module as a separate application without attached to any courses?

2. Is there any known limitations?

3. Too many frame refreshes might make it slow.  How is moodle chat performance in production?

Best

Girish

In reply to John St

Re: simple ajax chat

by Zaw Tun Naing -
Hi John,
You mean header.html in current theme? I am just beginner level moodle developer . thanks for your help.

In reply to Zaw Tun Naing

Re: simple ajax chat

by John St -
Zaw,

That is pretty old. I have a more fully developed version here:

http://moodle.org/mod/data/view.php?d=13&rid=3823
In reply to John St

Re: simple ajax chat

by Zaw Tun Naing -
Thanks, for your help. I dont know why this link not allow to me enter the said. Got some error
In reply to John St

Re: simple ajax chat

by Paulo Domingues -

I installed and works fine but with one curious problem: it repeats the many post, sometimes more than three times.

Any ideas what can cause this?

thanks.

In reply to Paulo Domingues

Re: simple ajax chat

by d morte -

I'm running into the same problem... also, when I have debugging turned on I get a few errors:

Notice: Undefined index: getcourse in /moodle/mod/chat/gui_header_js/bmess2.php on line 89

Notice: Undefined property: stdClass::$open_header_containers in /moodle/lib/weblib.php on line 3058

Notice: Undefined property: object::$strtimeT in /moodle/mod/chat/gui_header_js/bmess2.php on line 121


No messages were found

In reply to John St

Re: simple ajax chat

by Francisco Cabrera -

Hi,

I have noticed that this chat works fine when you are using "Internet Explorer".

But if you are working under "windows" you have problems with MOZILLA FIREFOx

and GOOGLE CHROME.

Under MAC OS it works preatty good