The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
I'm starting an application for my site which will use some of the vB tables like users.
When I write my php code, what do I need to include to track user sessions, use the colors and styles of my vb, etc? thanks |
#2
|
||||
|
||||
Code:
<?php require('global.php'); ?> That's all there is to it really. Just make sure it's in the same folder as the rest of vBulletin's files. Otherwise, you'll need to add a chdir() command before requiring global.php, for example: Code:
chdir("/full/path/to/you/forum"); |
#3
|
||||
|
||||
Great, thanks!
|
#4
|
|||
|
|||
couldnt you just do this:
Code:
<?php require('/full/path/to/you/forum/global.php'); ?> |
#5
|
||||
|
||||
No, because Global.php references several other files on a relative path from the current directory, not the directory global.php is in.
If you were in www/ and specified the path /board/global.php It looks for ./admin/functions.php In this case, it would expect to find it at www/admin/functions.php I found this out the hard way. |
#6
|
||||
|
||||
Exactly.
You can only include files like that if they are independent. |
#7
|
||||
|
||||
I'm a little further in my design now.
I'm building an event calendar. I want to allow users to rate the event. And of coure limit it to only members and once per users. What do I need to do to check to see if a person is logged in? And if not, so them a log in screen? thanks |
#8
|
||||
|
||||
Code:
if ($bbuserinfo[userid]==0) { // show_nopermission(); } else { // ok } |
#9
|
||||
|
||||
Ok, just tried that.
I placed the code below on a page. Quote:
When I am not logged in, I get the following error: Quote:
|
#10
|
||||
|
||||
Just upgraded to 2.2.1
Still having the error. thanks |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|