• 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

help with punBB

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

Post a reply
4 posts • Page 1 of 1

Postby todhend » Wed May 19, 2010 12:59 am

the info in the fact is outdated on the pun set up, anyone have a working version for integrating phpfree with the latest punbb distro? I believe its version 1.34
http://nflpick.net free football picks
http://tdah.us free webmail script
todhend
Member
 
Posts: 83
Joined: Tue Jan 19, 2010 9:03 pm
Location: Missouri
  • Website
Top

Postby todhend » Fri May 21, 2010 5:28 pm

For version 1.34 the code below works



session_start();

if (!isset($_SESSION['punbb_to_pfc_nickname']))
{
if (!defined('FORUM_ROOT'))

define('FORUM_ROOT', dirname(__FILE__).'/../'); // adjust this path to your forum root relative to this file

require FORUM_ROOT.'include/common.php';

$_SESSION['punbb_to_pfc_nickname'] = $forum_user['username'];

if ($_SESSION['punbb_to_pfc_nickname'] == "Guest")
{
header("Location: http://tdah.us/pun/login.php"); // adjust this path to your forum login from http://
}

}

require_once "src/phpfreechat.class.php";
$params = array();
$params["title"] = "T-dah Support chat";

$params["nick"] = $_SESSION['punbb_to_pfc_nickname']; // setup the initial nickname

$params['firstisadmin'] = false;
$params["channels"] = array('Support');
$params["serverid"] = 'Tdah'; // this is the cache file name and chat ID
$params["debug"] = false;
$chat = new phpFreeChat( $params );



notice you might have problems with browser cache when logging out and back in, I couldn't get around this so far
Last edited by todhend on Fri May 21, 2010 5:31 pm, edited 1 time in total.
http://nflpick.net free football picks
http://tdah.us free webmail script
todhend
Member
 
Posts: 83
Joined: Tue Jan 19, 2010 9:03 pm
Location: Missouri
  • Website
Top

Postby todhend » Fri May 21, 2010 5:55 pm

to add a link to the chat in the forum to only logged in users look in header.php around the line 115 add this

$forum_head['chat'] = '<link rel="chat" href="./chat/index.php" target="_blank"'.$lang_common['Chat'].'" />'; //adjust this path to your chat index file

also /include/funtions.php around the line 452

$links['chat'] = '<li id="navchat"'.((substr(FORUM_PAGE, 0, 7) == 'chat') ? ' class="isactive"' : '').'><a href="'.forum_link("./chat/index.php" ).'">'.$lang_common['Chat'].'</a></li>'; //adjust this path to your chat index file
Last edited by todhend on Fri May 21, 2010 6:04 pm, edited 1 time in total.
http://nflpick.net free football picks
http://tdah.us free webmail script
todhend
Member
 
Posts: 83
Joined: Tue Jan 19, 2010 9:03 pm
Location: Missouri
  • Website
Top

Postby todhend » Mon May 24, 2010 1:10 am

I also had to add this statment just in case the forum logs you out but the chat session doesn't


if ($forum_user['username'] == "Guest")
{
header("Location: http://tdah.us/pun/login.php"); // adjust this path to your forum login from http://
}
http://nflpick.net free football picks
http://tdah.us free webmail script
todhend
Member
 
Posts: 83
Joined: Tue Jan 19, 2010 9:03 pm
Location: Missouri
  • Website
Top


Post a reply
4 posts • 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 5 guests

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