• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Recovery admin rights for Administrators and Moderators

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
1 post • Page 1 of 1

Postby aunisien » Fri Dec 11, 2009 5:14 pm

Hello,

I try to interface with phpbb3 forum phpFreeChat, I integrated the header and footer of my forum but I can not get admin rights for Administrators and Moderators, this is my code, thank you for your answers

Code: Select all
<?php
/**
* @ignore
*/
define('IN_PHPBB', true);
//$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpbb_root_path = './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup(array('memberlist', 'groups'));
if ($user->data['user_id'] == ANONYMOUS)
    {
        login_box('', $user->lang['LOGIN']);
        }
//
// Whatever Parameters you need to set, goes here
//
$username = $user->data['username'];
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "ASR17.NET";
$params["nick"] = ereg_replace("[[:space:]]", "_", $username);
$params["nick"] = iconv("iso-8859-1", "UTF-8", $params["nick"]);
if ($user->data['user_id'] == ADMIN || $user->data['user_id'] == MOD) $params['isadmin'] = true;
//$params['admins'] = array('admin' => 'admin');
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params['max_displayed_lines'] = 50;
$params["theme"] = "default";
$params['timeout'] = 1000000;
$params['language'] = 'fr_FR';
//$params["debug"] = true;
$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();
?>
aunisien
New member
 
Posts: 2
Joined: Fri Dec 11, 2009 2:41 pm
Top

Post a reply
1 post • Page 1 of 1

Return to phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)

Who is online

Users browsing this forum: No registered users and 1 guest

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub