Extension:ExcludeRandom

From mediawiki.org
This page is a translated version of the page Extension:ExcludeRandom and the translation is 36% complete.
MediaWiki 拡張機能マニュアル
ExcludeRandom
リリースの状態: 保守されていない
実装 自分のウィキ
説明 Allows pages to be excluded from Special:Random
作者 Matt Russell (ultradude25トーク)
最新バージョン 2.0.0 (2018-09-08)
MediaWiki 1.16+
PHP 5.1+
データベースの変更 いいえ
ライセンス 「修正」三条項 BSD ライセンス
ダウンロード

  • $wgExcludeRandomPages

The ExcludeRandom extension allows pages to be excluded from Special:Random. For example, this could be useful for hiding in-complete translation pages that have been yet to be moved to their own sub-domain.

インストール

  • Downloadして、ファイルをextensions/フォルダー内のExcludeRandomという名前のディレクトリ内に配置します。
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    wfLoadExtension( 'ExcludeRandom' );
    
  • Yes 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

MediaWiki 1.24以前を稼働させている利用者へ:

上記の手順では、wfLoadExtension()を使用してこの拡張機能をインストールする新しい方法を記載しています。 この拡張機能をこれらの過去のバージョン (MediaWiki 1.24以前) にインストールする必要がある場合は、wfLoadExtension( 'ExcludeRandom' );の代わりに以下を使用する必要があります:

require_once "$IP/extensions/ExcludeRandom/ExcludeRandom.php";

設定

$wgExcludeRandomPages
The list of pages to be excluded, in an array. * wildcard is supported (matches any amount of any characters).

使用法

$wgExcludeRandomPages = [ 'Main Page', '*/fr' ];

This will disallow Main Page and anything/fr from being selected by Special:Random.