Extension:CollabPatrol
Release status: beta |
|
|---|---|
| Implementation | Special page, API, Database |
| Description | Collaborative revision patrolling: flag, assign and track revisions needing a second review, with a per-diff discussion panel and chat moderation tools. |
| Author(s) | Muffy, Janus (User Janus on French Vikidia) |
| Latest version | 1.1.0 (2026-05-06) |
| MediaWiki | 1.43+ |
| PHP | 8.1+ |
| Licence | No licence specified |
| Download | CollabPatrol.zip https://github.com/muffy37/CollabPatrol/blob/main/README.md |
| Translate the CollabPatrol extension if it is available at translatewiki.net | |
CollabPatrol is a MediaWiki extension that brings collaborative revision patrolling to your wiki. It started as a JavaScript gadget for the Vikidia project and has since grown into a full extension available for any MediaWiki wiki.
Instead of patrolling alone, patrollers can flag a revision they are unsure about so other patrollers know it needs a second look. Flagged revisions are highlighted in Recent Changes, making the workload visible to the whole team. A discussion panel is available on each flagged diff, with dedicated chat moderation including chat ban and unban.
Installation
[edit]- Download the archive and extract the
CollabPatrolfolder into yourextensions/directory. - Add the following line at the bottom of your
LocalSettings.php:
wfLoadExtension( 'CollabPatrol' );
- Run the database update script:
php maintenance/run.php update
- Rebuild localisation cache:
php maintenance/run.php rebuildLocalisationCache
- Navigate to Special:Version to verify the extension is installed.
Permissions
[edit]Three rights are added by this extension:
| Right | Default groups | Description |
|---|---|---|
collabpatrol-use
|
patroller, sysop
|
Flag, take and finish patrol entries |
collabpatrol-admin
|
sysop
|
Manage all patrol entries and full CollabPatrol moderation |
collabpatrol-chatmod
|
sysop
|
Moderate chat messages and manage chat bans without full admin access |
You can override these in LocalSettings.php:
$wgGroupPermissions['patroller']['collabpatrol-use'] = true;
$wgGroupPermissions['sysop']['collabpatrol-admin'] = true;
$wgGroupPermissions['sysop']['collabpatrol-chatmod'] = true;
Configuration
[edit]All settings can be added to LocalSettings.php.
| Variable | Type | Default | Description |
|---|---|---|---|
$wgCollabPatrolExpirationDelay
|
integer | 172800 (48 h)
|
Seconds before a patrol entry expires automatically |
$wgCollabPatrolUrgencyThreshold
|
integer | 3600 (1 h)
|
Seconds before a pending entry is highlighted as urgent in Recent Changes |
$wgCollabPatrolAutoPatrol
|
boolean | true
|
Automatically mark the revision as patrolled when its status is set to finished |
$wgCollabPatrolEnableEcho
|
boolean | true
|
Send Echo notifications when patrol status changes |
$wgCollabPatrolChatEnabled
|
boolean | true
|
Enable the per-diff discussion panel (shown on diffs marked pending or in progress) |
$wgCollabPatrolChatMaxLength
|
integer | 500
|
Maximum character length for a single chat message |
$wgCollabPatrolChatModerators
|
array | []
|
Optional additional usernames allowed to moderate chat, in addition to users with collabpatrol-admin or collabpatrol-chatmod
|
$wgCollabPatrolChatBannedWords
|
array | []
|
Words or patterns forbidden in chat messages (case-insensitive) |
$wgCollabPatrolChatAutoDelete
|
boolean | true
|
Automatically delete chat messages when the patrol entry is finished or removed |
Example configuration:
$wgCollabPatrolUrgencyThreshold = 1800;
$wgCollabPatrolChatBannedWords = [ 'spam', 'badword' ];
$wgGroupPermissions['patroller']['collabpatrol-chatmod'] = true;
$wgCollabPatrolAutoPatrol = false;
Usage
[edit]For patrollers
[edit]- Open a diff page for an unpatrolled revision.
- Click Flag and select a reason (vandalism, complex edit, needs sourcing, etc.).
- The revision now appears with a coloured marker in Special:RecentChanges.
- Another patroller clicks Take to signal they are reviewing it.
- Once done, they click Finish. If
$wgCollabPatrolAutoPatrolis enabled, the revision is also marked as patrolled in MediaWiki.
The discussion panel at the bottom of a flagged diff allows patrollers to leave short notes for each other.
Chat moderation
[edit]Users with collabpatrol-admin or collabpatrol-chatmod can:
- Delete chat messages
- Ban a user from CollabPatrol chat
- Unban a user from CollabPatrol chat
A chat ban only affects CollabPatrol chat. It does not block the account in MediaWiki.
Dashboard
[edit]Special:CollabPatrol shows all active patrol entries, their current status, and statistics per patroller. Entries can be filtered by status (pending / in progress).
Status lifecycle
[edit](unpatrolled revision)
↓
pending ← Flag button
↓
in_progress ← Take button
↓
finished ← Finish button → revision marked patrolled (if auto-patrol on)
User preferences
[edit]Each user can configure CollabPatrol in Special:Preferences, under Appearance > Collaborative patrol.
Available options include:
- Auto-refresh interval
- Completion notification
- Chat open by default
- Show or hide history block
- Compact layout mode
Hooks used
[edit]- LoadExtensionSchemaUpdates - creates the database tables
- ChangesListInsertArticleLink - adds status markers in Recent Changes
- BeforePageDisplay - loads JS/CSS modules on diff and RC pages
- DifferenceEngineViewHeader - loads modules on diff pages
- SkinTemplateNavigation::Universal - adds the CollabPatrol tab to the page toolbar
- SpecialPageAliases - registers localised aliases for Special:CollabPatrol
- GetPreferences - adds per-user CollabPatrol preferences
See also
[edit]- Echo - optional for notifications
Source code
[edit]- Beta status extensions
- Special page extensions
- API extensions
- Database extensions
- LoadExtensionSchemaUpdates extensions
- ChangesListInsertArticleLink extensions
- BeforePageDisplay extensions
- DifferenceEngineViewHeader extensions
- SkinTemplateNavigation::Universal extensions
- SpecialPageAliases extensions
- GetPreferences extensions
- Extensions with no license specified
- All extensions
