Extension:RegexBlock/zh

Category:GPL licensed extensions/zh
RegexBlock
Category:Stable extensions/zh
Category:User rights extensions/zh, Category:Special page extensions/zh
描述 添加一个新的特殊页面,用于使用正则表达式按给定名称阻止、查看和取消阻止用户名和 IP 地址
作者
最新版本 1.7 (2019-05-08)
MediaWiki 1.43+Category:Extensions with manual MediaWiki version
GNU通用公眾授權條款2.0或更新版本
下載 Category:Extensions in Wikimedia version control/zh
  • $wgRegexBlockDatabase
  • $wgContactLink
季度下載量 3 (Ranked 112nd)
正在使用的公开wiki数 1,108 (Ranked 254th)
前往translatewiki.net翻譯RegexBlock
問題 开启的任务 ·
Category:All extensions/zh

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 .
  • 下载,并将解压后的RegexBlock移动到extensions/目录中。
    开发者和代码贡献人员应从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 完成 – 在您的wiki上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 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

参见

Category:Extensions by Fandom/zh Category:Extensions by ShoutWiki/zh
Category:All extensions/zh Category:ContributionsToolLinks extensions/zh Category:Extensions by Fandom/zh Category:Extensions by ShoutWiki/zh Category:Extensions in Wikimedia version control/zh Category:Extensions which add rights/zh Category:Extensions with manual MediaWiki version Category:GPL licensed extensions/zh Category:GetUserBlock extensions/zh Category:LoadExtensionSchemaUpdates extensions/zh Category:Special page extensions/zh Category:Stable extensions/zh Category:User rights extensions/zh