扩展:分类内随机

This page is a translated version of the page Extension:Random In Category and the translation is 64% complete.
MediaWiki扩展手册
Random In Category
发行状态: 稳定版
实现 特殊页面
描述 将用户带到指定分类中的随机页面
作者 Victor Vasiliev (VasilievVV留言)
最新版本 2.2.0 (2019-04-04)
MediaWiki 1.25+
数据库更改
许可协议 GNU通用公眾授權條款2.0或更新版本
下載
前往translatewiki.net翻譯Random In Category扩展
問題 开启的任务 · 报告错误

Random In Category扩展使您可以将用户带到指定分类中的随机页面。

用法

非常类似Special:Random,但可以指定分类名作为参数。 因此,"Special:RandomInCategory/Foo"或"Special:RandomPageInCategory/Foo" (MW ≥ MW 1.22) 会带用户到"Foo"分类中的一个页面。

Comparison to Core

MediaWiki版本:
1.22

In MediaWiki 1.22, a Special:RandomInCategory feature was added to core. The core version gives much more biased results than this extension (However, it has much less performance overhead). Versions of this extension for MediaWiki 1.22 and greater change the name that this extension provides from "Special:RandomInCategory" to Special:RandomPageInCategory to prevent conflict with the core feature.

安裝

  • 下载文件,并将其放置在您extensions/文件夹中的RandomInCategory目录内。
    开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/RandomInCategory
  • 将下列代码放置在您的LocalSettings.php 的底部:
    wfLoadExtension( 'RandomInCategory' );
    
  •   完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。