• 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

phpbb3 integration - params not being recognized, or lost

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

Post a reply
4 posts • Page 1 of 1

Postby bsoder » Thu Feb 21, 2008 8:12 pm

I'm having a heck of a time getting all the bits and pieces working correctly on my setup. I'm integrating with phpbb3, using code from another thread here.

For some reason, some of my params aren't cooperating. For example, at the moment, the channels list is only coming up with "My room" - the default, despite the fact that it's set in the list below. When I first set it up, that was working correctly; with nothing else changed, after a server restart it stopped working. I've tried deleting the data/private folder numerous times, I'm not sure where else that data could be stored.

Additionally, the lines below that, which set isadmin true if the user_id is 2, have the same problem. Was working before, and just... stopped.

How do I do a COMPLETE flush? If I delete data/private, it's obviously not getting it all. If I delete data/public (as mentioned somewhere else on the board), then it complains about the js files missing. What am I doing wrong?

Thanks

Code: Select all
<?php

define('IN_PHPBB', true);
$phpbb_root_path = '/app/domains/azwingnutz.org/www/htdocs/forum3/'; // 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://www.azwingnutz.org/forum3/ucp.php?mode=login");
    }
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"]           = "Arizona WingNutz Chat";
$params["channels"]        = array('WingNutz');
$params["nick"]            = iconv("ISO-8859-1", "UTF-8", $user->data['username']);
$params["frozen_nick"]     = true;     // do not allow to change the nickname
$params["isadmin"]         = false; // just for debug ;)
$params["serverid"]        = md5(phpfreechat); // calculate a unique id for this chat
$params["theme_path"]      = dirname(__FILE__)."/themes";
$params["theme"]           = "blune";

if ($user->data['user_id'] == 2)
{ $params["isadmin"] = true; }

$chat = new phpFreeChat( $params );

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>Arizona WingNutz</title>

 </head>
 <body>

<div class="header">
  <center><img src=http://www.azwingnutz.org/images/logo.mini.320x140t.gif></center>

</div>

<div class="content">
  <?php $chat->printChat(); ?>
</div>

</body></html>
bsoder
New member
 
Posts: 3
Joined: Wed Jul 04, 2007 12:03 am
Top

Postby bsoder » Thu Feb 21, 2008 8:56 pm

Now I have some people entering the chat who are getting the Nickname popup - should be blocked by the "nick" param - some are getting the "My room" default room, others are getting the "WingNutz" room that's specified in the "channels" param.
bsoder
New member
 
Posts: 3
Joined: Wed Jul 04, 2007 12:03 am
Top

Postby bsoder » Thu Feb 21, 2008 9:02 pm

On top of that, if I log inside index.php to a file, logging channels and nick, they're fine there - so I get a user with a nick of abcde from the forum, who gets the popup nick box on entering the chat, and uses a different nick, so they're under name xyz on the chat but still logging to the flatfile as their forum nick.
bsoder
New member
 
Posts: 3
Joined: Wed Jul 04, 2007 12:03 am
Top

Postby OldWolf » Thu Feb 21, 2008 11:40 pm

Firstly, there's absolutely no reason to remove anything involving the public folder.

You should only be removing the data inside private (without removing the .htaccess file).

Alternatively, a lot of times just typing "/rehash" into the chat will work much faster.

Make sure also that no one is connected when you're deleting those files or they'll just pop right back up.

In addition, I imagine the various errors you're getting have something to do with the params not passing correctly. All the things you're mentioning are the defaults for the params (if nothing is set).

Could I see a link to your chat please?

Also, please tack this right after your print chat:
Code: Select all
echo '<h2>Debug</h2>';
  echo '<pre>';
  $c =& pfcGlobalConfig::Instance();
  print_r($c);
  print_r($_SERVER);
  echo '</pre>';
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
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
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub