Extension:EmailDiff

From mediawiki.org
Jump to navigation Jump to search
This page is a translated version of the page Extension:EmailDiff and the translation is 100% complete.
Other languages:
Deutsch • ‎English • ‎Türkçe • ‎français • ‎中文 • ‎日本語
Manuel des extensions MediaWiki
OOjs UI icon advanced.svg
EmailDiff
État de la version : stable
Implémentation Notifier
Description Envoyer des différences textuelles des modifications de page dans les e-mails de notification
Auteur(s) Greg Sabino Mullane (Turnstepdiscussion)
Dernière version 1.9 (2017-11-14)
MediaWiki 1.29+
Licence Licence MIT
Téléchargement
  • $wgEmailDiffSubjectSuffix
  • $wgEmailDiffCommand
Traduire l’extension EmailDiff sur translatewiki.net
Vérifier la matrice des utilisations et des versions.

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.

Installation

  • Télécharger et placez le(s) fichiers (s) dans un répertoire appelé EmailDiff dans votre dossier extensions/.
  • Ajoutez le code suivant à la fin de votre fichier LocalSettings.php :
    wfLoadExtension( 'EmailDiff' );
    
    A new hook will need to be added to the file includes/mail/EmailNotification.php. Inside the function sendPersonalized, right before the "return" line, add:
Hooks::run( 'SendPersonalizedNotificationEmail',
    [ $watchingUser, $this->oldid, $this->title, &$headers, &$this->subject, &$body ] );
  • Yes Fait – Accédez à Special:Version sur votre wiki pour vérifier que l'extension a bien été installée.

Modifier le modèle

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 users

In Preferences -> User profile add a tick in Send a diff of changes

TickEmailDiffActive.png

Or activate the extension for all users in LocalSettings.php by adding:

$wgDefaultUserOptions['enotifshowdiff'] = true;

Paramètres de configuration

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.