For the last 3 weeks I've been working on an embedded chat widget for my Moodle 1.9.7 site. I am sure that it can be easily modified to suit Moodle 2.x.
I call this modified chat, "FreeEmbedChat".
II. IMPROVED FEATURES ON THE CHAT
Here's what my improved chat can do:
1. Direct Login (integrated with Moodle username)
It takes the Moodle username login as the chat username automatically 2. Posting of Images direct
You can copy and paste in an image URL
and the image appears on the Chat post directly.
3. Posting of embedded Youtube videos
You can copy and paste in a youtube URL and the youtube video appears on the Chat post directly.
Note: it requires a basic [b] <youtube url> [/b] post to embed the playable Youtube video inside the chat post
4. Embed Voicethreads
You can embed Voicethreads inside your chat post.
Chat post syntax: [[vt:value]]
The abovementioned features are NOT found in the stock downloadable version of PHPfreechat.
I'm trying to think of other useful Web 2.0 objects that would be useful if embedded in a chat. Does anything come to your mind?
III. DEMO SITE FOR YOU TO HAVE A FEEL HOW IT WORKS
For a working demo, please check out my production site athttp://scm.moodleace.com/course/view.php?id=44
Click on the PHPFreeChat green collapsible topic tab.
I'm also attaching 2 screenshots of this new improved phpfreechat widget.
IV. PEDAGOGICAL VALUE
Does this Chat have any learning value? I believe it has.
I think that it might be a useful activity (almost akin to the Wiki) where a classroom of students can share posts of images, Youtube videos and VoiceThreads inside the chat window.
, phpfreechat is a galaxy on its own. See http://www.phpfreechat.net
. For example, you can issue the command /join baseball
and a new room tab is created. So multiple rooms can be created. There's also the whole slew of chatroom commands ala mIRC (harkening back to the good old days of chat - the 1990s!). Although one should be cautious of chat in the classroom, I think it might have some pedagogical value. I'm not sure how it will fare with 20 or more users on other Linux servers.
V. WISH LISTS AND FREE SOURCE CODE
This souped up, pimp-my-ride chat was created from Moodle php and phpfreechat code. So I am also releasing the code to others to improve upon it.
IS ANYONE INTERESTED?
I'm still testing it, AND I'll be releasing the FULL PHP code to ALL MOODLERS EVERYWHERE for download
from my Blog
in a couple of days. If I could make the code available on Moodle.org, it would be even better.
Wish Item A
I would want my Chat to work with TeacherTube video embeds. The code to do it does exist in my php source code files, but the TeacherTube embed does not work due to outdated embed syntax - TeacherTube has changed its embed code syntax from previously, I think.
Right now, to embed an image, you just type in the image's URL and hit the send button. As in http://url/filename.png
Wish Item B
and have the video embed itself in the chat stream.
Wish Item C
Also I would LOVE to have the user just copy and paste the Voicethread URL, as in
and have the embed appear inside the chat stream.
Wish Item D
In addition, there should still be a way to post links to Youtube and Voicethread and make them appear as clickable text hyperlinks on the chat post. Perhaps one would have to type a prefix tag to signal that the chat post is an actual link:
in otherwords, I want to dispense with any tags when posting Web 2.0 objects. The aim is to allow the user to paste in Web 2.0 URLs in the most user-friendly and convenient manner possible. The above wish items are achievable if you undersand how to use the PHP functions preg_replace() and preg_match() and preg_match_all(). Example codes are:
$voicethread_site = preg_replace('/http:\/\//','',$voicethread_site);
preg_match_all('/\[\[vt.*?)(\|(.*?))?\]\]/s'.$u, $text, $list_of_movies);
$ret = preg_replace("#(^|[\n \]])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#ie", "'\\1<a href=\"mailto:\\2@\\3\">' . pfc_shorten_url('\\2@\\3') . '</a>'", $ret);
Any PHP programmers want to contribute to this project?
if those 3 lines of code did not give you a splitting headache, then you are the right person to make FreeEmbedChat better.
VI. FINAL THOUGHTS
Since the Chat code is heavily dependent on OBJECT EMBED code like
$replace = '<div id="voicethread-container">'.
$headertext . '<br>' .
'<object width="320" height="240"> '.
'<param name="movie" value="http://'.$voicethread_site.'/book.swf?b='.$movie->reference.'"></param> '.
'<param name="wmode" value="transparent"></param>'.
'<embed src="http://'.$voicethread_site.'/book.swf?b='.$movie->reference.'" type="application/x-shockwave-flash" wmode="transparent" width="800" height="600"></embed>'.
..there may be security issues (hacking, code injecting and other nasty, irritating stuff) or compatibility/poratability issues (some admins may turn off the Object embed feature on their Moodle site). I need some advice on this. Anyone?
Finally, I hope you can also contribute to this chat code to make it better. If you end up using it on your Moodle site, that would be meat and drink enough for me.