The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
using global.php from non-vb page
I have a custom application in which I want to make use of VB's user authentication.
I tried including global.php and checking for bbusrinfo[userid] variable etc.. But since vBulletin is using includes like below ("./includes/xxx.php") the scripts in nonVb folders are failing in includes... Had vBulletin used ("includes/xxx.php") without the preceding "." for current directory, it would have worked. Can you help me how I can check if a user is already logged in from my custom script? Thanks |
#2
|
||||
|
||||
Use chdir('./path/to/your/forums'); so from then on all the paths are from vbulletins directory
|
#3
|
|||
|
|||
Thankyou Specialist, it resolved the include issue.
One more question..I have my code snippet like this.. <? chdir("../Forums/"); include('global.php'); if($bbuserinfo[userid]) { //my application } else { print_please_login(); } ?> Is this a good way to do? Or any other better ways exist? Also, how can I select a specific style from the code here? I want my Login page/error Page to display from a custom Style. not from the default style. Can I do that by setting some variable here ? Thank you |
#4
|
||||
|
||||
Make a plugin in the hook "style_fetch" and put the following in it:
PHP Code:
So maybe in your else{ PHP Code:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|