Log in

View Full Version : Assistance With non-vb pages


Orlandu
01-06-2003, 02:40 AM
On my index page, http://www.ffalexandria.com, I want it to say "Welcome back, $user" or "Welcome guest, to Alexandria" if they are a guest. I thought by including ("forums/global.php"); this would work:

if ($bbuserinfo[userid]!=0) {
$username=$bbuserinfo[username];
$welcome="Welcome back, $username.";
} else {
$welcome="Welcome guest, to Alexandria.";
}

But it doesn't, keeps giving me this error:
Warning: Unable to access ./admin/config.php in /sites/ffalexandria.com/www/forums/global.php on line 129

All I want it to do is say their username if their logged in, what do I need to do?

EDIT: It doesn't work, but it will say "Welcome guest". But it says that for everyone, even though you are logged in.

Mark Hewitt
01-06-2003, 09:42 AM
global.php is assuming it is being called from the directory below the forums directory


//load config
require('./admin/config.php');


If you change that to an absolute path it may work (I have not tested this)

Orlandu
01-06-2003, 03:28 PM
I just put it as

//load config
require('http://www.ffalexandria.com/forums/admin/config.php');


and this gives me this error:
Warning: php_hostconnect: connect failed in /sites/ffalexandria.com/www/forums/global.php on line 129

flup
01-06-2003, 03:31 PM
Welcome guest, to Alexandria.

This is what i see when i visit...

Orlandu
01-06-2003, 03:33 PM
I know, but I am logged in and it still says that. So its not getting the $bbuserinfo[username] right.

EDIT: I changed the include on my index page to a full path to the forums, and it doesn't give me an error anymore. Although it still doesn't say "Welcome back, $username" if you are logged in.

Mark Hewitt
01-07-2003, 01:01 PM
Um yeah. Just tried something similar and I get the same. Doesn't seem to work if you include global.php when the file is out side of the main forums directory :(