<?php
define("IN_MYBB", 1);
// use this require if you mybb is sitting at forum folder
//require_once ($_SERVER{'DOCUMENT_ROOT'}."forum/global.php");
// use this require if mybb is sitting at the root of the server folder.
require_once ($_SERVER{'DOCUMENT_ROOT'}."/global.php");
if(isset($mybb->user['username']) && $mybb->usergroup['title'] !== "Unregistered")
{
$username= $mybb->user['username'];
}
else
{
$username= "";
}
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "Quick chat";
$params["nick"] = $username;//"guest".rand(1,1000); // setup the intitial nickname
$params["isadmin"]= $mybb->usergroup['title'] == "Administrators" ? TRUE : FALSE;
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = false;
$chat = new phpFreeChat( $params );
?>
But it's nothing happen, i still loggon guest. MyBB has installed on "http://www.example.com/forum/" , and phpFreechat on"http://chat.example.com". What is i must to change for this issue?
Thank you for your information