Difference between revisions of "Help:Article count"

From lensowiki
Jump to: navigation, search
(Updating statistics)
 
(Updating statistics)
 
(No difference)

Latest revision as of 15:13, 14 June 2006

 

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

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 $wgUseCommaCount to true in LocalSettings.php.

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


http://www.fayeunrauphotography.com/ kjøp cialis 520853 http://www.primetermites.com/ ジェネリックバイアグラ 5575 http://www.witch-ring.com/Generic-Viagra/ Comprando viagra sfnjy http://www.flweaver.com/ online Cialis kmt http://www.blogdemoteros.com/ tadalafil 5271