PDA

View Full Version : how to use vb exclusive variables outside vb directory


catalin8
10-03-2005, 08:43 PM
Hello everyone.

I've tried without success to use some of vbulletins variables outside vbulletins directory.

my forum is on forum.mydomain.com and I want to check, on one of the pages from mydomain.com, if the current visitor is logged on and if so find out his/her username

I've tried it using:
require('./forum/global.php');

if ($userinfo['userid']!=0) {
print "Welcom back," .$userinfo['username'];
}
else
{
// .... please login
}

1. what am I doing wrong
2. can I find somewhere a list of exlusive vb variables and what they contain ?

thank you

Andreas
10-03-2005, 08:45 PM
1) Cookies set by forum.mydomain.com by default are not readable by mydomain.com
2) It's $bbuserinfo (for vBulletin 3.0) or $vbulletin->userinfo (for vBulletin 3.5)

catalin8
10-03-2005, 09:43 PM
that was it, thank you Kirby

rahimt
10-25-2005, 04:06 PM
1) Cookies set by forum.mydomain.com by default are not readable by mydomain.com


is there a workaround? how to get the variables outside of the forum folder?
many thanks for any help!

Marco van Herwaarden
10-26-2005, 10:41 AM
Set the cookie domain to .mydomain.com (mind the leading dot). Try if that works.