Jump to content

Extension:MW-EditCount: Difference between revisions

From mediawiki.org
Content deleted Content added
Carlb (talk | contribs)
Listed on the sf page and in the files
Line 10: Line 10:
|update = 2008-01-11
|update = 2008-01-11
|mediawiki = at least 1.6.10
|mediawiki = at least 1.6.10
|license = GPL
|download = [http://www.sourceforge.net/projects/mw-editcount from SourceForge]
|download = [http://www.sourceforge.net/projects/mw-editcount from SourceForge]
|description = Displays a detailed edit count of users.
|description = Displays a detailed edit count of users.

Revision as of 03:48, 27 June 2010

MediaWiki extensions manual
EditCount
Release status: stable
File:EditCount.png
Implementation Parser function , Special page , User activity
Description Displays a detailed edit count of users.
Author(s) Fahad Sadah
Latest version 1.2.9 (2008-01-11)
MediaWiki at least 1.6.10
Licence GNU General Public License (any version)
Download from SourceForge
Example template

Note: This is not the extension found in MediaWiki Subversion (or Wikia).

What can this extension do?

This extension creates a special page where one can view the edit count of a user per namespace. It includes the percent of edits that user made in certain namespace as well as total edits. As of version 1.1.0, it includes a parser function which can inline a users edit count. After the name of the user, in 1.2.0, you can put the number or name of a namespace (0 for Main) and get that EditCount.

Parser function examples

Shows the count of the user Benjamin
{{#ec:Benjamin}}

in the 4 namespace
{{#ec:Benjamin|4}}

in the main namespace
{{#ec:Benjamin|0}}

and in the Talk namespace
{{#ec:Benjamin|Talk}}

Installation

This extension is hosted at SourceForge.

Once you download it, de-compress it and add the EditCount directory to the extension directory of your MediaWiki installation. Add the following line to LocalSettings.php:

require_once("$IP/extensions/EditCount/EditCount.php");
MediaWiki versions
  • Unsuccessfully tested in MediaWiki 1.13.4 PHP 5.1.6(apache2handler) MySQL 5.0.22

Installation on MediaWiki 1.17 and later

This extension was last updated on 29 May 2009. It uses functions in includes/XmlFunctions.php which were a standard part of the MediaWiki distribution at the time. This file has since been deprecated (in the sense that no core MediaWiki code breaks upon its removal; its absence will hovever break extensions which use its functionality). XmlFunctions.php was removed from MediaWiki as of revision 66105, breaking EditCountPage.php and also presumably breaking any other extensions which used the functions.

The symptom is that all MW 1.17+ sites will display a blank (zero-byte) page on any attempt to access Special:EditCount. This can be corrected by adding the functions in question (at least two short stub functions are needed, the rest is not used here) to EditCountPage.php as follows:

<?php
/**
 * Contians the Special pages classes
 * 
 * @package MediaWiki
 * @subpackage EditCount
 */

function wfElement( $element, $attribs = null, $contents = '') {
    return Xml::element( $element, $attribs, $contents );
}

function wfCloseElement( $element ) {
    return "</$element>";
}


/**
 * The EditCount special page class
 * 
 * @package MediaWiki
 * @subpackage EditCount
 */

with the rest of the file remaining unchanged.

Configuration

Remember: Change these only in your LocalSettings.php!

/**
 * True to turn on parser function and false to not
 */
$egECParserFunction = true;

/**
 * An array of the names of the parser functions
 * 
 * This array of parser function names must be single words (can have - and _).
They are not case sensitive.
These will have "#" appended to the front of them in wikimarkup.
 * @var array
 */
$egECParserFunctionNames = array("editcount", "ec");

/**
 * True to enable the Special:EditCount page
 */
$egECEnableSpecialPage = true;

If you want to help

EditCount needs translators. Feel free to download it and translate it into your native (or non-native) language. Then email the .i18.php file to fahadsadah@gmail.com. See the language table for more information.

Language information

Language Translated by Other notes
Brazilian Portuguese SoQuadrinhos  
Dutch warddr  
English -  
Finnish Drall  
French BigSmooth  
German Mooncrater  
Polish Mori Akaice  

Feedback and bugs

To report bugs or give feedback, please leave a message on the talk page.