The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Accessing user data outside of VB
Hi,
I am currently access VB user data outside of the forum software by including global.php These are the variables I am referencing: $vbuserid = $vbulletin->userinfo['userid']; $vbusername = $vbulletin->userinfo['username']; $vbpmtotal = $vbulletin->userinfo['pmtotal']; $vbpmunread = $vbulletin->userinfo['pmunread']; $vblogouthash = $vbuserid > 0 ? $vbulletin->userinfo['logouthash'] : ""; My questions is, is there a lighter way to do this. It seems that reading in the entire global.php isn't necessary for what I need. Also, I am running into a problem where a session_start() in the /forum/includes/facebook/facebook.php is interfering with my files outside of VB, so I'd like to just grab the $vbulletin->userinfo and cut out all the other stuff. Any suggestions? |
#2
|
||||
|
||||
You can try just getting init.php instead of global.php. It may work fine.
|
#3
|
|||
|
|||
SWEET!! That worked, and is so much lighter weight.
The only thing I needed to add on was to define VB_AREA before including init.php define('VB_AREA', 'Forum'); Thanks! |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|