kopfnick
12-22-2005, 11:08 AM
Hi,
I already posted this at vbulletin.com but still can?t get any solution. So please bear with me, it?s driving me nuts! Lost 2 days already...
just recently converted our 170.000 posts phpBB to vBulletin and absolutely love it so far (conversion with impex went really smooth and the template and plugin system are priceless!). I just have one small problem:
I cannot seem to use "$vbulletin->userinfo['userid']" in an include inside the forum. It is always empty.
Explanation (simple version ):
I include a file (blah.php) throughout the site, in this file i have
<?
echo $vbulletin->userinfo['userid'];
?>
Outside the forum, i additionally have included the global.php:
chdir($_SERVER['DOCUMENT_ROOT'].'/forum/');
require('./global.php');
chdir($_SERVER['DOCUMENT_ROOT']);
Inside the forum, i included the file with a plugin:
Hook: global_start
ob_start();
include('path/to/blah.php);
$blah= ob_get_contents();
ob_clean();
include other stuff;
ob_end_clean();
and then output it in the first line of the header (templates system):
$blah
Everywhere on our site, i get an output of my userid, just inside the forum the variable is empty and outputs nothing.
How can i get it to echo my userid?
(Longer explanation: I use a small login-thingie in the menu, which i can?t get to work in the forum. i am logged in in the normal login box, but not in the menu )
thanks in advance,
kopfnick
PS.:Site can be found at www.hiphop.at/start, you can see the login box in the menu.
I already posted this at vbulletin.com but still can?t get any solution. So please bear with me, it?s driving me nuts! Lost 2 days already...
just recently converted our 170.000 posts phpBB to vBulletin and absolutely love it so far (conversion with impex went really smooth and the template and plugin system are priceless!). I just have one small problem:
I cannot seem to use "$vbulletin->userinfo['userid']" in an include inside the forum. It is always empty.
Explanation (simple version ):
I include a file (blah.php) throughout the site, in this file i have
<?
echo $vbulletin->userinfo['userid'];
?>
Outside the forum, i additionally have included the global.php:
chdir($_SERVER['DOCUMENT_ROOT'].'/forum/');
require('./global.php');
chdir($_SERVER['DOCUMENT_ROOT']);
Inside the forum, i included the file with a plugin:
Hook: global_start
ob_start();
include('path/to/blah.php);
$blah= ob_get_contents();
ob_clean();
include other stuff;
ob_end_clean();
and then output it in the first line of the header (templates system):
$blah
Everywhere on our site, i get an output of my userid, just inside the forum the variable is empty and outputs nothing.
How can i get it to echo my userid?
(Longer explanation: I use a small login-thingie in the menu, which i can?t get to work in the forum. i am logged in in the normal login box, but not in the menu )
thanks in advance,
kopfnick
PS.:Site can be found at www.hiphop.at/start, you can see the login box in the menu.