Extension:AutoModerator

From mediawiki.org
MediaWiki extensions manual
AutoModerator
Release status: unstable
Description Enables community-configured reversion of Machine Language-scored bad edits.
Author(s)
MediaWiki
License No license specified
Download
Help Help:Extension:AutoModerator
Translate the AutoModerator extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The AutoModerator extension is under development by the Moderator Tools team at the Wikimedia Foundation. Read more about the project at Automoderator.

This page will be updated as usage and local setup steps are defined.

Installation[edit]

  • Download and move the extracted AutoModerator folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/AutoModerator
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'AutoModerator' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration[edit]

Internal configuration[edit]

These values are typically set in your LocalSettings.php for local development.

AutoModeratorRevertProbability
Revert risk probability threshold; Edits scored above this value will be reverted; default is 0.99
AutoModeratorUsername
Username for AutoModerator system account; default is AutoModerator
AutoModeratorWikiConfigPageTitle
Name of page used for on-wiki config; must be in NS_MEDIAWIKI and end with .json; only variables listed in AutoModeratorOnWikiConfigAllowList may be overridden on wiki; default is MediaWiki:AutoModeratorConfig.json
AutoModeratorWikiId
language code of project used to target liftwing lang parameter. This must be set per project; the default is null
AutoModeratorEnableWikiConfig
If set to false, on-wiki configuration will be ignored; default is true

On-wiki configuration[edit]

To configure AutoModerator on a wiki, including enabling it to run, local configuration must also be completed at MediaWiki:AutoModeratorConfig.json. For now, this must be edited by directly editing the page, but in the future will incorporate Community configuration for ease of configuring.

AutoModeratorEnableRevisionCheck
Enable AutoModerator automatic revision checks; default is false
AutoModeratorUndoSummary
Edit summary for AutoModerator reverts; uses the same format as i18n message strings, but this is not localized. Default is Undo revision [[Special:Diff/$1|$1]] by [[Special:Contributions/$2|$2]] ([[User talk:$2|talk]])
AutoModeratorUndoSummaryAnon
Similar to above, this is the edit summary for AutoModerator reverts of anonymous editors on wikis with $wgDisableAnonTalk set to false; this currently does not apply to any production wikis and can generally be ignored. Default is Undo revision [[Special:Diff/$1|$1]] by [[Special:Contributions/$2|$2]]

Example MediaWiki:AutoModeratorConfig.json[edit]

This example enables revision checks (and potential reverts) and explicitly sets the edit summary to the default value.

{
    "AutoModeratorEnableRevisionCheck": true,
    "AutoModeratorUndoSummary": "Undo revision [[Special:Diff/$1|$1]] by [[Special:Contributions/$2|$2]] ([[User talk:$2|talk]])"
}