Email notification (documentation): Difference between revisions

Content deleted Content added
Nyxos (talk | contribs)
Rv last two edits: One is vandalism and the other is pointless since there is no reason to categorize a pointer to an archived extension
Tag: Manual revert
 
(278 intermediate revisions by 32 users not shown)
Line 1:
{{MovedToMediaWiki|Extension:emailEmail notification navigation}}
Moved to MediaWiki.org with full history --19:01, 28 November 2006 (UTC)
__TOC__
===Email notification on changes of watch-listed pages and/or user_talk pages ===
 
This is main page of the '''E-Mail Notification ''(enotif)''''' which discloses a reasonable scheme allowing for page change notifications via e-mail. Maintainers of this feature are [[User:Nyxos|Tom Gries]] [[{{SERVER}}{{localurl:Special:Emailuser|target=Nyxos}} mail]] and Markus Arndt, Germany. August-November 2004.
==== Internationalisation (I18N) ====
* [[Enotif/De|Deutsche Dokumentation/German Documentation]] (im Aufbau/under construction)
----
 
=== Download ===
{| border=1
! colspan=2 | Currently available patches (see also [[Email notification versions|version history]])
|-
| MediaWiki '''release version 1.3.7''' || [[Image:new.png]] Enotif v1.34 for MediaWiki 1.3.7 incl. diff file<br>download from http://www.tgries.de/mw/enotif/mw137+en134.tgz (1,7 MB)
|-
| MediaWiki '''release version 1.3.7''' || [[Image:new.png]] Enotif v1.34 against MediaWiki 1.3.7 (diff file only)<br>download from http://bugzilla.wikipedia.org/show_bug.cgi?id=454
|-
| MediaWiki developer's version from the '''CVS 1.4 HEAD''' || Enotif v1.30 against CVS 1.4 HEAD (diff file only)<br>download from http://bugzilla.wikipedia.org/show_bug.cgi?id=454
|-
| MediaWiki versions < 1.3.7 || see my [[Email notification archive|archive]]
|}
 
----
 
=== How it works ===
The watching user X gets a short E-Mail
 
* if the WikiAdmin has globally enabled this feature in the DefaultSettings.php or LocalSettings.php
* and if the user has stored an email address in the ''user preferences''
* and if the user has enabled the personal enotif options in the ''user preferences''
 
on the events that
 
* someone else changes a page listed in user X's '''watch list'''
* or someone else changes the '''user_talk page''' of user x (user_talk pages are internally treated separately)
 
All users can enjoy a side-effect of enotif - regardless whether they have enabled or disabled their personal enotif options:
 
* a beamy new ''marker'' <font size=-2 style="background:#00FF00">&nbsp;updated (since my last visit)&nbsp;</font> indicates new contents on watch-listed pages since the last visit (of user X). The "updated" marker can be seen on a) the watchlist page, on b) the recent changes page close to the '''bold-titled''' page names of pages being watched, and on c) the page history showing all revisions of a page. Be reminded: your own changes do never trigger notification mails or "updated" markers, so you are only informed about changes of somebody ''else''.
 
[[Image:Enotif133_rcview_usemod_style_with_one_updated_page.png|thumb|none|Enotif 1.33: Recent changes view in UseMod style and showing not yet visited versions of a watched page]] See further screenshots on the [[Email notification versions|versions]] page.
----
 
=== What you can expect - feature overview ===
 
* The E-Notif patch was developed for small- to medium-scale MediaWiki implementations. '''Personalised e-mails''' (with recipient's name; pages changes expressed in local time) for every watching user. [The program flow will be changed next versions to allow bulk notification mails to be sent, depending on parameters, to save procession time and bandwidth.]
 
* The sub-feature ''notification on user_talk page (UTP) changes'' '''could be enabled even for the largest WikiPedia''', because the number of UTP changes is surprisingly low - according to Brion Vibber. About 800 ''alien'' UTP changes (changes by others than yourself) per day have been counted in August 2004, which would result in the same (relatively low) number of enotifs sent to the UTP owners.
 
* The features are configurable (enable/disable) in module DefaultSettings.php respectively LocalSettings.php for the WikiAdmin, who can spearately allow or disallow notifications for changes on
*# general pages (all name spaces) (AO/UO) and/or
*# user_talk pages. (AO/UO)
 
* The notification '''message''' is one page ((*): four pages) in MediaWiki:namespace and you can use therein '''named variables''' such as $PAGEEDITORUSERNAME and $PAGEEDITTIMESTAMPUTC (see real example below).
 
* (*) The notification message is sent out comprising a direkt link to the difference view (diff) between the current page version (when user opens the mail and clicks onto that link) and the last one the watching user has seen (i.e. the page version just before the page change notification was sent). This appears to be very convenient and was requested by Chris and other users.
 
* Your '''own changes do never trigger''' a notification mail sent to yourself.
 
* ''Minor edits'' do or do not trigger notification e-mails sent out, depending on just another admin setting. (AO/UO)
 
* ''All'' UTP changes trigger a notification to be sent, no matter whether the changing editor declared the change as ''minor edit'' or not.
 
* Only '''one mail is sent''' on the first page change. Further mails are suppressed until you re-visit the changed page ''or'' until you reset all notification flags. A new button is introduced for this purpose on the watchlist page.
 
* On the watchlist page, a new marker <font size=-2 style="background:#00FF00">&nbsp;updated (since my last visit)&nbsp;</font> indicates such pages for which a notification mail was sent, meaning that the page has new contents since your last visit. (AO/UO)
 
* The marker is also shown on your ''recent changes'' page and on ''page history''(*) pages for the pages watched by you (already marked '''bold''') and which do have new contents since your last visit. (AO/UO)
 
* (*) Recent changes view and page(article) footers show number of watching users. (AO)(UO)
 
* If you wish so, you ''can'' as usual add '''not-yet existing page names''' to your watch list and you ''will'' receive an email notification as someone creates a page with that name. Again: you will see the marker flown there until you really visit the (in this case: new) pages with new contents.
 
* Debuggers' option: two different single '''beeps on the server''' signal the sending of notification mails for pages and user_talk pages (default: disabled, see [[Email notification list of changes]]). (AO)
 
:(*) implemented in Enotif versions > 1.21
:(AO) Admin option in DefaultSettings.php or LocalSettings.php allow to disable these extensions.
:(UO) User Option in ''user preferences''
----
 
=== Named variables for sysop use in email subject and body template ===
Sysops can use the following ''named'' variables to compose the email notification message:
 
The variables ending with "_QP" are needed for composing correct mail headers for watching usernames and pagetitles with non-ASCII characters, if you want to have these texts there and not only in the mail body. Do ''not'' use _QP variables in the email ''body''.
 
$WATCHINGUSERNAME
$WATCHINGUSERNAME_QP (QP = "quoted-printable", only for use in mail headers)
$WATCHINGUSEREMAILADDR
$PAGETITLE
$PAGETITLE_QP (QP = "quoted-printable", only for use in mail headers)
$PAGEEDITORNAMEANDEMAILADDR
$PAGEEDITORNAMEANDEMAILADDR_QP (QP = "quoted-printable", only for use in mail headers)
$PAGEEDITOR
$PAGEEDITOR_QP (QP = "quoted-printable", only for use in mail headers)
$PAGEEDITDATE (expresses the page edit date/time in the watching user's local time)
$PAGEEDITDATEUTC
$OLDID (id of the last-visited revision of page $PAGETITLE)
$PAGEMINOREDIT
$PAGESUMMARY
$WIKIADMINEMAILADDR
<nowiki>{{MediaWiki:Sitetitle}}</nowiki>
----
 
=== Enotif configuration parameters in /includes/DefaultSettings.php ===
 
<pre>
/* T. Gries 10.2004
 
THESE ARE MY SUGGESTED FIRST TEST global admin options FOR ENOTIF.
Attention: the defaults might differ from standard media wiki distributions.
 
However, I suggest to start with these which allow to evaluate almost all new features quickly.
user preferences default options SEE AS USUAL /languages/Language.php
*/
 
########################### CAUTION ################# ATTENTION ###############################################
#
# T. Gries 10.2004
#
# SECTION FOR DEVELOPERS / DEBUG / SERVER ADMINS
#
# HERE COME TWO OPTIONS, WHICH ALLOW ACOUSTIC SIGNALS on the server beeper WHEN AN EMAIL IS ACTUALLY SENT OUT.
# YOU MIGHT WISH TO ENABLE THESE, BUT BE CAREFUL, AS A system() CALL IS PERFORMED using the shown parameters.
# I FIND IT VERY USEFUL, but this is a very personal comment. T. Gries
#
# The system speaker beeps when the wiki actually sends out a notification mail (safe default = disabled).
#
# The following strings are passed as parameters to two system() calls in UserMailer.php and UserTalkUpdate.php.
# The system() calls call - in the shown example - the beep 1.2.2 program (LINUX) with different frequencies f [Hz] and length l [msec]
#
# Beep 1.2.2 can be found on http://freshmeat.net/projects/beep/ and I like it.
#
########################### SAFE #################### SAFE #####################################################
$wgEmailNotificationSystembeepForWatchlistPages = ''; # emtpy string disables this feature; this appears to be safe
$wgEmailNotificationSystembeepForUserTalkPages = ''; # empty string disables this feature; this appears to be safe
######ENTER#AT#YOUR#OWN#RISK###CAUTION###### ATTENTION ###################################################
# $wgEmailNotificationSystembeepForWatchlistPages = '/usr/bin/beep -f 4000 -l 20 &'; # a system() call with exactly this string as parameter is executed when such a mail is sent
# $wgEmailNotificationSystembeepForUserTalkPages = '/usr/bin/beep -f 2000 -l 20 &'; # ditto., but for UserTalk page changes
########################### CAUTION ################# ATTENTION ###############################################
 
# For email notification on page changes T.Gries/M.Arndt 10.2004
$wgPasswordSender = $wgEmergencyContact;
$wgEmailNotificationMailsSentFromPageEditor = false; # false: Enotif mails appear to come from:$wgEmergencyContact; true: from:PageEditor
 
# If the variable is set true, users get a corresponding option in their preferences and can choose to enable or disable at their discretion
$wgEmailNotificationForWatchlistPages = true ;
 
# If the variable is set true, users get a corresponding option in their preferences and can choose to enable or disable at their discretion
$wgEmailNotificationForUserTalkPages = true;
 
# If the variable is set true, users get a corresponding option in their preferences and can choose to enable or disable at their discretion
$wgEmailNotificationRevealPageEditorAddress = true ; # reply-to address may be filled with page editor's address (if user allowed this in the preferences)
 
# If the variable is set true, users get a corresponding option in their preferences and can choose to enable or disable at their discretion
$wgEmailNotificationForMinorEdits = true; # false: "minor edits" on pages do not trigger notification mails.
# # Attention: _every_ change on a user_talk page trigger a notification mail (if the user is not yet notified)
 
# Show recent changes in UseMod style, i.e. only the recent change of a page is listed
# If the variable is set true, users get a corresponding option in their preferences and can choose to enable or disable at their discretion
$wgRCUseModStyle = true;
 
# Show watching users in RC views
# If the variable is set true, users get a corresponding option in their preferences and can choose to enable or disable at their discretion
$wgRCShowWatchingUsers = true;
 
# Show watching users in Page views
# If the variable is set true, users get a corresponding option in their preferences and can choose to enable or disable at their discretion
$wgPageShowWatchingUsers = true;
 
# Show "Updated (since my last visit)" marker in RC view, watchlist and history view for watched pages with new changes
# If the variable is set true, users get a corresponding option in their preferences and can choose to enable or disable at their discretion
$wgShowUpdatedMarker = true;
</pre>
----
 
=== ''Notification mail headers and body templates (delivered within Enotif versions > 1.21)'' ===
 
Note: $PAGEEDITORNAMEANDEMAILADDR_QP is replaced with the page editor's email address, if the person has not disabled it (in user preferences: to show the email address to other users). In other words, Enotif does pay attention to users' privacy settings.
 
The following four templates are included in module /languages/Language.php.
 
email_notification_to:
<pre>
$WATCHINGUSERNAME_QP <$WATCHINGUSEREMAILADDR>
</pre>
 
email_notification_subject:
 
<pre>
{{SITENAME}} page $PAGETITLE_QP has been changed by $PAGEEDITOR_QP
</pre>
 
email_notification_headers:
<pre>
MIME-Version: 1.0
Content-type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-Mailer: MediaWiki Notification Mailer
Reply-To:$PAGEEDITORNAMEANDEMAILADDR_QP
</pre>
 
Added by the Enotif script:
From:WikiAdmin <$WIKIADMINEMAILADDR>
OR
From:$PAGEEDITORNAMEANDEMAILADDR_QP
 
email_notification_body:
<pre>
Dear $WATCHINGUSERNAME,
 
the {{SITENAME}} page $PAGETITLE has been changed on $PAGEEDITDATE by $PAGEEDITOR,
see {{SERVER}}{{localurl:$PAGETITLE}} for the current version.
 
See {{SERVER}}{{localurl:$PAGETITLE|diff=0&oldid=$OLDID}} for all changes since your last visit.
see {{SERVER}}{{localurl:$PAGETITLE|direction=next&oldid=$OLDID}} for the next revision after your last visit.
 
Editor's summary: $PAGESUMMARY $PAGEMINOREDIT
Contact the editor:
mail {{SERVER}}{{localurl:Special:Emailuser|target=$PAGEEDITOR}}
wiki {{SERVER}}{{localurl:User:$PAGEEDITORE}}
 
There will be no other notifications in case of further changes unless you visit this page.
You could also reset the notification flags for all your watched pages on your watchlist.
 
Your friendly {{SITENAME}} notification system
 
--
To change your watchlist settings, visit
{{SERVER}}{{localurl:Special:Watchlist|magic=yes}}
 
Feedback and further assistance:
{{SERVER}}{{localurl:WikiHelpdesk}}
</pre>
----
=== Reference list of users, who actually use my patch and their comments ===
* --[[User:Nyxos|Tom Gries]] [[{{SERVER}}{{localurl:Special:Emailuser|target=Nyxos}} mail]] 19:27, 5 Nov 2004 (UTC) no comments, as I wrote it.
*