Extension:Counter

Category:Unmaintained extensions#Counter Category:Extensions without an imageCategory:Extensions without a compatibility policyCategory:MPL licensed extensions
MediaWiki extensions manual
Counter
Release status: stableCategory:Stable extensions
Implementation Parser function Category:Parser function extensions
Description Allows to auto count objects in a page
Author(s) Rinick, Johannes Schultz and David Hernandez
Latest version 0.2.2 (2024-07-13)
MediaWiki 1.39+Category:Extensions with manual MediaWiki version
Database changes No
License Mozilla Public License 2.0
Download Category:Extensions in GitHub version control
Category:All extensions

The Counter extension allows to auto count objects in a page.

If you change some item to {{#+: item}} you can get the number of item in this article with {{#+: ? item}}

Installation

  • Download and place the file(s) in a directory called Counter in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'Counter' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Usage

Description You type You get
Basic usage
simple counter
* Alice: {{#+: agree}}
* Bob: {{#+: agree}}
* Carol: {{#+: disagree}}
* Dave: {{#+: agree}}
* Eve: {{#+: disagree}}
* Isaac: {{#+: agree}}
total:
* '''{{#+: ? agree}} '''
* '''{{#+: ? disagree}}'''
  • Alice: agree
  • Bob: agree
  • Carol: disagree
  • Dave: agree
  • Eve: disagree
  • Isaac: agree

total:

  • 4 agree
  • 2 disagree
simple counter with numbers
# {{#+: 1 person}}
# {{#+: 2 person}}s
# {{#+: 3 person}}s
total: '''{{#+: ? person}}s''' <br />
  1. 1 person
  2. 2 persons
  3. 3 persons

total: 6 persons

a, an, one, two...twenty
{{#+:1 apple}} + {{#+:1 apple}}  + {{#+:1 apple}} + {{#+:2 apple}}s <br />
= '''{{#+:? apple}}s'''

apple + apple + apple + 2 apple
= 5 apples

Category:All extensions Category:Extensions in GitHub version control Category:Extensions with manual MediaWiki version Category:Extensions without a compatibility policy Category:Extensions without an image Category:MPL licensed extensions Category:ParserFirstCallInit extensions Category:Parser function extensions Category:Stable extensions Category:Unmaintained extensions