Exterior Memory:Monitoring Configuration

Monitoring
Monitor changes in your wiki is useful to keep informed and combat spam. Do not underestimate the importance of the spam fight. You can of course lock down your wiki to the point no one, neither spammer nor genuine user, can use it. Or you can just have some smart system in place to alert you about (odd) changes, so you can quickly revert them.

Monitoring can involve:
 * Sent an e-mail alert when a new user registers an account
 * Sent an e-mail alert when a page is created, edited or deleted.

Reviewing Edits
One of the best features of MediaWiki is to review edits. This is called patrolling.

While all edits are made in real time, they are marked as unpatrolled (unreviewed). An administrator (or someone else with the patrol user right) can then patrol (review) all edits, and either mark them as patrolled or revert them.

Patrolling is done in the Special:RecentChanges page. Unpatrolled pages have a red exclamation mark. An administrator can click 'diff', view the change and either click the link "Rollback" or "Mark as patrolled".

I added an Editor group which have their edits automatically marked as reviewed (autopatrol), but only allow an administrator (sysop) to do the actual reviewing:

$wgGroupPermissions['Editor']['autopatrol']        = true; # Mark as "approved" by default $wgGroupPermissions['sysop']['patrol']             = true; # default: true $wgGroupPermissions['sysop']['autopatrol']         = true; # default: true $wgUseNPPatrol = true; # newly created pages are also marked for patrolling.

New User Email Alert
Required: New User Email Notification extension. Not to be confused with another extension by the same name.

The following configuration will sent user JohnDoe a message for every new account that is created:

// Mail when a new account is created require_once("$IP/extensions/NewUserNotif/NewUserNotif.php"); $wgNewUserNotifTargets = array("JohnDoe");

Page Change Email Alert
First of all, you should set the following two variables to allow users to "watch" pages, thus get e-mail after changes.

$wgEnotifUserTalk = true; $wgEnotifWatchlist = true;

Alternatively, you can set $wgUseEnotif to true, and keep the above functions disabled. $wgUseEnotif = true;

In order to get notifications for all changes, use the [$wgUsersNotifiedOnAllChanges] configuration:

$wgUseEnotif = true; $wgUsersNotifiedOnAllChanges = array('JohnDoe'); # this user gets mail for every page change.

Fine Grain Page Change Email Alerts
The above setting prompts your for all changes, including your own changes and changes made by other (trusted) administrators.


 * 1) To only receive mail on changes made by others. use the AutoWatch extension.
 * 2) To only receive mail on unpatrolled changes, MediaWiki needs to be patched. See MediaWiki bug 33537.

The disadvantage of AutoWatch is that it is not very flexible: at first deployment, one has to manually add all existing pages to the watchlist.

wgUsersNotifiedOnUnpatrolledChanges = array('JohnDoe');
 * 1) This configuration option is NOT yet implemented

wgUsersNotifiedOnOtherUsersChanges = array('JohnDoe');
 * 1) This configuration option is NOT yet implemented