User:Iritscen/TestSpace: Difference between revisions

→‎Page count project: general wrap-up
(→‎Page count project: more numbers)
(→‎Page count project: general wrap-up)
Line 32: Line 32:


==Page count project==
==Page count project==
NUMBEROFPAGES: {{NUMBEROFPAGES}}
===Magic words===
These poorly-defined magic words provide easy answers to the amount of content on the wiki. However, unless they are based on something logical, they are completely useless.


Code: Simply counts all entries in page table.
'''NUMBEROFPAGES''': {{NUMBEROFPAGES}}


NUMBEROFARTICLES: {{NUMBEROFARTICLES}} -- supposedly this does not count pages which do not have inter-wiki links in them; there are 107 dead-end pages as of 4/22/12
MW code says: Simply count all entries in page table.


Code: Get all entries in page table are in content namespaces (see $wgContentNamespaces) and are not redirects, then get distinct count of entries in pagelinks table, pl_from field, that match those page ids.
Iritscen says: What gives, MW? This number is higher than the total of files, articles, and talk pages, so what the #$^& is the software looking at? Totally unhelpful.


Redirects: 357 as of 4/22/12
'''NUMBEROFARTICLES''': {{NUMBEROFARTICLES}}
 
MW code says: Get all entries in page table are in content namespaces (see $wgContentNamespaces) and are not redirects, then get distinct count of entries in pagelinks table, pl_from field, that match those page ids.
 
Iritscen says: Supposedly this does not count pages which have no inter-wiki links in them, and the code seems to verify that. One would expect that this number would therefore be agree with PAGESINNS when one subtracts the pages listed on [[Special:DeadendPages]]; however, there were 107 dead-end pages as of 4/22/12. Adding these back in still leads to a lower result than using PAGESINNS less redirects, so I consider it too suspect to use.
 
'''PAGESINNS''', AKA PAGESINNAMESPACE: These counts agree with the number of pages displayed for that namespace on the [[Special:AllPages]] page, which provides some much-needed verifiability. However, since Allpages counts redirects and subpages, that means that PAGESINNS does too. Therefore, we also can't use a straight sum of PAGESINNS results as our page count.
 
PAGESINNS breakdown:
*Namespace '''{{ns:-2}}''' has ID -2, but we can't get a page count, so we can assume it's not part of the above counts
*Namespace '''{{ns:-1}}''' has ID -1, but we can't get a page count, so we can assume it's not part of the above counts
*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]]
*Namespace '''{{ns:1}}''' has ID 1 and {{PAGESINNS:1}} pages
*Namespace '''{{ns:2}}''' has ID 2 and {{PAGESINNS:2}} pages
*Namespace '''{{ns:3}}''' has ID 3 and {{PAGESINNS:3}} pages
*Namespace '''{{ns:4}}''' has ID 4 and {{PAGESINNS:4}} pages
*Namespace '''{{ns:5}}''' has ID 5 and {{PAGESINNS:5}} pages
*Namespace '''{{ns:6}}''' has ID 6 and {{PAGESINNS:6}} pages
*Namespace '''{{ns:7}}''' has ID 7 and {{PAGESINNS:7}} pages
*Namespace '''{{ns:8}}''' has ID 8 and {{PAGESINNS:8}} pages
*Namespace '''{{ns:9}}''' has ID 9 and {{PAGESINNS:9}} pages
*Namespace '''{{ns:10}}''' has ID 10 and {{PAGESINNS:10}} pages
*Namespace '''{{ns:11}}''' has ID 11 and {{PAGESINNS:11}} pages
*Namespace '''{{ns:12}}''' has ID 12 and {{PAGESINNS:12}} pages
*Namespace '''{{ns:13}}''' has ID 13 and {{PAGESINNS:13}} pages
*Namespace '''{{ns:14}}''' has ID 14 and {{PAGESINNS:14}} pages
*Namespace '''{{ns:15}}''' has ID 15 and {{PAGESINNS:15}} pages
*Namespace '''{{ns:100}}''' has ID 100 and {{PAGESINNS:100}} pages
*Namespace '''{{ns:101}}''' has ID 101 and {{PAGESINNS:101}} pages
*Namespace '''{{ns:102}}''' has ID 102 and {{PAGESINNS:102}} pages
*Namespace '''{{ns:103}}''' has ID 103 and {{PAGESINNS:103}} pages
*Namespace '''{{ns:104}}''' has ID 104 and {{PAGESINNS:104}} pages
*Namespace '''{{ns:105}}''' has ID 105 and {{PAGESINNS:105}} pages
*Namespace '''{{ns:108}}''' has ID 108 and {{PAGESINNS:108}} pages
*Namespace '''{{ns:109}}''' has ID 109 and {{PAGESINNAMESPACE:109}} pages
 
'''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}}}}
 
'''All talkspaces''' totalled using PAGESINNS: {{#expr:{{PAGESINNS:1}}+{{PAGESINNS:3}}+{{PAGESINNS:5}}+{{PAGESINNS:9}}+{{PAGESINNS:11}}+{{PAGESINNS:13}}+{{PAGESINNS:15}}+{{PAGESINNS:101}}+{{PAGESINNS:103}}+{{PAGESINNS:105}}+{{PAGESINNS:109}}}}
 
The '''grand total''' for all namespaces (including File) is: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:1}}+{{PAGESINNS:2}}+{{PAGESINNS:3}}+{{PAGESINNS:4}}+{{PAGESINNS:5}}+{{formatnum:{{PAGESINNS:6}}|R}}+{{PAGESINNS:7}}+{{PAGESINNS:8}}+{{PAGESINNS:9}}+{{PAGESINNS:10}}+{{PAGESINNS:11}}+{{PAGESINNS:12}}+{{PAGESINNS:13}}+{{PAGESINNS:14}}+{{PAGESINNS:15}}+{{PAGESINNS:100}}+{{PAGESINNS:101}}+{{PAGESINNS:102}}+{{PAGESINNS:103}}+{{PAGESINNS:104}}+{{PAGESINNS:105}}+{{PAGESINNS:108}}+{{PAGESINNS:109}}}}
 
===Redirects===
There were 357 redirects as of 4/22/12 according to [[Special:ListRedirects]].


Redirect breakdown:
Redirect breakdown:
Line 57: Line 101:
*User: 2
*User: 2


Subpages: A quick glance through [[Special:AllPages]] appears to show 258 of them in Main, 31 in Talk, 113 in User, 35 in User Talk, 4 in MediaWiki, 4 in Template, 6 in BSL, 1 in BSL Talk, 121 in OBD, 39 in OBD Talk, 4 in AE, 2 in AE Talk, 16 in Oni2, and 1 in Oni2 Talk.  The total is 405 subpages in Main, BSL, OBD, AE, and Oni2.  The total for articlespace subpages is 526.  The grand total is 635 (as of 4/22/12).
===Subpages===
I once believed that NUMBEROFARTICLES was ignoring subpages, so I performed the following check. However, these numbers seem too large to explain the discrepancy between NUMBEROFARTICLES and PAGESINNS, so it was probably a waste of my time.


Namespaces '''Main, User, BSL, OBD, AE, and Oni2''' totaled using PAGESINNS: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:2}}+{{PAGESINNS:100}}+{{PAGESINNS:102}}+{{PAGESINNS:104}}+{{PAGESINNS:108}}}}
As of 4/22/12, a quick glance through [[Special:AllPages]] appears to show 258 of them in Main, 31 in Talk, 113 in User, 35 in User Talk, 4 in MediaWiki, 4 in Template, 6 in BSL, 1 in BSL Talk, 121 in OBD, 39 in OBD Talk, 4 in AE, 2 in AE Talk, 16 in Oni2, and 1 in Oni2 Talk.  The total is 405 subpages in Main, BSL, OBD, AE, and Oni2.


Above namespace total minus redirects in those namespaces: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:2}}+{{PAGESINNS:100}}+{{PAGESINNS:102}}+{{PAGESINNS:104}}+{{PAGESINNS:108}}-289-2-2-21-10-8}}
The total for '''articlespace subpages''' is: 526


'''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}}}}
'''Total subpages''' are: 635


'''All talkspaces''' totalled using PAGESINNS: {{#expr:{{PAGESINNS:1}}+{{PAGESINNS:3}}+{{PAGESINNS:5}}+{{PAGESINNS:9}}+{{PAGESINNS:11}}+{{PAGESINNS:13}}+{{PAGESINNS:15}}+{{PAGESINNS:101}}+{{PAGESINNS:103}}+{{PAGESINNS:105}}+{{PAGESINNS:109}}}}
===Conclusion===
NUMBEROFPAGES is worse than useless, and I cannot reconcile NUMBEROFARTICLES with PAGESINNS. On the other hand, PAGESINNS reconciles with AllPages, which makes it verifiable. So we need to get the true count by using PAGESINNS and subtracting redirects (which is unfortunate because the redirect part has to be counted manually). Below we include the User namespace because some users keep Oni 2-related content there.


The '''grand total''' for all namespaces (including File) is: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:1}}+{{PAGESINNS:2}}+{{PAGESINNS:3}}+{{PAGESINNS:4}}+{{PAGESINNS:5}}+{{formatnum:{{PAGESINNS:6}}|R}}+{{PAGESINNS:7}}+{{PAGESINNS:8}}+{{PAGESINNS:9}}+{{PAGESINNS:10}}+{{PAGESINNS:11}}+{{PAGESINNS:12}}+{{PAGESINNS:13}}+{{PAGESINNS:14}}+{{PAGESINNS:15}}+{{PAGESINNS:100}}+{{PAGESINNS:101}}+{{PAGESINNS:102}}+{{PAGESINNS:103}}+{{PAGESINNS:104}}+{{PAGESINNS:105}}+{{PAGESINNS:108}}+{{PAGESINNS:109}}}}
Namespaces '''Main, User, BSL, OBD, AE, and Oni2''' totaled using PAGESINNS: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:2}}+{{PAGESINNS:100}}+{{PAGESINNS:102}}+{{PAGESINNS:104}}+{{PAGESINNS:108}}}}
 
----
Below are the numbers returned from the magic word template PAGESINNS (AKA PAGESINNAMESPACE) for each namespace on OniGalore. These counts agree with the count one gets when manually adding up the list of pages displayed for that namespace on the [[Special:AllPages]] page. Since Allpages counts redirects and subpages, that means that PAGESINNS does too.
 
Namespace '''{{ns:-2}}''' has ID -2, but we can't get a page count, so we can assume it's not part of the above counts
 
Namespace '''{{ns:-1}}''' has ID -1, but we can't get a page count, so we can assume it's not part of the above counts
 
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]]
 
Namespace '''{{ns:1}}''' has ID 1 and {{PAGESINNS:1}} pages
 
Namespace '''{{ns:2}}''' has ID 2 and {{PAGESINNS:2}} pages
 
Namespace '''{{ns:3}}''' has ID 3 and {{PAGESINNS:3}} pages
 
Namespace '''{{ns:4}}''' has ID 4 and {{PAGESINNS:4}} pages
 
Namespace '''{{ns:5}}''' has ID 5 and {{PAGESINNS:5}} pages
 
Namespace '''{{ns:6}}''' has ID 6 and {{PAGESINNS:6}} pages
 
Namespace '''{{ns:7}}''' has ID 7 and {{PAGESINNS:7}} pages
 
Namespace '''{{ns:8}}''' has ID 8 and {{PAGESINNS:8}} pages
 
Namespace '''{{ns:9}}''' has ID 9 and {{PAGESINNS:9}} pages
 
Namespace '''{{ns:10}}''' has ID 10 and {{PAGESINNS:10}} pages
 
Namespace '''{{ns:11}}''' has ID 11 and {{PAGESINNS:11}} pages
 
Namespace '''{{ns:12}}''' has ID 12 and {{PAGESINNS:12}} pages
 
Namespace '''{{ns:13}}''' has ID 13 and {{PAGESINNS:13}} pages
 
Namespace '''{{ns:14}}''' has ID 14 and {{PAGESINNS:14}} pages
 
Namespace '''{{ns:15}}''' has ID 15 and {{PAGESINNS:15}} pages
 
Namespace '''{{ns:100}}''' has ID 100 and {{PAGESINNS:100}} pages
 
Namespace '''{{ns:101}}''' has ID 101 and {{PAGESINNS:101}} pages
 
Namespace '''{{ns:102}}''' has ID 102 and {{PAGESINNS:102}} pages
 
Namespace '''{{ns:103}}''' has ID 103 and {{PAGESINNS:103}} pages
 
Namespace '''{{ns:104}}''' has ID 104 and {{PAGESINNS:104}} pages
 
Namespace '''{{ns:105}}''' has ID 105 and {{PAGESINNS:105}} pages
 
Namespace '''{{ns:108}}''' has ID 108 and {{PAGESINNS:108}} pages


Namespace '''{{ns:109}}''' has ID 109 and {{PAGESINNAMESPACE:109}} pages
'''''True count''''' (above total minus redirects in those namespaces): {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:2}}+{{PAGESINNS:100}}+{{PAGESINNS:102}}+{{PAGESINNS:104}}+{{PAGESINNS:108}}-289-2-2-21-10-8}}