- Code: Select all
- <?php
 define('IN_PHPBB', true);
 $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';
 $phpEx = substr(strrchr(__FILE__, '.'), 1);
 require($phpbb_root_path . 'common.' . $phpEx);
 
 // Start session management
 $user->session_begin();
 $auth->acl($user->data);
 $user->setup();
 
 if ($user->data['user_id'] == ANONYMOUS)
 {
 login_box('', $user->lang['LOGIN']);
 }
 // Output page
 page_header('Chat');
 $template->set_filenames(array(
 'body' => 'chatroom_body.html',
 ));
 require_once dirname(__FILE__)."/src/phpfreechat.class.php";
 $params = array();
 $params["title"] = "Chat de ForosCristianos.net";
 $params["nick"] = $user->data['username_clean'];
 $params['firstisadmin'] = false;
 if ($user->data['group_id'] == 4 OR $user->data['group_id'] == 5 OR $user->data['group_id'] == 9) // Admins and Moderators
 {
 $params["isadmin"] = true; // Do what you want cause a pirate is free, you are a pirate ;)
 }
 $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
 $params["debug"] = false;
 //Make admins and moderators chatroom operators
 if ($auth->acl_get('m_') || $auth->acl_get('a_'))
 {
 $params["isadmin"] = true;
 }
 $chat = new phpFreeChat( $params );
 // Send data to template
 $template->assign_vars(array(
 'S_CHATROOM' => $chat->printChat(true) . $warning)
 );
 page_footer();
 ?>
And here's the link to my chat: http://www.foroscristianos.net/chat/
If you'd like to log in, the tester username is "tester" and the password is "tester."
Any help will be greatly appreciated!

