Help:Article count

Revision as of 15:22, 14 April 2008 by 2k2blackwrx (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


MediaWiki Handbook: Contents, Readers, Editors, Moderators, System admins +/-

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 481) 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:

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.

Links to other help pages

Help contents | search (all help pages)
Meta | Wikinews | Wikipedia | Wikiquote | Wiktionary | commons: | mw: | b: | s:
Go | Search | Stop words | URL | Namespace | Page name | Section
Backlinks | Link | Piped link | Interwiki link | Redirect | Category | Image page
Logging in and preferences
Logging in | Preferences | User style
Advanced editing | Editing FAQ | Edit toolbar | Export
Editing shortcuts
Tracking changes
Recent changes (enhanced) | Related changes | Watching pages | Diff
Page history | Edit summary | User contributions | Minor edit | Patrolled edit
Style & formatting
Wikitext examples | Reference card
HTML in wikitext | HTML elements
List | Table | Sorting
Mathematical symbols on English Wikipedia
Special input and output
Inputbox | Special characters | Displaying a formula | Images and other uploaded files | EasyTimeline
Advanced functioning
Template | Advanced templates | Parser function | ParserFunctions | Parameter default | Variable | Magic word | System message | Substitution
Array | Calculation
Page management
Starting a new page | Renaming (moving) a page | Maintenance | Merging and moving pages | Protecting pages
Resolving disputes | Deleting a page
Special pages
Talk page | Testing | Sandbox
Lists of resources
Lists of Categories | Copyrights | Infobox
Redirect | Reference Desk | Shortcuts | Stub types

Other languages: English (en) +/-