Extension:EmailDiff

This page is a translated version of the page Extension:EmailDiff and the translation is 67% complete.
Other languages:
Deutsch • ‎English • ‎Türkçe • ‎français • ‎中文 • ‎日本語
MediaWiki 拡張機能マニュアル
OOjs UI icon advanced.svg
EmailDiff
リリースの状態: 安定
実装 通知
説明 Send textual diffs of page changes inside the notification emails
作者 Greg Sabino Mullane (Turnsteptalk)
最新バージョン 1.9 (2017-11-14)
MediaWiki 1.29+
ライセンス MIT ライセンス
ダウンロード
  • $wgEmailDiffSubjectSuffix
  • $wgEmailDiffCommand
translatewiki.net で翻訳を利用できる場合は、EmailDiff 拡張機能の翻訳にご協力ください
使用状況とバージョン マトリクスを確認してください。

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.

インストール

  • ダウンロードして、ファイルを extensions/ フォルダー内の EmailDiff という名前のディレクトリ内に配置します。
  • 以下のコードを 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 ] );
  •   完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

テンプレートの編集

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;

Configuration parameters

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.