I installed the [url=http://mibew.org/]webim live support script very easily. While it's not exactly what you have in mind, any chat script should work just as well. A few snippets to load the script only if the user is logged in, and to supply user data to the chat script, were no trouble at all.
Here are a few you might find interesting http://www.jquery4u.com/widgets/10-crazy-jquery-chat-chat-box-plugins/
<?php
if($_SESSION['webValidated'] == 1) {
$name = $_SESSION['webShortname'];
$email = $_SESSION['webEmail'];
$chunkArr = array(
'name' => $name,
'email' => $email
);
$output = $modx->parseChunk('chatbox', $chunkArr, '[+', '+]');
}
return $output;
?><div id="chatbox">
<!-- webim button --><a href="/webim/client.php?locale=en" target="_blank" onclick="if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 && window.event.preventDefault) window.event.preventDefault();this.newWindow = window.open('/webim/client.php?locale=en&url='+escape(document.location.href)+'&referrer='+escape(document.referrer)+'&name='+escape('[+name+]')+'&email='+escape('[+email+]'),'webim','toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=723,height=512,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><img src="/webim/b.php?i=simple&lang=en" border="0" alt=""/></a><!-- / webim button -->
</div>[[!Profile]] $name = [[+username]];
<?php
$name = $modx->user->get('username');
return $name;
?>
<div id="chatbox">
<!-- webim button -->
<a href="webim/client.php?locale=en" target="_blank" onclick="if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 && window.event.preventDefault) window.event.preventDefault();this.newWindow = window.open('webim/client.php?locale=en&url='+escape(document.location.href)+'&referrer='+escape(document.referrer)+'&name='+escape('[+name+]'),'webim','toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=723,height=512,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><img src="webim/b.php?i=simple&lang=en" border="0" alt=""/></a>
<!-- / webim button -->
</div>
<html> <head> <title>[[++site_name]] - [[*pagetitle]]</title> <base href="[[++site_url]]" /> </head> <body> [[!chatusername]] [[$chatbutton]] [[*content]] </body> </html>
&name='+escape('[+name+]'),&name='+escape('[[+name]]'),<html> <head> <title>[[++site_name]] - [[*pagetitle]]</title> <base href="[[++site_url]]" /> [[!chatheader]] </head> <body> [[!chat]] [[*content]] </body> </html>
<?php
require_once "chat/src/phpfreechat.class.php";
$name = $modx->user->get('username');
return $name;
$params = array();
$params["title"] = "Quick chat";
//$params["nick"] = "guest".rand(1,1000); // setup the intitial nickname
$params["nick"] = $name;
//$params['firstisadmin'] = true;
//$params["isadmin"] = true; // makes everybody admin: do not use it on production servers ;)
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = false;
$chat = new phpFreeChat( $params );
?>
<?php
$chat->printChat();
if (isset($params["isadmin"]) && $params["isadmin"])
{
echo '<p style="color:red;font-weight:bold;">Warning: because of "isadmin" parameter, everybody is admin. Please modify this script before using it on production servers !</p>';
}
?>