1 (edited by miba 2008-12-16 07:01)

Topic: Integration to PhpFreechat - Retrieving Cookie From PunBB Fail

Hello all,

i would like to know how to retrieve cookie to get username in pubbb 1.3.

Prior to punBB 1.3, we normally use the following code to integrate with phpfreechat

  1. session_start();
  2. if (!isset($_SESSION['punbb_to_pfc_nickname']))
  3. {
  4.   define('PUN_ROOT', dirname(__FILE__).'/forum/'); // adjust this path to your forum installation root
  5.   require PUN_ROOT.'include/common.php';
  6. $userdata = array();
  7.   check_cookie($userdata);
  8.   if ($userdata['username'] == 'Guest')
  9.    $userdata['username'] .= rand(1,1000); // generate a random guest username
  10.   $_SESSION['punbb_to_pfc_nickname'] = $userdata['username'];
  11. }


Our problem/error is on line 7. check_cookie($userdata); -function check_cookie not exist in PunBB 1.3


Any advice on how to continue this integration ?


Thanks

Re: Integration to PhpFreechat - Retrieving Cookie From PunBB Fail

There is function "cookie_login" in "<FORUM_ROOT>/include/functions.php", not "check_cookie"

3

Re: Integration to PhpFreechat - Retrieving Cookie From PunBB Fail

Thanks for quick reply.

I hv tried it but got the following message;

undefine index for 'username'


Any advice ?

4

Re: Integration to PhpFreechat - Retrieving Cookie From PunBB Fail

however.

is there a  simple way to retrieve username punbb form cookie ?

5

Re: Integration to PhpFreechat - Retrieving Cookie From PunBB Fail

come on guys,

any suggestions ?:(