Extension:Notificator

Extension:Notificator allows you to place a notification button on a page (or a set of pages, through a template). When the button is pressed, an e-mail containing the changes since the last notification, or just a link to the page if there was no notification before, is sent to an e-mail address. The e-mail address can be pre-defined, or it can be left empty, which causes the extension to show an input field next to the notification button, where any e-mail address can be entered.

The use case for which the extension was written, is the following: A company internal Wiki where task pages are work assignments, and where the project manager needs a way to notify (with the click of a button) the assigned resource about changes to the work assignments. The standard MediaWiki notification system does not work for multiple reasons:
 * 1) the assigned resource may not have all task pages on his/her watchlist
 * 2) the project manager may want to make multiple edits, and would only want to notify after all edits are done, not for each individual edit
 * 3) the project manager would want to notify one person after one edit, and another person after another edit - not everyone on every edit

There are probably other use cases where this functionality could be useful as well.

Usage
The extension can be used in two ways:
 * 1) with a pre-set e-mail address to be notified:
 * 2) without a pre-set e-mail address, in which case any e-mail address can be entered right on the page:

In most cases, one of these parser function invocations will be in a template that gets transcluded into a class of pages.

Details
When the "notify" button gets clicked, the following happens:
 * Notificator checks if that e-mail address has already received a notification about the page the button is on
 * If it has, Notificator checks whether the notification was for the current revision
 * If it was for the current revision, it does not send another notification.
 * If it was not for the current revision, it sends a mail containing a link to the page, and the differences between the current and the last notified revision
 * If Notificator has never before sent a notification about this page, yet, it sends a mail containing just a link to the page

The person clicking the button sees the e-mail that gets send, or a message that no notification was sent.

Known issues

 * The notification e-mail is being sent in the language of the user that clicks the Notificator button - which might not be a language understood by the person being notified.

Installation
To install this extension, add the following to LocalSettings.php:

Now please run the update.php script, which will create the necessary 'notificator' table in your Wiki's database.

$ngFromAddress
The e-mail address the notification e-mails appear to be coming from. If this is not set, $wgPasswordSender will be used instead.

Recent changes

 * Version 1.1: It's now possible to notify up to 10 e-mail addresses at the same time. E-mail addresses need to be comma-separated (e.g. ). When updating from 1.0.x, you need to run the update.php script again.