The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Question about leaderboard script I'm writing.
How are you guys doing, I wasn't sure if this is the right section but,
I'm trying to write a php script that will somehow access the SQL database to find out how many open threads there are in all forums, and how many closed threads there are... basically with that, i can put that into my home page so when a user loads that page it'll tell them how many threads there are open, and how many there are that have been closed (my site is a story telling site, after a set amount of posts the threads close) thanks alot for all of the help! |
#2
|
||||
|
||||
This article should get you started on writing your page - [How-To] vBulletin API Basics: Creating Custom Pages & Misc.
|
#3
|
|||
|
|||
Quote:
Code:
<html><head><title>Test</title></head> <body><?php echo mysql_result(mysql_query("SELECT COUNT(*) as Num FROM thread Where open = 0"),0); ?></body> </html> How would the script know which db to get the values from? |
#4
|
||||
|
||||
If that's all you put up, then you didn't follow that article at all. If you followed the article, you'd be able to put your query into the body of the php page and assign the output to a variable that you can put into your template.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|