Manual:$wgContentNamespaces

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

Other languages:
English • ‎français • ‎日本語 • ‎polski • ‎中文
Namespaces: $wgContentNamespaces
Namespaces which are considered to contain real content, or articles
導入されたバージョン: 1.7.0 (r14738)
除去されたバージョン: 使用中
可能な値: 名前空間の添字の配列
既定値: array( NS_MAIN );
他の設定: アルファベット順 | 機能順

詳細

$wgContentNamespaces exists to allow custom namespaces to be acknowledged as containing useful content for the purpose of Special:Random, Special:Statistics, and {{NUMBEROFARTICLES}}. Useful if additional namespaces also contain "content" which should be considered when choosing a random page or generating a count of the number of articles in the wiki. It also serves as the default for $wgExemptFromUserRobotsControlManual:$wgExemptFromUserRobotsControl, which means that __NOINDEX__ and __NOFOLLOW__ magic words won't work in these namespaces.

The main namespace is considered a content namespace, as are other namespaces in this array, referenced by index.

例:

$wgContentNamespaces = array( 0, 12, 112 );

または

$wgContentNamespaces = array( NS_MAIN, NS_HELP, NS_PROJECT, NS_CUSTOMNAMESPACE );

注 注: If you change this variable, you'll have to run updateArticleCount.phpManual:updateArticleCount.php to update the count in Special:Statistics and {{NUMBEROFARTICLES}}.

This does not control which namespaces the full-text search engine defaults to searching; that must be configured separately using $wgNamespacesToBeSearchedDefault.

関連項目