Extension:RegexBlock/zh

This page is a translated version of the page Extension:RegexBlock and the translation is 0% complete.
MediaWiki擴充功能手冊
OOjs UI icon advanced-invert.svg
RegexBlock
发布状态: 稳定版
RegexBlock.png
实现 用户权限 , 特殊页面
描述 Adds a new special page for blocking, viewing and unblocking user names and IP addresses by given name, using regular expressions
作者
最新版本 1.7 (2019-05-08)
MediaWiki 1.28+
数据庫更改
许可协议 GNU通用公眾授權條款2.0或更新版本
下载
  • $wgRegexBlockDatabase
  • $wgContactLink
  • regexblock
  • regexblock-exempt
翻譯RegexBlock擴充功能如在translatewiki.net可用

检查使用和版本矩阵。

RegexBlock is an extension that adds special page with the interface for blocking, viewing and unblocking user names and IP addresses using regular expressions.

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目录内。
  • 将下列代码放置在您的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;
  • Look for the following code in the includes / block / BlockManager.php file:
)->format( 'U' );

replace it with the following code:

);
  • Yes 完成 – 在您的wiki上导航至Special:Version,以验证扩展已成功安装。

User rights

User right name Group which is given this right by default Description
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.

Use

  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"

Parameters

Configuration variable name Default value Description
$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.

Examples

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

See also