The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
accessing bbuserinfo from plugged in include
Hi all, I've looked at some examples by searching but nothing seems to work so I think it might be different for my set up.
I have included via the plugin system and file called leftnav.php and on this when one of the vb pages is displayed I want to display the links from the navbar area of vbulletin, links such as user cp and faq etc. My questions is though how can I check if the current user is logged in or not, so I can display the register and todays posts links instead. I have tried to access the bbuserinfo array and nothing outputs. I have included leftnav.php via plugin system in the header template, so I believe everything in global.php should be available anyhow. Please help, any thoughts appreiciated. |
#2
|
||||
|
||||
Quote:
$vbulletin->userinfo['userid']; ie if ($vbulletin->userinfo['userid']) { //logged in } HTHs |
#3
|
|||
|
|||
Good Man, it worked perfectly. Just do a print_r($vbulletin->userinfo) to get a look at the name of everything I need.
This is more of a php questin than a vb question. But I wonder how i would convert the $vbulletin->userinfo[] array into just the individual variables, so I could infact access them through say $userid $username and similar. Not really important but helpful if it could be done. Thanks again for your help. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|