手册:$wgArticleCountMethod

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgArticleCountMethod and the translation is 28% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎magyar • ‎polski • ‎русский • ‎中文 • ‎日本語
网站统计: $wgArticleCountMethod
方法用于确定内容名称空间中的页是否应算作有效的內容頁面(條目)。
引进版本:1.18.0 (r88113)
移除版本:仍在使用
允许的值:字符串或null
默认值:'link'
其他设置: 按首字母排序 | 按功能排序

详情

Method used to determine if a page in a content namespace should be counted as a valid content page (article).

Redirect pages will never be counted as valid content pages (articles).

This variable can have the following values:

  • 'link': the page must contain a wikilink to be considered valid
  • 'comma': the page must contain a comma to be considered valid. When recounting with maintenance scripts, this criterion was not actually used, but all non-empty pages (that are not redirects and are in a content namespace) were counted. This method is removed in MediaWiki 1.31. It's now equivalent to 'any'.
  • 'any': all pages (that are not redirects) are considered as valid articles
  • Any other value will have the same result as 'any'.

The "wikilink" alluded to above must be an "internal-style" link formed by using [[double brackets]] wiki markup (the link may be provided by transclusion and need not point to an existing page). Such links create entries in the pagelinks table, which is what actually gets checked to determine whether a page contains wikilinks.

Other types of links, including "external" links (formed with [single brackets]), interwiki links (to pages on other wikis), category links (which place pages into categories), and file links (which display files) do not count when using the 'link' method.

Changing this variable will not retroactively affect the existing count. To update it, you will need to run the maintenance/updateArticleCount.php script.

参见