The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
userinfo vars
I am having a hell of a time trying to get the userinfo['userid'] and userinfo['username'] variables from vbulletin. I have attached my code to sho how I am trying to do it. I am trying to use the variables on a page outside of the forum directory.
the result printed out is "0,Unregistered". I know for a fact that I am logged in. Does anyone see anything I am doing wrong??? Code:
chdir('/home/mysite/public_html/connect'); require_once('./global.php'); $id = $vbulletin->userinfo['userid']; $name = $vbulletin->userinfo['username']; echo $id, $name; |
#2
|
||||
|
||||
May have better luck in this forum:
https://vborg.vbsupport.ru/forumdisplay.php?f=111 |
#3
|
|||
|
|||
I've had this problem when I was creating my custom portal. Things you should remember: Cookies need to be set, try logging in from the forums and then going back to that page with a CRT+F5. (Hard Refresh)
Make sure all paths in your HTML is correct. vBulletin default template point to URL like so: Code:
<script type="text/javascript" src="clientscript/vbulletin_global.js"></script> <script type="text/javascript" src="clientscript/vbulletin_menu.js"></script> HTML Code:
<script type="text/javascript" src="$vboptions[bburl]/clientscript/vbulletin_global.js"></script> Edit: This might help, adding a slash... PHP Code:
PHP Code:
|
#4
|
||||
|
||||
This forum category is not for posting questions.
|
#5
|
|||
|
|||
So sorry trigunflame!!!!!!
|
#6
|
|||
|
|||
thepomonacow, Just ignore those who have enough time to correct your posting abilities, but not enough time to answer the threads question. I reported the thread to the staff asking them to move it when you first posted this. Not everyone understands that people make mistakes. Anyway, did my post above happen to help at all?
|
#7
|
||||
|
||||
Check your vB cookie settings, you may have specified the cookies for a certain folder.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|