Extension:GlobalBlocking/zh
GlobalBlocking擴充功能可讓擁有相應權限的用戶,在共享相同的globalblocking
資料庫的群組中的所有維基上,封鎖某個IP地址、某些IP地址範圍、或某個帳戶(但「不包括」MediaWiki 1.43之前的帳戶)。
它旨在用於打擊跨維基的嚴重破壞和垃圾信息。
安裝
- 下载,并将解压后的
GlobalBlocking
移动到extensions/
目录中。
开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/GlobalBlocking
- 将下列放置在您的LocalSettings.php 的底部:
wfLoadExtension( 'GlobalBlocking' );
- 您還需要為此擴充功能創建一個專用的數據庫才能正常運行。 最低限度(所有維基都運行在同一主機上),您需要為全域表創建一個本地的資料庫。 通常,此資料庫會命名為
globalblocking
,但您可以選擇其他名稱。 例如,在維基媒體基金會的維基上,此表格位於名為centralauth
的資料庫之中。 - 授予所有資料庫的使用者在上述步驟中建立的資料庫上的完全權限(最低限度是
SELECT, UPDATE, INSERT, DELETE
)。 - Do either of the following depending on the version of MediaWiki you are running:
- 如果您運行的是MediaWiki 1.42或更高版本,請定義配置
$wgVirtualDomainsMapping['virtual-globalblocking'] = ['db' => 'globalblocking'];
(將globalblocking
替換為在上一步驟中創建的資料庫名稱)。 See Manual:$wgVirtualDomainsMapping for more detail on how this configuration value works. - 如果您運行的是MediaWiki 1.41或更早版本,請定義配置
$wgGlobalBlockingDatabase = 'dbname';
,其中dbname
將替換為您在上一步驟中創建的資料庫名稱。 如果您將資料庫命名為globalblocking
,則可以跳過此步驟。
- 如果您運行的是MediaWiki 1.42或更高版本,請定義配置
- Do either of the following depending on the version of MediaWiki you are using:
- 如果您運行的是MediaWiki 1.44或更新版本,請在一個維基上執行
update.php
,這將創建您在上一步驟中定義的資料庫中的表格。 - 如果您運行的是MediaWiki 1.43或更早版本,則在創建數據庫後,應將
tables-generated-globalblocks.sql
中的 SQL 導入全局封鎖數據庫。
- 如果您運行的是MediaWiki 1.44或更新版本,請在一個維基上執行
- 您還需要在每個本地資料庫上執行
update.php
,以添加擴充功能所需的本地表。 完成 – 在您的wiki上至Special:Version,以验证已成功安装。
描述 | |||
---|---|---|---|
$wgApplyGlobalBlocks |
是否遵守本維基上的全域封鎖。 這用於在一個維基上設置全局封鎖,但實際上並不在該維基上應用(即人們可以在該維基上對封禁提出異議)。 | ||
$wgGlobalBlockingBlockXFF |
The flag $wgGlobalBlockingBlockXFF , set to true by default, causes blocks to apply to all of the IP addresses in the X-Forwarded-For (XFF) header. Set this flag to false to disable this feature. For more details, see T25343. | ||
$wgGlobalBlockingCIDRLimit |
Largest global rangeblocks allowed, set by CIDR prefix. The format is the same as $wgBlockCIDRLimit and the default values are /16 for IPv4 and /19 for IPv6, as with $wgBlockCIDRLimit. | ||
$wgGlobalBlockingDatabase |
globalblocks table. This table is on a different database because only one table is used for all wikis in a wiki farm. | ||
$wgGlobalBlockRemoteReasonUrl |
Full path to api.php to use to expand templates in block reasons. | ||
$wgGlobalBlockingAllowedRanges |
A list of ranges or IP addresses which are exempted from all global blocks which target the ranges or IP addresses. This exemption does not apply to global account blocks (even if the user is on an exempt range or IP address). | ||
$wgGlobalBlockingCentralWiki |
The ID of the central wiki where global blocks are performed. Used to provide a link to the global block log which is likely to have entries, instead of the local log which is unlikely to contain entries. If the value is false , then the local log is used. | ||
$wgGlobalBlockingMaximumIPsToRetroactivelyAutoblock |
| ||
$wgGlobalBlockingMassGlobalBlockMaxTargets |
Special:MassGlobalBlock . |
API
Two API modules are provided, one to (un)block users, and another to view existing global blocks. They are documented at Extension:GlobalBlocking/API.
Usage
Globally (un)blocking
The following requires appropriate permissions, assigned by default to stewards, which by default can be added or removed by bureaucrats.
- GlobalBlock
To make a global block:
- Go to Special:GlobalBlock.
- Enter the target you want to block. This can be an account post MediaWiki 1.43, an IPv4 address or range up to $wgGlobalBlockingCIDRLimit (by default /16, and also /16 hardcoded before that variable was introduced), or any IPv6 address or range up to $wgGlobalBlockingCIDRLimit (by default /19; /4 before that variable was introduced).
- You may decide you want to only block anonymous users, which can only be done for blocks on IPv4 or IPv6 addresses. To only block anonymous users, check the checkbox.
- Submit the form. The target of the block is now globally blocked on your wikis that opt in to the global blocking. Account creation is blocked (even if you selected "anonymous users only": phab:T42190), and the blocked user cannot edit any associated user talk pages on any wiki affected and opted in to the global block. If : is installed, globally blocked IP addresses are prohibited from viewing the abuse log if the particular wiki is opted in to the block.
- GlobalUnblock
To remove a global block:
- Go to Special:GlobalUnblock and click "Remove a global block".
- Enter the target of the block you want to remove and the reason, and submit the form. The account, IP address, or IP range will no longer be globally blocked.
- MassGlobalBlock
MediaWiki版本: | ≥ 1.44 |
You can remove, modify, and create global blocks using Special:MassGlobalBlock for many targets at once. The first step of this form is to lookup the global block status of a list of targets provided in an input. Then you can use the form to globally block or globally unblock, with the relevant parameters applied to each target.
Local status
Administrators can disable the global block on the wiki where they have administrator rights. This is done through using the Special:GlobalBlockStatus page.
See also
- Combating spam
- Combating vandalism
- BulkBlock Extension — an extension that allows administrators to easily block multiple users at once on a MediaWiki website.
![]() | 此用于一个或多个维基媒体项目。 这可能意味着足够稳定、运作足够良好,可以用在这样的高流量的网站上。 请在维基媒体的CommonSettings.php和InitialiseSettings.php中查找此的名称以查看哪些网站安装了该。 特定wiki上的已安装的的完整列表位于Special:Version页面。 |
![]() | 此在以下wiki农场/托管网站和/或软件包中提供: 這不是一份權威名單。 即使某些wiki农场/托管网站和/或软件包未在这里列出,它们也可能提供此。 请检查你的wiki农场/托管网站或软件包以确认提供情况。 |