2
mouacy - I haven't tried this code but I believe it should be changed to something like this:
global $xoopsConfig;
$xoopsOption['pagetype'] = "user";
include "../mainfile.php";
include "../header.php";
if (empty($xoopsModuleConfig['anonpost']) && !is_object($xoopsUser)) {
redirect_header("../index.php", 0, _NOPERM);
exit();
}
$user_name = $xoopsUser->getVar("uname");
//phpfreechat script begins
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["nick"] = $user_name;
$params["serverid"] = $xoopsConfig['session_name'];
$chat = new phpFreeChat( $params );
$chat->printJavascript();
$chat->printStyle();
$chat->printChat();
//include XOOPS footer
include "../footer.php";
?>
I included the 'global $xoopsConfig' (line 2) and changed your $params["serverid"] equate to use the XOOPS session_name. I think this will do what you want.