I ended up putting the variable through the vbulletin variable cleaner which sorted things out nicely.
I'm able to log-in and out fine from any page with the includes, but when I attempt to use the user's name/id in the page then I don't get any result. I'm using the following code in the page:
Code:
$member_name = $vbulletin->userinfo['username'];
echo 'Hello there ' . $member_name;
And this is up at the top of the page:
Code:
<?php
$curdir = getcwd ();
chdir('/home/######/public_html/forum');
require_once('global.php');
chdir ($curdir);
include 'db.php';
global $db;
?>