User:Iritscen/PageCountAudit: Difference between revisions

table-fying NS page counts
(moving note in from WikiFuture before deleting its section)
(table-fying NS page counts)
Line 1: Line 1:
{{update}}
This page looks into the math that is used by MediaWiki to give various page counts.
Note from the 1.31 section of WikiFuture: "The 'comma' value for $wgArticleCountMethod is no longer supported for performance reasons, and installations with this setting will now work as if it was configured with 'any'. Note that we are currently using the 'comma' option, but it appears that 'any' will return the same result, as it counts all pages that are not redirects."


==Magic words==
==Magic words==
Line 13: Line 12:
'''NUMBEROFARTICLES''': {{NUMBEROFARTICLES}}
'''NUMBEROFARTICLES''': {{NUMBEROFARTICLES}}


MW code says: From MW 1.18 on, if the count method global is set to 'link', the software gets a distinct count of the entries in the pagelinks table, "pl_from" field, that match those page ids. In other words, it filters out pages that do not link to other pages (the reasoning presumably being that "those aren't real wiki pages" if they're not connecting to anything else). It also filters out redirects. If the method is set to 'comma', it counts all non-blank pages (yes, really).
MW code says: If the count method global is set to 'link', the software gets a distinct count of the entries in the pagelinks table, "pl_from" field, that match those page ids. In other words, it filters out pages that do not link to other pages (the reasoning presumably being that "those aren't real wiki pages" if they're not connecting to anything else). It also filters out redirects. If the method is set to 'comma', it counts all non-blank pages (yes, really).


Iritscen says: Okay, $wgArticleCountMethod has now been set to 'comma'.
Iritscen says: Okay, $wgArticleCountMethod has now been set to 'comma'. (Note: As of MW 1.31, "The 'comma' value for $wgArticleCountMethod is no longer supported for performance reasons, and installations with this setting will now work as if it was configured with 'any'." It appears that 'any' will return the same result, counting all pages that are not redirects.)


'''PAGESINNS''', AKA PAGESINNAMESPACE: These counts agree with the number of pages displayed for each namespace on the [[Special:AllPages]] page, which provides some much-needed verifiability. However, since Allpages counts redirect pages, that means that PAGESINNS does too. Therefore, we can't use a straight sum of PAGESINNS results as our page count. See final section for the adjusted number.
'''PAGESINNS''', AKA PAGESINNAMESPACE: These counts agree with the number of pages displayed for each namespace on the [[Special:AllPages]] page, which provides some much-needed verifiability. However, since Allpages counts redirect pages, that means that PAGESINNS does too. Therefore, we can't use a straight sum of PAGESINNS results as our page count. See final section for the adjusted number.


PAGESINNS breakdown:
PAGESINNS breakdown:
*Namespace '''{{ns:-2}}''' has ID -2, but we can't get a page count
{| class="wikitable"
*Namespace '''{{ns:-1}}''' has ID -1, but we can't get a page count
! Namespace
*Namespace '''Main''' does not return an ID number, but apparently it's 0, because <nowiki>{{PAGESINNS:0}}</nowiki> returns {{PAGESINNS:0}} pages, which agrees with [[Special:AllPages]]
! ID
*Namespace '''{{ns:1}}''' has ID 1 and {{PAGESINNS:1}} pages
! Page count
*Namespace '''{{ns:2}}''' has ID 2 and {{PAGESINNS:2}} pages
|-
*Namespace '''{{ns:3}}''' has ID 3 and {{PAGESINNS:3}} pages
| Media
*Namespace '''{{ns:4}}''' has ID 4 and {{PAGESINNS:4}} pages
| -2
*Namespace '''{{ns:5}}''' has ID 5 and {{PAGESINNS:5}} pages
| <not available>
*Namespace '''{{ns:6}}''' has ID 6 and {{PAGESINNS:6}} pages
|-
*Namespace '''{{ns:7}}''' has ID 7 and {{PAGESINNS:7}} pages
| Special
*Namespace '''{{ns:8}}''' has ID 8 and {{PAGESINNS:8}} pages
| -1
*Namespace '''{{ns:9}}''' has ID 9 and {{PAGESINNS:9}} pages
| <not available>
*Namespace '''{{ns:10}}''' has ID 10 and {{PAGESINNS:10}} pages
|-
*Namespace '''{{ns:11}}''' has ID 11 and {{PAGESINNS:11}} pages
| Main
*Namespace '''{{ns:12}}''' has ID 12 and {{PAGESINNS:12}} pages
| 0
*Namespace '''{{ns:13}}''' has ID 13 and {{PAGESINNS:13}} pages
| {{PAGESINNS:0}}
*Namespace '''{{ns:14}}''' has ID 14 and {{PAGESINNS:14}} pages
|-
*Namespace '''{{ns:15}}''' has ID 15 and {{PAGESINNS:15}} pages
| Talk
*Namespace '''{{ns:100}}''' has ID 100 and {{PAGESINNS:100}} pages
| 1
*Namespace '''{{ns:101}}''' has ID 101 and {{PAGESINNS:101}} pages
| {{PAGESINNS:1}}
*Namespace '''{{ns:102}}''' has ID 102 and {{PAGESINNS:102}} pages
|-
*Namespace '''{{ns:103}}''' has ID 103 and {{PAGESINNS:103}} pages
| User
*Namespace '''{{ns:104}}''' has ID 104 and {{PAGESINNS:104}} pages
| 2
*Namespace '''{{ns:105}}''' has ID 105 and {{PAGESINNS:105}} pages
| {{PAGESINNS:2}}
*Namespace '''{{ns:108}}''' has ID 108 and {{PAGESINNS:108}} pages
|-
*Namespace '''{{ns:109}}''' has ID 109 and {{PAGESINNS:109}} pages
| User talk
*Namespace '''{{ns:110}}''' has ID 110 and {{PAGESINNS:110}} pages
| 3
*Namespace '''{{ns:111}}''' has ID 111 and {{PAGESINNS:111}} pages
| {{PAGESINNS:3}}
|-
| OniGalore
| 4
| {{PAGESINNS:4}}
|-
| OniGalore talk
| 5
| {{PAGESINNS:5}}
|-
| File
| 6
| {{PAGESINNS:6}}
|-
| File talk
| 7
| {{PAGESINNS:7}}
|-
| MediaWiki
| 8
| {{PAGESINNS:8}}
|-
| MediaWiki talk
| 9
| {{PAGESINNS:9}}
|-
| Template
| 10
| {{PAGESINNS:10}}
|-
| Template talk
| 11
| {{PAGESINNS:11}}
|-
| Help
| 12
| {{PAGESINNS:12}}
|-
| Help talk
| 13
| {{PAGESINNS:13}}
|-
| Category
| 14
| {{PAGESINNS:14}}
|-
| Category talk
| 15
| {{PAGESINNS:15}}
|-
| BSL
| 100
| {{PAGESINNS:100}}
|-
| BSL talk
| 101
| {{PAGESINNS:101}}
|-
| OBD
| 102
| {{PAGESINNS:102}}
|-
| OBD talk
| 103
| {{PAGESINNS:103}}
|-
| AE
| 104
| {{PAGESINNS:104}}
|-
| AE talk
| 105
| {{PAGESINNS:105}}
|-
| Oni2
| 108
| {{PAGESINNS:108}}
|-
| Oni2 talk
| 109
| {{PAGESINNS:109}}
|-
| XML
| 110
| {{PAGESINNS:110}}
|-
| XML talk
| 111
| {{PAGESINNS:111}}
|-
|}


'''All articlespaces''' (without File) totalled using PAGESINNS: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:2}}+{{PAGESINNS:4}}+{{PAGESINNS:8}}+{{PAGESINNS:10}}+{{PAGESINNS:12}}+{{PAGESINNS:14}}+{{PAGESINNS:100}}+{{PAGESINNS:102}}+{{PAGESINNS:104}}+{{PAGESINNS:108}}+{{PAGESINNS:110}}}}
'''All articlespaces''' (without File) totalled using PAGESINNS: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:2}}+{{PAGESINNS:4}}+{{PAGESINNS:8}}+{{PAGESINNS:10}}+{{PAGESINNS:12}}+{{PAGESINNS:14}}+{{PAGESINNS:100}}+{{PAGESINNS:102}}+{{PAGESINNS:104}}+{{PAGESINNS:108}}+{{PAGESINNS:110}}}}