Extension:EmailDiff
This extension requires patches to core MediaWiki code . Extensions implemented using patches may be disabled by or interfere with upgrades and security patches. If a suitable alternative without a patch is available, we recommend you use that extension instead. |
This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored. If you are interested in taking on the task of developing and maintaining this extension, you can request repository ownership. As a courtesy, you may want to contact the author. You should also remove this template and list yourself as maintaining the extension in the page's {{extension}} infobox. |
![]() Release status: unmaintained |
|
---|---|
Implementation | Notify |
Description | Send textual diffs of page changes inside the notification emails |
Author(s) | Greg Sabino Mullane (Turnsteptalk) |
Latest version | 1.9 (2017-11-14) |
MediaWiki | 1.29+ |
License | MIT License |
Download | |
|
|
Quarterly downloads | 6 (Ranked 172nd) |
Translate the EmailDiff extension if it is available at translatewiki.net | |
The EmailDiff extension modifies outgoing notification emails by providing a text diff of all changes made. This enables you to see the changes without having to leave your mail client.
InstallationEdit
- Download and place the file(s) in a directory called
EmailDiff
in yourextensions/
folder. - Add the following code at the bottom of your
LocalSettings.php
:A new hook will need to be added to the filewfLoadExtension( 'EmailDiff' );
includes/mail/EmailNotification.php
. Inside the functionsendPersonalised
, right before the "return" line, add:
Hooks::run( 'SendNotificationEmail',
[ $watchingUser, $this->oldid, $this->title, &$headers, &$this->subject, &$body ] );
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Edit the templateEdit
The extension works by replacing the word $PAGEDIFF in the email notification template with the actual diff. Therefore, you will need to edit the MediaWiki:Enotif_body page on your wiki to add that string.
It is recommended that you put some short summary information at the top before the diff. Here is one suggested layout:
Page: $PAGETITLE Summary: $PAGESUMMARY $PAGEMINOREDIT User: $PAGEEDITOR Time: $PAGEEDITDATE $PAGEDIFF $NEWPAGE
Activate for usersEdit
In Preferences -> User profile
add a tick in Send a diff of changes
Or activate the extension for all users in LocalSettings.php by adding:
$wgDefaultUserOptions['enotifshowdiff'] = true;
Configuration parametersEdit
If you need to change these, add them to your LocalSettings.php after the wfLoadExtension command above:
$wgEmailDiffSubjectSuffix
- String to be added to the end of the subject line. Defaults to (diff)$wgEmailDiffCommand
- Command to perform the diff. Seldom needs to be changed from the default.