19,095
edits
m (→Magic words: words more goodened) |
(→Page count project: actually, NUMBEROFARTICLES is not far off) |
||
Line 43: | Line 43: | ||
'''NUMBEROFARTICLES''': {{NUMBEROFARTICLES}} | '''NUMBEROFARTICLES''': {{NUMBEROFARTICLES}} | ||
MW code says: | MW code says: In our current MW version, 1.16.5, the code simply counts all pages which are in content namespaces (as listed in $wgContentNamespaces) and are not redirects and are not empty. In the current version of MW, the function then 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). | ||
Iritscen says: | Iritscen says: One would expect that this number would therefore agree with PAGESINNS when one adds in 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 (see bottom), so I consider NUMBEROFARTICLES too suspect to use. | ||
'''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. | '''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. | ||
Line 111: | Line 111: | ||
===Conclusion=== | ===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). | 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). | ||
First, let's count Main and the custom namespaces that we added on for specialized content: | |||
Namespaces '''Main, BSL, OBD, AE, and Oni2''' totaled using PAGESINNS: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:100}}+{{PAGESINNS:102}}+{{PAGESINNS:104}}+{{PAGESINNS:108}}}} | |||
Now if we deduct the redirects for those five namespaces, we get: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:100}}+{{PAGESINNS:102}}+{{PAGESINNS:104}}+{{PAGESINNS:108}}-289-2-21-10-8}} | |||
If you think about it, the User namespace is probably not in $wgContentNamespaces, which means that the combination of PAGESINNS counts that is (maybe) equivalent to NUMBEROFARTICLES is only off by 30 (as of 4/22/12, anyway). But wait! Some users have placed their Oni 2-related stories under their user pages. So we need to add in userspace pages... | |||
Namespaces '''Main, User, BSL, OBD, AE, and Oni2''' totaled using PAGESINNS: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:2}}+{{PAGESINNS:100}}+{{PAGESINNS:102}}+{{PAGESINNS:104}}+{{PAGESINNS:108}}}} | Namespaces '''Main, User, BSL, OBD, AE, and Oni2''' totaled using PAGESINNS: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:2}}+{{PAGESINNS:100}}+{{PAGESINNS:102}}+{{PAGESINNS:104}}+{{PAGESINNS:108}}}} | ||
'''''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}} | '''''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}} |