Extension:RegexBlock

From mediawiki.org
This page is a translated version of the page Extension:RegexBlock and the translation is 100% complete.
MediaWiki 拡張機能マニュアル
RegexBlock
リリースの状態: 安定
実装 利用者権限 , 特別ページ
説明 正規表現を用いて利用者名や IP アドレスを指定したブロック、閲覧、ブロック解除を行うための特別ページを追加
作者
最新バージョン 1.7 (2019-05-08)
MediaWiki 1.39+
データベースの変更 はい
ライセンス GNU 一般公衆利用許諾書 2.0 以降
ダウンロード
  • $wgRegexBlockDatabase
  • $wgContactLink

  • regexblock
  • regexblock-exempt
Quarterly downloads 4 (Ranked 143rd)
Public wikis using 1,108 (Ranked 254th)
translatewiki.net で翻訳を利用できる場合は、RegexBlock 拡張機能の翻訳にご協力ください

RegexBlock は、正規表現を使って利用者名や IP アドレスをブロックしたり、閲覧したり、ブロックを解除したりするためのインターフェイスで、特別なページを追加する拡張機能です。 It was originally written by Bartek Łapiński for Fandom .

インストール

This extension works best when used along with setting shared database and memcached .
  • ダウンロードして、ファイルをextensions/フォルダー内のRegexBlockという名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/RegexBlock
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    wfLoadExtension( 'RegexBlock' );
    
  • 更新スクリプトを実行します。このスクリプトは、この拡張機能が必要とするデータベーステーブルを自動的に作成します。
  • Ensure that the regexblock user right is given to a group that exists; by default this user right is given to the staff user group (which does not exist in a default MediaWiki installation). For example, this could be given to the sysop group:
$wgGroupPermissions['sysop']['regexblock'] = true;
  • Yes 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

利用者権限

利用者権限名 既定でこの権限が付与されているグループ 説明
regexblock staff User right required to view and thus use Special:RegexBlock for managing blocks.
regexblock-exempt staff Users who have this right are exempt from RegexBlock blocks.

使用

  1. Go to Special:RegexBlock
  2. Enter the IP address or the username to be blocked to the "IP address or username" field
  3. Enter an optional reason. If no reason is provided by the blocker, a generic reason will be shown to the blocked user.
  4. Select expiry time
  5. Select if you want to block the creation of new accounts and if the match needs to be exact or regex one
  6. Press "Block this user"

パラメーター

構成変数名 既定値 説明
$wgContactLink Special:Contact Displayed to regexblocked users in the regexblock-reason-* interface messages. You might want to customize it if the ContactPage extension isn't installed on your wiki.
$wgRegexBlockDatabase false Set this to the database to use for blockedby and stats_blockedby tables. If you want to use the local database, set this to false. Otherwise you could set this to $wgSharedDB , for example.

To block all users except local ones (192.168.xx.xx): \b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?([0]|[2-9])[0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b

関連項目