The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
showing userid on non-vbulletin page isnt working
why is this simple php script not working?
Code:
<?php chdir('./forums'); require_once('./global.php'); echo $vbulletin->userinfo['userid']; ?> |
#2
|
||||
|
||||
add this after your require_once line:
PHP Code:
|
#3
|
|||
|
|||
its still not working
im logged in, but when i go to that page it shows the userid as 0 Code:
<?php chdir('./forums'); require_once('./global.php'); global $vbulletin; echo $vbulletin->userinfo['userid']; ?> |
#4
|
||||
|
||||
Is that all you have in the page? You need to look at these: How to create your own vBulletin-powered page! (uses vB templates) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc.
|
#5
|
|||
|
|||
yes, that is all i have on the page
your linked threads do not explain why this does not work. --------------- Added [DATE]1226871188[/DATE] at [TIME]1226871188[/TIME] --------------- god this is so frustrating. why cant this simple thing work? this is rediculous. |
#6
|
||||
|
||||
It works just fine for me.
|
#7
|
|||
|
|||
http://www.wkdservers.co.uk/forums/index.php
username: tester password: 123456 http://www.wkdservers.co.uk/vbtest.php vbtest.php contains: Code:
<?php chdir('./forums'); require_once('./global.php'); global $vbulletin; echo $vbulletin->userinfo['userid']; ?> |
#8
|
||||
|
||||
try:
PHP Code:
edit: I'll bet it's a cookie thing. Make sure your cookie settings are default. |
#9
|
|||
|
|||
using the full path in chdir changed nothing.
|
#10
|
||||
|
||||
Yeah, I'm pretty sure it's a cookie thing (I was editing my post when you posted). Make sure you haven't changed them at all - they should still be default.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|