I wanted to use the SMF<->PhpFreeChat Bridge.
I did make an new index.php as mentioned in other Threads here. The only thing i see. Is a blank Page with this Source Code:
- Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Title</title>
</head>
<body>
</body>
</html>
This is my index.php:
- Code: Select all
<?php
/////////////////////////////////////////////////////////////////////////////////
// Include SSI.php. It is relative path! Chenge it for your path
require(dirname(__FILE__) . '/../SSI.php');
$user_info = ssi_welcome('array');
if (!$user_info['is_guest'])
{
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
/////////////////////////////////////////////////////////////////////////////////
$params = array();
// Some initializations are going here
// ......................................
// Setup user nickname
$params["nick"] = $user_info['is_guest'] ? "Guest-" . rand(1, 1000) : $user_info['name'];
// Other initializations are going here
// ......................................
/////////////////////////////////////////////////////////////////////////////////
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params["title"] = "T6Chat";
$params["max_msg"] = 21;
$params["clock"] = true;
$params["serverid"] = md5(__FILE__);
$params["language"] = "de_DE-informal";
$params["isadmin"] = false;
$params["theme"] = t6chat;
$params["btn_sh_whosonline"] = false;
$params["connect_at_startup"] = true;
$params["display_ping"] = false;
$params["startwithsound"] = false;
$params["shownotice"] = 0;
$params["nickmeta_private"] = array('ip');
$params["channels"] = array("T6Chat");
$params["frozen_channels"] = array("T6Chat");
$params["nickname_colorlist"] = array('#961616');
$params["bbcode_colorlist"] = array('961616');
$params["nickmarker"] = false;
$params["showsmileys"] = false;
$params["clock"] = true;
$params['admins'] = array('Nicole' => 'xxxx',
'Admin' => 'xxxxxx');
$params['skip_proxies'] = array('censor');
$chat = new phpFreeChat($params);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Your title is going here</title>
<?php
if (!$user_info['is_guest'])
{
$chat->printJavascript();
$chat->printStyle();
// Style sheet
echo '<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/style.css" />';
}
?>
</head>
<body>
<?php
if ($user_info['is_guest'])
{
// Some actions for not registered users are going here
}
else
{
$chat->printChat();
}
?>
</body>
</html>
The Chatscript is located in one subdirectiory of the SMF Installation.
I didnt use the SQL way to store the Chatmessages. The Script uses the Default Way. He stores his Message in Files.
Maybe i didnt see a tiny thing.
Any Help would be great.
Thanks in advance,
Blubbs