Last modified: 2006-06-12 20:11:33 UTC
There is only one special variable for counting pages in MW - it is {{NUMBEROFARTICLES}}. I've met two situations where this was not enought - there were new namespaces created, and no easy way to count number of pages in this new namespaces in way that {{NUMBEROFARTICLES}} provides. So I suppose adding new kind of variable caled eg. {{NUMBEROFPAGESINNAMESPACE}} or simple {{NUMBEROFPAGES}} with paramter counting number of namespace that should be checked. For example: * {{NUMBEROFPAGES:0}} - same as {{NUMBEROFARTICLES}} * {{NUMBEROFPAGES:1}} - number of discussions of articles etc.
{{NUMBEROFPAGES}} is now a count of all pages in the wiki. I would recommend calling a variable such as this requests {{PAGESINNAMESPACE}} or similar. As an alternative, we could add a configuration variable which would allow us to add more namespaces to the check in Article::isCountable (which dictates what is classed as an "article" for the purposes of the statistics).
(In reply to comment #1) > As an alternative, we could add a configuration variable which would allow us to > add more namespaces to the check in Article::isCountable (which dictates what is > classed as an "article" for the purposes of the statistics). This was added in SVN trunk, r14738.
{{PAGESINNAMESPACE}} added in SVN trunk, r14741 with {{PAGESINNS}} alias.
Is this safe? Mass operations that hit millions of index rows sound like they might not be the funnest. Recommend removing this and running it past domas.