Extension:Contribution Scores

This extension polls the Wiki Database to locate contributors with the highest contribution volume - this has NOT been tested on a high-volume Wiki. The extension is intended for fledgling Wikis looking to add a fun metric for Contributors to see how much they are helping out.

Installation

 * 1) Create a new folder (directory) in the following location: wiki-install-folder/extensions/ContributionScores
 * 2) Download the following three files:
 * 3) * ContributionScores_body.php
 * 4) * ContributionScores.i18n.php
 * 5) * ContributionScores.php
 * 6) Copy the three files in to the new ContributionScores folder
 * 7) Add the following code to your LocalSettings.php (at the bottom)

Usage

 * 1) Follow Installation Instructions
 * 2) You will have a new Special Page titled "Contribution Scores"

More info

 * Live Demo at www.PoxWiki.com

Notice
This extension does not work on portgresql database. The exception : A database error has occurred Query: SELECT user_id, user_name, COUNT(DISTINCT rev_page) AS page_count, COUNT(rev_id) AS rev_count, (COUNT(DISTINCT rev_page)+SQRT(COUNT(rev_id)-COUNT(DISTINCT rev_page))*2) AS wikiRank FROM mwuser userTable JOIN revision revTable ON (userTable.user_id=revTable.rev_user) WHERE rev_timestamp > '20070815000000' AND user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group='bot') GROUP BY user_id, user_name ORDER BY wikiRank DESC LIMIT 50 Function: Error: 1 ERROR: invalid input syntax for type timestamp with time zone: "20070815000000"

Backtrace:


 * 1) 0 /var/www/html/wiki/includes/Database.php(761): DatabasePostgres->reportQueryError('ERROR: invalid...', 1, 'SELECT user_id,...', '', false)
 * 2) 1 /var/www/html/wiki/extensions/ContributionScores/ContributionScores_body.php(46): Database->query('SELECT user_id,...')
 * 3) 2 /var/www/html/wiki/extensions/ContributionScores/ContributionScores_body.php(98): ContributionScores->genContributionScoreTable(NULL, NULL, 7, 50)
 * 4) 3 /var/www/html/wiki/includes/SpecialPage.php(433): ContributionScores->execute(NULL)
 * 5) 4 /var/www/html/wiki/includes/Wiki.php(196): SpecialPage::executePath(Object(Title))
 * 6) 5 /var/www/html/wiki/includes/Wiki.php(45): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
 * 7) 6 /var/www/html/wiki/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
 * 8) 7 {main}