I'm a noob at php so bare with me here. I have been working to integrate pfc with phpBB3. I've been following the session integration instructions on this site and on the phpBB website. I have PFC grabbing the nicknames successfully, yay


While it grabs the nickname correctly, it wont join the channel on the first visit to chat.
Eg. If i sign into phpBB and join chat, it connects to chat with my nickname, but no channel opens. If I refresh the page, then it joins the channel successfully, and everytime I refresh chat after that, it will join the channel successfully, like its suppose to. However, if i logout of phpBB and log back in, I get the same issue, I have to refresh chat once again before it will join the channel. As you see below in my code provided, the channel it should join is called "Public".
Any ideas anybody? Here is my Index.php code...
- Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "ChickenTalk.org Chat";
$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["frozen_nick"] = true;
$params["nick"] = $user->data['username'];
$params["theme"] = "msn";
$params["channels"] = array("Public");
$chat = new phpFreeChat( $params );
?>
Its a simple integration with phpBB, no redirect if the user is not logged in but I think I can handle doing that on my own. Thats not my issue. my issue is it wont join channel "Public" on first chat visit, i have to refresh. Any ideas anybody?