I did a little integration into MODx.
Use this code as a snippet
<?php
// Define default module path
$modulePath = 'assets/modules/phpfreechat';
// Include required file
require_once rtrim($modulePath, '/')."/src/phpfreechat.class.php";
// Define necessary parameters for phpFreeChat
$params = array();
$params["nick"] = "guest".rand(1,10); // setup the intitial nickname
$chat = new phpFreeChat($params);
// Outputing necessary html to the page
$modx->regClientStartupScript($chat->printJavascript(true), true);
$modx->regClientStartupScript($chat->printStyle(true), true);
$chat->printChat();
?>
From the code itself, it’s a really flexible code, and we can easiliy integrate it into our MODx, but the only reason I haven’t, I’m waiting for the first stable release from them, and I also need to work on our users system first.
Check back with me, I will make an update in this forum, when I got this thing started, but for now I will leave it postpone for a while, until I’m done with my job getting some other things done.
FYI, I just remember that the script required version 0.7, or it won’t be able to work. Notice the last parameter for outputing the chat in return statement instead of echoing.
Sincerely,