I'm trying to integrate a vb login form on my homepage but couldn't find no help so far.. even posted a question here last week but getting no answer. so I'm doing some experiments to find the way on my own...
For now, I'm having a test.php page which located at an upper directory of my forums, and include the forums' global.php file, just to be able to access the $vbulletin->userinfo data. However, $vbulletin->userinfo['userid'] always returns 0 as an Unregistered user even when I logged in.
I took the code to my local pc (running IIS) and it works just fine (of course I had to change the path due to Windows v.s Unix, but can't figure out why it doesn't work on my Unix host..
Here's a sort of my experiment code:
Code:
$curdir = getcwd();
chdir($curdir.'/forums');
require_once('./global.php');
//Use $bbuserinfo.
echo('userid: ' . $vbulletin->userinfo['userid']);
echo('userid: ' . $vbulletin->userinfo['username']);
chdir($curdir);
Also, everytime I access this test.php page, it kicks out my login status on vbulletin.
Please help
Thanks