myHybridcar.com
02-14-2009, 06:41 PM
I'm attempting to access $vbulletin when outside the forum directory. The following code works when the user is logged in, but for some reason if the user is not logged in the script starts outputting HTML as if I were loading a forum page. What's going on? Thanks :)
// check if logged in
if (!$vbulletin)
{
$phrasegroups = array();
$specialtemplates = array();
$globaltemplates = array();
$actiontemplates = array();
$cwd = getcwd();
chdir ('/home/myhybrid/www/forums/');
require_once('./global.php');
global $vbulletin;
chdir ($cwd);
}
// if not logged in, show login form
if (!$vbulletin->userinfo['userid'])
{
// show login form
}
// check if logged in
if (!$vbulletin)
{
$phrasegroups = array();
$specialtemplates = array();
$globaltemplates = array();
$actiontemplates = array();
$cwd = getcwd();
chdir ('/home/myhybrid/www/forums/');
require_once('./global.php');
global $vbulletin;
chdir ($cwd);
}
// if not logged in, show login form
if (!$vbulletin->userinfo['userid'])
{
// show login form
}