Extension:VBulletin stats

WARNING: All the information on this page refers to is username/password restricted and possibly no longer available.

Description
Note; the most up-to-date version of this extension will be on my wiki. I wanted to incorporate my vBulletin forum statistics into my wiki page(s). So I looked into creating an extension and came out with this - the vBStats extension. It retrieves an array of data from your vBulletin database and displays it according to conditions you supply (a list of conditions is below).

This hack has been tested on the following vBulletin and MediaWiki combinations;

Demo
You can see a demonstration of this extension in action here.

THE DEMONSTRATION PAGE SHOWS A LOGIN BOX SO WE CAN'T SEE IT

Installation
To install the script; first download the from my wiki.

Rename the downloaded .php file to 'vbStats.php' and upload it to; yourwiki/extensions/

Next; put the following code at the bottom of your localSettings.php file;

include("extensions/vbStats.php");
 * 1) include vBStatsExtension

Finally, change these values in vbStats.php;

$server = "localhost"; # if you don't know what this is just leave it as localhost $username = "username"; # your MySQL username $password = "password"; # your MySQL password $forumdb = "forum"; # your forum MySQL database name $wikidb = "wiki"; # your wiki MySQL database name $maxThreadLimit = 10; # max number of threads to show $maxUserLimit = 10; # max number of users to show $forum_url = "http://www.yourwebsite.com/forum"; # your forum url - DO NOT put an ending forward slash on (site.com/forum/ <-WRONG)
 * 1) EDIT THESE VARS ###########
 * 1) /EDIT THESE VARS ###########

Options
To use the script, simply put the following tags in a mediaWiki article;

 limit=[number] sort=[ASC,DESC] order by=[date,title,rand] 

 limit=[number] sort=[ASC,DESC] order by=[posts,joindate,username,rand] 

 show total posts=[true,false] show total threads=[true,false] show total members=[true,false] show largest thread=[true,false] show most popular thread=[true,false] show most popular forum=[true,false] 

 show active users=[true,false] show inactive users=[true,false] show sub-heading=[true,false] show last 30 days=[true,false] show last 14 days=[true,false] show last 7 days=[true,false] 

Example
 limit=5 sort=DESC order by=date 

Support/Requests
Please post any questions or requests (additions to the script you would like) on the vBulletin Stats extension page on my wiki. I rarely check the wikiMedia website.