View Full Version : calling functions
f-a_org
03-15-2003, 01:45 AM
What php code do I use to call specific vBulletin Functions.
onto a main page ?
Im a little new to php, and want to include some simple things into my main page.
Im making a news script.
but
Here is what I need:
Stats
Newest post
Users online
Search function
Users online.
thanks
p.s- my vB Subdomain is phorum
filburt1
03-15-2003, 01:59 AM
Just require global.php and then the page is 100% vB powered.
Link14716
03-15-2003, 02:13 AM
It's not that simple, filburt.
You can only do that if the page you're including it in is in the same directory as the board. If not, you'd have to either copy the essential vB files, or use chdir (or whatever function that was) a few times.
Velocd
03-15-2003, 02:32 AM
Doing what you just mentioned is pretty damn simple compared to what Filburt originally said though, Link ;)
Just use dot notation in front of the first forward slash to direct chdir() into the directory of global.php.
ie:
chdir("./forum");
require("global.php");
f-a_org
03-15-2003, 03:37 AM
*blinks* *sweatdrops*
what do I put that in Velocd ?
Erwin
03-15-2003, 03:43 AM
The main page needs to be in php.
Then you put those lines as high as possible in the file after <?php
I usually also include this line as well:
error_reporting(7);
:)
f-a_org
03-15-2003, 04:03 AM
oh thanks, will try it
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.