PDA

View Full Version : mediaWiki vBulletin Statistics


RossOliver
09-16-2005, 10:00 PM
I hope this is the most suitable place to post this extension.

Basically, it allows you to view information about your forum statistics on your mediaWiki pages. You can view an example of the extension working here (http://developersdigest.org/wiki/index.php/MediaWiki_VBulletin_stats_extension_demo).

The installation is easy enough and takes ~2 minutes. Everything you need to get going can be found on this wiki page (http://developersdigest.org/wiki/index.php/MediaWiki_VBulletin_stats_extension) or below.

This hack has only been tested on vBulletin version 3.0.8 and mediaWiki version 1.4.7

Installation

To install the script; first download the VbStatsExtension.zip file.

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 vBStatsExtension
include("extensions/vbStats.php");


Finally, change these settings in vbStats.php;


########### EDIT THESE VARS ###########
$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)
########### /EDIT THESE VARS ###########


Usage

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


<vbThreadStats>
limit=[number]
sort=[ASC,DESC]
order by=[date,title,rand]
</vbThreadStats>

<vbUserStats>
limit=[number]
sort=[ASC,DESC]
order by=[posts,joindate,username,rand]
</vbUserStats>

<vbBoardStats>
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]
</vbBoardStats>

<vbUserActivityStats>
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]
</vbUserActivityStats>


Example;


<!-- show latest threads -->
<vbThreadStats>
limit=5
sort=DESC
order by=date
</vbThreadStats>


Enjoy...

-Ross

Blindchild02
09-18-2005, 03:50 AM
i suggest adding it to a zip file for future reference

RossOliver
09-18-2005, 10:23 AM
added the zip file :) - I struggled to find it earlier :o

I've also included the installation and usage instructions on this page.

-Ross

MarsNIIT
11-24-2005, 02:16 AM
Error with vb3.5.1 :(

http://www.wiki.niitvn.info/index.php/Main_Page <= see here, please help me. Thanks.

Warning: end(): Passed variable is not an array or object in /home/wikiniit/public_html/includes/Parser.php on line 489

RossOliver
12-07-2005, 09:58 PM
you have to alter the way the extension uses the parser, it must have changed for 1.5.x

-Ross

RossOliver
12-07-2005, 10:10 PM
try changing all the places the otuput is parsed to this;

# parse the output for wiki markup
global $wgTitle;
global $wgUser;

$parser = new Parser();
$parser->startExternalParse($wgTitle, ParserOptions::newFromUser( $wgUser ), OT_HTML);
$output = $parser->parse( $output, $wgTitle, ParserOptions::newFromUser( $wgUser ), true );
return $output->getText();

Not tested on 1.5.x, but works on 1.4.12

-Ross

jyoung
12-14-2005, 01:24 PM
Problem still exists - pity - seems like a handy extension.
Suppose I can just suppress warnings in the php file.

RossOliver
12-14-2005, 04:04 PM
hmm It was tried, and worked, on vBulletin 3.5.2 and MediaWiki 1.5.3 (so I've been told) - you can get the latest version here (http://developersdigest.org/wiki/index.php/MediaWiki_VBulletin_stats_extension)

-Ross

yessir
08-09-2006, 06:01 PM
Ross, can't seem to access developerdigest.org. Seems to be behind a htaccess password.

Is it possible to get the latest version re-upped here? I'd really like to push MediaWiki/vB development.