Open main menu

lensowiki β

Changes

Help:Article count

1,995 bytes added, 15:13, 14 June 2006
Updating statistics
{{H:h|system admin toc}}

By default, a new page in the main [[Help:Namespace|namespace]] (the one without a prefix like "User:" or "Talk:") will be counted as an article in the [[Special:Statistics|statistics]] and the <nowiki>{{NUMBEROFARTICLES}}</nowiki> [[Help:Variable|variable]] (on this project it currently gives {{NUMBEROFARTICLES}}) if it contains at least one wiki link (e.g. the text "<nowiki>[[Main Page]]</nowiki>").

Before this count was used, an article was counted if it contained at least one comma. That method proved to be unreliable in many languages where the comma does not have much or any significance (see [[m:Article count reform]] for the process which led to this outcome). However, the comma count is still common in the wiki world; see, e.g., [[MeatBall:BiggestWiki]].

== Changing the MediaWiki article count settings ==

If you want to count articles if they contain a comma, you can set the variable
[[mw:Help:$wgUseCommaCount|$wgUseCommaCount]] to true in [[LocalSettings.php]].

Otherwise [[Help:variable|variable]] NUMBEROFARTICLES counts pages in the main name namespace which contain a link and are not a redirect, i.e. number of articles, stubs containing a link, and disambiguation pages.
The default set in [[mw:Help:Configuration settings|DefaultSettings.php]]
is false.

=== Updating statistics ===
If you want to recount your statistics to reflect the change to comma-based "good article" count (that doesn't happen automatically), run:

SELECT COUNT(*) FROM page
LEFT JOIN revision ON (rev_id=page_latest) LEFT JOIN text ON (old_id=rev_text_id)
WHERE page_namespace = 0 AND old_text LIKE '%,%'

Then -

UPDATE `site_stats` SET `ss_good_articles` = '123456' WHERE `ss_row_id` = '1' LIMIT 1

Where 123456 is the row number you got from the query looking for articles including commas. Our Wiki had stub-tags containing a link and we obviously didn't want those counted, so we swapped to the comma-based method.


{{h:f|enname=Article count}}
Anonymous user