ढाँचा:NUMBEROF
This template uses Lua: |
NUMBEROF shows statistics for a language.project (eg. en.wikipedia). Statistics update every 6 hours except for enwiki stats which are real-time.
Statistics are available for:
- Total Articles (main-space pages)
- Total Pages (articles + redirects + talk etc)
- Total Users (ever registered)
- Total Active Users (recently active)
- Total Edits
- Total Files (images)
- Total Admins
- Total for any of the above across all Wikipedia languages
Usage
सम्पादनThere are 2 required parameters, and an optional third:
- First parameter:
articles
,pages
,edits
,users
,activeusers
,admins
orfiles
- Second parameter (lang.project):
en.wikipedia
,en.wikiquote
,commons.wikimedia
, etc.. if there is no ".<project_name>" it defaults to.wikipedia
thusen
oruk
are acceptable shortcuts - Third parameter: If not empty (any character) it will add a comma. For example "1000" becomes "1,000"
- Note: For Wikis that use non-Latin digits, adding a third parameter (any character) will display numbers in the native language
Optionally the second parameter can be "total.wikipedia", and it will show the total across all wikipedia languages. See examples below.
Examples
सम्पादनTo show the number of articles of the French Wikipedia in format raw:
{{NUMBEROF|articles|fr}}
→ 2645529
To show the number of pages on Commons with comma:
{{NUMBEROF|pages|commons.wikimedia|N}}
→ १४५,१६३,३६६
To show the total number of pages across all Wikipedia projects w/ comma:
{{NUMBEROF|pages|total.wikipedia|N}}
→ २६६,३४१,५१४
To show the total number of pages across all sister projects w/ comma:
{{NUMBEROF|pages|total.all|N}}
→ २६६,३४१,५१४
- Caution: total.all will not provide accurate results if the sister project stats are not being tracked in config.tab (see below)
How it works
सम्पादन- TO add new sites edit config.tab: https://commons.wikimedia.org/wiki/Data:Wikipedia_statistics/config.tab
- The stats are stored on Commons at data.tab: https://commons.wikimedia.org/wiki/Data:Wikipedia_statistics/data.tab
- A bot runs 4x daily updating Commons ~/data.tab based on the sites listed in config.tab
- The bot runs on Toolforge from
/data/project/botwikiawk/numberof
by - The bot sources data from API:Siteinfo
- The template uses two modules: Module:NUMBEROF and Module:NUMBEROF/data
- The Module retrieves the data from Commons ~/data.tab
How to install on other wikis
सम्पादनCopy these pages: