Help:随机页面

From MediaWiki.org
Jump to: navigation, search
This page is a translated version of the page Help:Random page and the translation is 100% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎日本語 • ‎polski • ‎português • ‎português do Brasil • ‎русский • ‎українська • ‎中文
PD Note: When you edit this page, you agree to release your contribution under the CC0. See Public Domain Help Pages for more info.
PD
特殊页面 - 帮助 合并历史新图像新页面选项随机页面还原监视列表
默认位于左侧的侧边栏,注意从上至下的第五个链接

随机页面功能可使用户随机查看维基中的页面。默认的、也是最实用的用处是随机显示一个位于主名字空间中的页面。可通过 Special:Random 页面访问这个功能。用户将会被重定向至选择的页面。

Special:Randompage 是这个功能的一个别名,效果是一样的。

命名空间的选择[edit | edit source]

用户也可以选择随机查看某个名字空间中的页面。只要将名字空间作为参数传递给页面即可,例如:Special:Random/Help 将会随机选择 Help 名字空间中的某个页面;Special:Random/Category 将会随机显示某个分类的内容,等等。

设置[edit | edit source]

Namespaces: Random page
Namespaces which are considered to contain real content, or articles
Introduced in version: 1.7.0 (r14738)
Removed in version: still in use
Allowed values: Array of namespace indexes
Default value: array( NS_MAIN )

Other settings: Alphabetical | By Function

Details[edit | edit source]

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

Example:

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

or

$wgContentNamespaces = array( NS_MAIN, NS_HELP, NS_PROJECT, NS_CUSTOMNAMESPACE );
If you change this variable, you'll have to run updateArticleCount.php to update the count in Special:Statistics and {{NUMBEROFARTICLES}}.

See also[edit | edit source]

語: English  • Deutsch • español • français • 日本語 • polski • português • português do Brasil • русский • українська • 中文

- 设置哪些命名空间应算作是文章内容并属于 Special:Random 的选择范围

另见[edit | edit source]