The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
New PHP File - Pulling Logged-in User ID?
I am trying to make a custom .php page for my site, and have the basics working (PHP file linked to template and displaying okay).
I am trying to pull some fields by linking to the currently logged-in user's UserID. In my select portion I am trying to have it pull the info using $bbuserinfo[userid] and $userinfo[userid], but neither is working. I have also tried setting a variable to the above, and referencing the variable in the query, but that doesn't work either. Is there a way to do this? I'm so sorry for the newbie-ish question! |
#2
|
||||
|
||||
If you want to pull the info of the person viewing the page, you would use $bbuserinfo. In order to use it though, you need to have global.php included in the page. See these articles - How to create your own vBulletin-powered page! (uses vB templates) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc.
|
#3
|
|||
|
|||
Many thanks! I had already tried one of those tutorials, but it apparently wasn't pulling the correct things. That error has been sorted out, now onto the actual coding!
|
#4
|
|||
|
|||
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|