my script:
- Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = '/srv/www/htdocs/forum/phpBB3'; // adjust this path to your forum installation root
$chat_root_phpbbrealtive_path = '../../phpfreechat-1.3/index1.php'; // Chat url relative to phpBB root ;)
include( $phpbb_root_path . 'extension.inc' );
include( $phpbb_root_path . 'common.' . $phpEx );
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
// redirect to phpBB logon page if the user is not logged in
if ( !$userdata['session_logged_in'] )
redirect(append_sid($phpbb_root_path . "login.$phpEx?redirect=" . $chat_root_phpbbrealtive_path . "index.$phpEx", true));
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "chat op mijn website";
$params['admins'] = array('Bart' => '*******', 'Matthijs => ********');
//$params["nick"] = "guest".rand(1,1000); // setup the intitial nickname
//$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"] = true;
$params["language"] = "nl_NL";
$params["frozen_nick"] = true;
$params["nick"] = $userdata[username];
$params["theme"] = "msn";
$chat = new phpFreeChat( $params );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
</head>
<body bgcolor="0c3350">
<div class="content">
<?php $chat->printChat(); ?>
</body></html>
my forum index is :
- Code: Select all
/srv/www/htdocs/forum/phpBB3/index.php
and the chat is:
- Code: Select all
/srv/www/htdocs/phpfreechat-1.3/index1.php
THX