Rozšíření:EmailDiff

This page is a translated version of the page Extension:EmailDiff and the translation is 46% complete.
Základní informace k tomuto rozšíření MediaWiki
EmailDiff
Stav rozšíření: bez správce
Zavádění Oznámení
Popis Odesílá textové rozdíly změn stránky v emailech s upozorněním
Napsal(i) Greg Sabino Mullane (Turnstepdiskuse)
Nejnovější verze 1.9 (2017-11-14)
MediaWiki 1.29+
Licence Licence MIT
Zdrojový kód
  • $wgEmailDiffSubjectSuffix
  • $wgEmailDiffCommand
Čtvrtletní stahování 2 (Ranked 145th)
Přeložte rozšíření EmailDiff, používá-li lokalizaci z 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.

Instalace

  • Ke stažení soubor/y a vložte je do adresáře pojmenovaného EmailDiff ve vaší složce extensions/.
  • Na konec vašeho souboru LocalSettings.php přidejte následující kód:
    wfLoadExtension( 'EmailDiff' );
    
    A new hook will need to be added to the file includes/mail/EmailNotification.php. Inside the function sendPersonalised, right before the "return" line, add:
Hooks::run( 'SendNotificationEmail',
    [ $watchingUser, $this->oldid, $this->title, &$headers, &$this->subject, &$body ] );
  •   Dokončeno – Přejděte na stránku Special:Version vaší wiki a zkontrolujte, zda bylo rozšíření úspěšně nainstalováno.

Upravit šablonu

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

 

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

$wgDefaultUserOptions['enotifshowdiff'] = true;

Konfigurační parametry

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.