Extension:GlobalBlocking
From MediaWiki.org
|
Release status: beta |
|||
|---|---|---|---|
| Implementation | Special page, User identity | ||
| Description | Allows IP addresses to be blocked on multiple wikis. | ||
| Author(s) | Andrew Garrett (WerdnaTalk) | ||
| MediaWiki | 1.13-alpha | ||
| License | GPL | ||
| Download | Download snapshot |
||
|
|||
|
|||
|
|||
|
check usage (experimental) |
|||
The GlobalBlocking extension allows a user with the appropriate permissions to block a single IP address on all Wikimedia projects sharing the same globalblocking database. It is intended to be used for combating severe cross-wiki vandalism and spam.
[edit] Installation instructions
Download the latest snapshot and extract it to your extensions directory.
Add this line to LocalSettings.php:
require_once($IP.'/extensions/GlobalBlocking/GlobalBlocking.php');
You will also need to set up a database for this extension to work. At a minimum (all wikis running on the same host), you need to create a local database called 'globalblocking', and grant all database users that your wikis run as full permissions on that database (at a mimimum, SELECT, UPDATE, INSERT, DELETE).
[edit] API
GlobalBlocking adds an API list module "globalblocks" to list globally blocked IP addresses. It is not possible to do the actual blocking via the API.
- Parameters
bgstart: The timestamp to start enumerating frombgend: The timestamp to stop enumerating atbgdir: The direction in which to enumerate (older, newer)bgids: Pipe-separated list of block IDs to list (optional)bgaddresses: Pipe-separated list of addresses to search for (optional)bgip: Get all blocks applying to this IP or CIDR range, including range blocks. (Cannot be used together with bkusers. CIDR ranges broader than /16 are not accepted.)bglimit: The maximum number of blocks to listbgprop: Which properties to get (id|address|by|timestamp|expiry|reason|range)
- Example
List all global blocks
<api> <query-continue> <globalblocks bgstart="2009-10-03T12:10:59Z" /> </query-continue> <query> <globalblocks> <block id="2301" address="82.49.115.227" /> <block id="2297" address="59.86.157.24" anononly="" /> <block id="2296" address="83.79.31.175" anononly="" /> <block id="2287" address="81.18.116.66" /> <block id="2286" address="141.223.237.76" /> <block id="2280" address="125.184.11.164" /> <block id="2279" address="124.197.47.74" /> <block id="2278" address="115.139.25.18" /> <block id="2277" address="111.92.160.26" /> <block id="2276" address="89.248.172.146" /> </globalblocks> </query> </api>
This extension is being used on one or more of Wikimedia's wikis. It means that the extension is stable and works well enough to be used by such high traffic websites. A full list of the extensions installed on a particular wiki is produced by Special:Version on that wiki.