How to apply phpbb admin and mods in phpfreechat too?
I saw a thread for phpbb2 but i am using phpbb3.
Thankyou
Moderators: OldWolf, re*s.t.a.r.s.*2
<?php
define('IN_PHPBB', true);
$phpbb_root_path = '../'; // See phpbb_root_path documentation
$phpEx = substr(strrchr(__FILE__, '.'), 1); // Set the File extension for page-wide usage.
include($phpbb_root_path . 'common.' . $phpEx); // include the common.php file, this is important, especially for database connects.
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
get_username_string ;
$oog = $user->data [username];
// redirect to phpBB logon page if the user is not logged in
if ($oog == "Anonymous")
{
header("Location: http://" . $_SERVER[SERVER_NAME] ."/ucp.php?mode=login&redirect=chat/");
}
$utz = $user->data['user_timezone']; // Get user's time zone information from phpBB3 account settings
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["container_type"] = "";
$params["container_cfg_mysql_host"] = "sql113.byethost13.co";
$params["container_cfg_mysql_port"] = 3306;
$params["container_cfg_mysql_database"] = "";
$params["container_cfg_mysql_table"] = "phpfreechat";
$params["theme"] = "default";
$params["container_cfg_mysql_username"] = "";
$params["container_cfg_mysql_password"] = "";
$params["nick"] = $user->data [username];
$params["channels"] = array("General","Boys","Girls","Friends","Singles","Love");
$params['admins'] = array('Azzam Malik' => '',
'Administrator' => '');
$params["frozen_nick"] = true; // do not allow to change the nickname
$params["isadmin"] = false; // just for debug
$params["language"] = "en_US";
$params["serverid"] = md5(survivorsresources);
$params["time_offset"] = $utz*60*60; // Sets user's time_offset to their timezone
$chat = new phpFreeChat( $params );
// Create the Chat HTML
$chat_html = $chat->printChat(true);
// Store the HTML in the template variables
$template->assign_vars(array('CHAT_HTML' => $chat_html));
// Lets build a page ...
page_header('Chat');
$template->set_filenames(array(
'body' => 'phpChat.html')
);
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
Return to phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)
Users browsing this forum: No registered users and 5 guests