- Code: Select all
10:05:50 * admin joins Lobby
27/03/2008 10:05:59 ‹admin› hello
27/03/2008 10:06:03 ‹admin› I am back
27/03/2008 10:06:06 ‹admin› on my site
27/03/2008 10:06:10 ‹admin› checking for errors
27/03/2008 10:07:03 * admin joins Lobby
27/03/2008 10:07:09 ‹admin› hi there
27/03/2008 10:07:12 ‹admin› me again
27/03/2008 10:07:19 ‹admin› using a different browser
27/03/2008 10:07:22 ‹admin› no errors so far
Here is how I'm pulling in the chat (it's an iframe so the the prototype you are using doesn't collide with my mootools.. error happens whether I hit the iframe page directly or not):
- Code: Select all
require_once "../chat/src/phpfreechat.class.php"; // adjust to your own path
$params["serverid"] = md5(__FILE__);
$params["refresh_delay"] = 2000; // 2000ms = 2s
$nick = $logged_in ? $user['username'] : "Guest";
$nick = $user['ID'] == 1 ? "admin" : $nick;
$params['isadmin'] = $user['ID'] == 1 ? true : false;
$params["nick"] = $nick; // it can be useful to take nicks from a database
$params['frozen_nick'] = true;
$params["channels"] = array('Lobby');
$params['skip_proxies'] = array('log');
$chat = new phpFreeChat($params);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Untitled</title>
<meta name="generator" content="BBEdit 8.2" />
</head>
<body>
<?
$chat->printJavascript();
$chat->printStyle();
$chat->printChat();
?>
</body>
</html>