This is what I did. It is extremely dirty and I cannot recommend it. But it works for my wife and I, and this is the beaty of open source, you can even mutilate the software.
1 Downloaded phpfreechat and put this inside my egroupware folder.
2 Inserted this in the same dir as chat.php
<?php
require_once dirname(__FILE__).'/phpfreechat/src/phpfreechat.class.php';
$params = array();
$params["serverid"] = md5("your_servername_here");
$params["title"] = "Chat to online users";
$params["height"] = "120px";
$params["showsmileys"] = false;
$params["displaytabclosebutton"] = false;
$params["theme"] = "msn";
$params["display_ping"] = false;
$params["channels"] = array("Public room");
$params["nick"] = $_SESSION[egw_info_cache][user][account_firstname];
$params['admins'] = array('adminname' => 'adminpasswd');
$params["max_msg"] = 10;
$params["shownotice"] = 0;
$chat = new phpFreeChat($params);
if($_SESSION[egw_info_cache][user][account_primary_group] == -1){
print("
");
$chat->printChat();
print("
");
}
?>
3 Made symlinks to this file and phpfreechat from every app dir that I want to show a chat window
4 Inserted this at line 674 of class.idots_framework.inc.php (inside phpgwap/templates/idots:
$lastdir = array_pop(split(’/’, getcwd()));
if($lastdir == ‘egroupware’){
include_once(‘chat.php’);
} elseif($lastdir != ‘gallery’){
include_once(’…/chat.php’);
}
5 downloaded dojo to my server and added this to my egroupware dir
6 Added this to the head of head.tpl (inside phpgwapi/template/default):
<script type="text/javascript">
dojo.require("dojox.layout.FloatingPane");
function createFloatingPane(divId, title, x, y, width, height) {
var pane = new dojox.layout.FloatingPane({
'title': title,
'id': divId + "_floater",
'closeable': true,
'resizable': true,
'dockable': false
}, divId);
// quick fix for positioning, does not seem necessary in source code
// example (FloatingPane test), but was necessary with dojo bin and
// Firefox 3.0.1
pane.domNode.style.right = x + "px";
pane.domNode.style.bottom = y + "px";
pane.resize({ 'w': width, 'h': height });
pane.startup();
return pane;
}
function load() {
var floatingPane = createFloatingPane("chatter", "<b>Drag me</b>", 10, 140, 500, 100);
floatingPane.bringToTop();
}
dojo.addOnLoad(load);
</script>
Again, this is a dirty hack but it works…