User:Iritscen/TestSpace: Difference between revisions

From OniGalore
Jump to navigation Jump to search
(→‎Page count project: actually, NUMBEROFARTICLES is not far off)
m (→‎Magic words: MW also supposedly won't count an article without a comma, but it actually just looks at whether (length > 0) because "if the page is empty, it can't contain a comma"; shoot me now)
Line 43: Line 43:
'''NUMBEROFARTICLES''': {{NUMBEROFARTICLES}}
'''NUMBEROFARTICLES''': {{NUMBEROFARTICLES}}


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).
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. From MW 1.18 on, the function now 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: 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.
Iritscen says: One would expect that in the current software, this number would therefore agree with the sum of the results from PAGESINNS for each namespace if you account for redirects, but it's off by 30 as of 4/22/12 (see bottom section). Things will become more complicated when we eventually upgrade the wiki, as dead-end pages will also be excluded from this count, which is not desirable. Fortunately, we can get a list of these pages on [[Special:DeadendPages]]. But since NUMBEROFARTICLES should agree currently with PAGESINNS less redirects, and it doesn't, I consider NUMBEROFARTICLES too unreliable 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. See final section for the adjusted number.


PAGESINNS breakdown:
PAGESINNS breakdown:

Revision as of 12:24, 24 April 2012

Divbox and Pullquote, stop fighting, or I'll pull this car right over!

Divbox and Pullquote don't get along well. Here's what happens when I write some reasonable wiki code:

{{Divbox|yellow|title|{{Pullquote|Pretend something witty is written here.|Iritscen}}}}

begets:


After doing some reading on WP and some fiddling, I've found that:

{{Divbox|yellow|3=<br>{{Pullquote|Pretend something witty is written here.|Iritscen}}}}

begets


So, although it works, it's only by a hack that the two templates get along together even partially.

Questions that need answering:

  1. Why do I need to declare that the quote text is the third parameter with "3="?
  2. Why does some bum text need to be inserted (here I've used "<br>") before the data returned by Pullquote?
  3. Why does using Pullquote inside of Divbox break Divbox's "width" parameter?
Because pullquote has its own width...Gumby

#3 is of the most concern to me, followed by #2. I suspect that the fact that Pullquote actually returns table code is part of the problem behind all this.


Page count project

Magic words

These first two poorly-documented magic words provide easy answers to the amount of content on the wiki. However, unless they are based on something logical that I haven't discovered yet, they are completely useless.

NUMBEROFPAGES: 4,605

MW code says: Simply count all entries in page table.

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.

NUMBEROFARTICLES: 896

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. From MW 1.18 on, the function now 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: One would expect that in the current software, this number would therefore agree with the sum of the results from PAGESINNS for each namespace if you account for redirects, but it's off by 30 as of 4/22/12 (see bottom section). Things will become more complicated when we eventually upgrade the wiki, as dead-end pages will also be excluded from this count, which is not desirable. Fortunately, we can get a list of these pages on Special:DeadendPages. But since NUMBEROFARTICLES should agree currently with PAGESINNS less redirects, and it doesn't, I consider NUMBEROFARTICLES too unreliable 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. See final section for the adjusted number.

PAGESINNS breakdown:

  • Namespace Media has ID -2, but we can't get a page count
  • Namespace Special has ID -1, but we can't get a page count
  • Namespace Main does not return an ID number, but apparently it's 0, because {{PAGESINNS:0}} returns 740 pages, which agrees with Special:AllPages
  • Namespace Talk has ID 1 and 113 pages
  • Namespace User has ID 2 and 122 pages
  • Namespace User talk has ID 3 and 51 pages
  • Namespace OniGalore has ID 4 and 15 pages
  • Namespace OniGalore talk has ID 5 and 2 pages
  • Namespace File has ID 6 and 2,637 pages
  • Namespace File talk has ID 7 and 17 pages
  • Namespace MediaWiki has ID 8 and 38 pages
  • Namespace MediaWiki talk has ID 9 and 0 pages
  • Namespace Template has ID 10 and 131 pages
  • Namespace Template talk has ID 11 and 6 pages
  • Namespace Help has ID 12 and 2 pages
  • Namespace Help talk has ID 13 and 2 pages
  • Namespace Category has ID 14 and 191 pages
  • Namespace Category talk has ID 15 and 6 pages
  • Namespace BSL has ID 100 and 64 pages
  • Namespace BSL talk has ID 101 and 6 pages
  • Namespace OBD has ID 102 and 191 pages
  • Namespace OBD talk has ID 103 and 36 pages
  • Namespace AE has ID 104 and 23 pages
  • Namespace AE talk has ID 105 and 15 pages
  • Namespace Oni2 has ID 108 and 37 pages
  • Namespace Oni2 talk has ID 109 and 18 pages

All articlespaces (without File) totalled using PAGESINNS: 1554

All talkspaces totalled using PAGESINNS: 255

The grand total for all namespaces (including File) is: 4463

Redirects

There were 357 redirects as of 4/22/12 according to Special:ListRedirects.

Redirect breakdown:

  • Main: 289
  • Talk: 9
  • Help: 1
  • File: 8
  • AE: 10
  • AE Talk: 1
  • BSL: 2
  • OBD: 21
  • OBD Talk: 3
  • OniGalore: 2
  • Oni2: 8
  • Oni2 Talk: 1
  • User: 2

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.

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.

The total for articlespace subpages is: 526

Total subpages are: 635

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).

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: 1055

Now if we deduct the redirects for those five namespaces, we get: 725

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: 1177

True count (above total minus redirects in those namespaces): 845