Last modified: 2006-06-12 20:11:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T7932, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 5932 - Magic word to count the number of pages in a given namespace
Magic word to count the number of pages in a given namespace
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal enhancement with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-13 12:20 UTC by AJF
Modified: 2006-06-12 20:11 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description AJF 2006-05-13 12:20:03 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.
Comment 1 Rob Church 2006-05-14 03:19:27 UTC
{{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).
Comment 2 Rob Church 2006-06-12 11:59:48 UTC
(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.
Comment 3 Rob Church 2006-06-12 12:39:11 UTC
{{PAGESINNAMESPACE}} added in SVN trunk, r14741 with {{PAGESINNS}} alias.
Comment 4 Brion Vibber 2006-06-12 20:11:33 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links