ढाँचा:NUMBEROF/doc
स्वरूप
This is a documentation subpage for ढाँचा:NUMBEROF. It contains usage information, categories and other content that is not part of the original ढाँचा page. |
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}}
→ 2642551
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:
- Template:NUMBEROF
- Template:NUMBEROF/doc
- Module:NUMBEROF
- Module:NUMBEROF/doc
- Module:NUMBEROF/data
- Module:NUMBEROF/data/doc