Extension:EmailDiff/zh
![]() | 此扩展需要对MediaWiki核心代码打补丁 。 使用补丁执行的扩展可能会因为升级与安全补丁而禁用,或干扰二者正常工作。 If a suitable alternative without a patch is available, we recommend you use that extension instead. |
![]() | 此扩展目前不再活跃维护! 尽管它可能仍然工作,但任何错误报告或功能请求将很可能被忽略。 如果您对承担开发与维护该扩展的任务工作感兴趣,您可以请求自己的存储库。 As a courtesy, you may want to contact the author. 或者您应移除该模板,并在页面的{{extension}}信息框中将您自己列为扩展的维护人员。 |
![]() 发行状态: 不再維護 |
|
---|---|
实现 | 通知 |
描述 | Send textual diffs of page changes inside the notification emails |
作者 | Greg Sabino Mullane (Turnstep讨论) |
最新版本 | 1.9 (2017-11-14) |
MediaWiki | 1.29+ |
许可协议 | MIT授權條款 |
下載 | |
|
|
季度下載量 | 0 |
前往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 的底部: A new hook will need to be added to the file
wfLoadExtension( '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 ] );
完成 – 在您的wiki上导航至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.