Extension:Contribution Scores

From MediaWiki.org

Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
Contribution Scores

Release status: stable

Implementation User activity, Special page
Description Polls Wiki Database for highest user contribution volume.
Author(s) Tim Laqua
Version 1.10 (2008-05-15)
MediaWiki 1.10+
Download MediaWiki SVN
Example Betawiki

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.

  • NOTE: As of v1.9, global option variables MUST come after the require_once(...) line - also note the addition of the wg prefix!
  • NOTE: The CSS styles have changed a great deal in v1.8 - please change over to the new styles in your MediaWiki:Common.css (if defined)

Contents

[edit] Installation

  1. Create a new folder (directory) in the following location:
    wiki-install-folder/extensions/ContributionScores
  2. Download the following three files:
  3. Copy the four files in to the new ContributionScores folder
  4. Add the following code to your LocalSettings.php (at the bottom)
require_once( "$IP/extensions/ContributionScores/ContributionScores.php" );
 
$wgContribScoreIgnoreBots = true;          // Exclude Bots from the reporting - Can be omitted.
$wgContribScoreIgnoreBlockedUsers = true;  // Exclude Blocked Users from the reporting - Can be omitted.
$wgContribScoreDisableCache = false;       // Set to true to disable cache for parser function and inclusion of table
 
//Each array defines a report - 7,50 is "past 7 days" and "LIMIT 50" - Can be omitted.
$wgContribScoreReports = array(
    array(7,50),
    array(30,50),
    array(0,50));

[edit] Usage

[edit] Special Page

  • You will have a new Special Page titled "Contribution Scores"

[edit] Inclusion/Transclusion

  • You can include this special page in to other pages using the following wikitext:
{{Special:ContributionScores/<limit>/<days>/<options>}}
 
# 10 top contributors from the last 5 days
{{Special:ContributionScores/10/5}}
 
# 15 top contributors from the last 7 days, no tool links
{{Special:ContributionScores/15/7/notools}}
 
# 15 top contributors from the last 3 days, not sortable and no tool links
{{Special:ContributionScores/15/3/nosort,notools}}

[edit] Appearance Customization

  • The following CSS classes are used, but NOT defined - you can define them in your MediaWiki:Common.css article:
.contributionscores-wrapper       {  }
.contributionscores-title         { background-color: #aaaaaa; margin-bottom: 0px; padding-left: .4em; }
.contributionscores .header { background-color: #cccccc; border-bottom: 1px solid #999999; font-weight: bold; }
.contributionscores .odd        { background-color: #eeeeee; }
.contributionscores .header td   { padding-left: .2em; padding-right: .2em; }
.contributionscores .content   { padding-left: .2em; padding-right: .2em; }

[edit] #cscore Parser Function Examples

Contribution Score for Tim Laqua

{{#cscore:Tim Laqua|score}}

Changes Made for Tim Laqua

{{#cscore:Tim Laqua|changes}}

Unique Pages Edited for Tim Laqua

{{#cscore:Tim Laqua|pages}}

[edit] More info

[edit] Similar Extensions

Personal tools