![]() |
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 |
Code:
<?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"); |
Great, thanks!
|
couldnt you just do this:
Code:
<?php |
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. |
Exactly.
You can only include files like that if they are independent. |
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 |
Code:
if ($bbuserinfo[userid]==0) { |
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:
|
Just upgraded to 2.2.1
Still having the error. thanks |
It now gives the error whether I'm logged in or not.
|
Remove the // in front of show_nopermission() for starters. Then remove any white space before the <? or after the ?> in your file.
|
Ok, here is what I have now:
Quote:
Thanks |
I'm trying to do the following, where am I going wrong:
PHP Code:
|
Nevermind, it works.
|
All times are GMT. The time now is 12:25 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|