promo­wiki

Doktorandenwiki der {iw,mi}

(deutsche Übersetzung der Seite Notify, Stand 15.10.2006 - evtl. können Teile der Seite MailPosts zur Arbeitserleichterung hier eingebaut werden -- bitte aber in jedem Falle kontrollieren) administrators (basic) - sicher?? FTP-nötig = ServerAdmin

Durch die Einführung von E-Mail Nachricht bei geänderten Seiten (neu) ergibt sich, dass es momentan zwei Seiten zur 'E-mail Nachricht bei geänderten Seiten' gibt. Die Alte ist unter : E-Mail Nachricht bei geänderten Seiten zu erreichen und muss als Dokumentation für Pmwiki-System bis Version 2.1.7 herangezogen werden

Das notify.php Script ermöglicht es einem Seitenadministrator, PmWiki so zu konfigurieren, dass Emails verschickt werden wenn Seiten des Wikis verändert werden. Diese Benachrichtigungen können so eingestellt werden, dass mehrere Seitenveränderungen, die in einem kurzen Zeitintervall stattfinden, in einer einzigen Email zusammengefasst werden (um überlaufende Emailfächer zu verhindern).

Dieses Feature ist besonders für Seiten nützlich, die unregelmäßige Updates haben, da dann die "Recent Changes"-Seite nicht ständig nach neuen Veränderungen durchforstet werden muss.

Damit die Benachrichtigungen funktionieren, muss das notify.php Script, wie in Lokale Anpassungen beschrieben, aktiviert werden. Das funktioniert normalerweise ganz einfach, indem man folgende Zeile in die local/config.php schreibt:

    $EnableNotify = 1;

Wenn das Script erstmal aktiviert ist, erhält das Benachrichtigungssystem seine Einstellungen von der Seite Site.NotifyList (die man beim ersten Mal neu anlegen muss). Die Site.NotifyList Seite bekommt Einträge der Form:

    notify=alice@example.com

Das bedeutet, dass alle Informationen über Veränderungen in den Wiki-Seiten in regelmäßigen Abständen an alice@example.com geschickt werden sollen. Die Site.NotifyList Seite kann mehrere "notify=" Zeilen beinhalten, die Benachrichtigungen werden dann an eben diese Adressen geschickt. Die "notify=" Zeilen können für Leser versteckt werden, indem man sie innerhalb einer (:if false:) Sektion auflistet.

Es gibt eine ganze Reihe Optionen, um die Zahl der Seiten, die eine Benachrichtigung verschicken zu verringern. Die group= und name= Parameter können benutzt werden, um Benachrichtigungen auf bestimmte Seiten oder Gruppen zu beschränken:

    # Schicke Benachrichtigung über die Main-Gruppe an alice@example.com
    notify=alice@example.com group=Main

    # benachrichtige bob@example.com über alle Änderungen auf der HomePage
    notify=bob@example.com name=Main.HomePage

    # benachrichtige charles@example.com über Veränderungen auf allen Seiten außer denen der Gruppe Main
    notify=charles@example.com group=-Main

(Anmerkung: Es scheint als ob hier die übliche PageList Syntax verwendet wird. Mehr Infos über PageList Syntax hier?. -- XES)

ab hier weiter übersetzen. -- Marvin For maintaining arbitrary lists of pages, i.e., "watchlists", it's generally easier to build a trail of pages to be watched. The following entry in Site.NotifyList will send alice@example.com an email containing changes to any of the pages listed in the Profiles.Alice trail:

    # notify Alice of changes to pages listed in Profiles.Alice
    notify=alice@example.com trail=Profiles.Alice

Note that once this entry has been added to Site.NotifyList, Alice can easily change her watchlist by editing the Profiles.Alice page, and doesn't need to edit the Site.NotifyList page. In particular, this means that an administrator can restrict editing of Site.NotifyList, yet allow individuals to maintain custom watchlists in other pages.

Limitations of this feature:

  • only manually-added links on a trail will be acknowleged by the Notify List (no "group=" or other pagelist syntax, nor any "Group.RecentChanges" links, will generate notifications)
  • using an (:include:) directive on the page Site.NotifyList is not an operational work-around.

This is probably a good place to point out that edit access to Site.NotifyList should be controlled, otherwise malicious persons can use the notification capability to flood others' electronic mailboxes. By default, Site.Notify is blocked against edits except by the admin (as is the case for most pages in the Site group). It may also be useful to place a read password on the Site.NotifyList page, to restrict the availability of email addresses from spam harvesters.

Controlling notification frequency

To prevent flooding of recipients' mailboxes, the notify script uses a "squelch" value as the minimum amount of time that must elapse between messages sent to any given email address. The default squelch setting is 10800 (three hours), which means that once a recipient address is sent a notification message, it will not receive another for at least three hours. Any edits that occur during the squelch interval are queued for the next notification message.

The site administrator can change the default squelch interval via the $NotifySquelch parameter

    # enable notifications
    $EnableNotify = 1;
    $NotifySquelch = 86400;    # wait at least one day between notifications

In addition, individual addresses can specify a custom squelch parameter in the Site.NotifyList page:

    # Alice receives at most one email per day
    notify=alice@example.com squelch=86400

    # Bob can get notifications hourly
    notify=bob@example.com trail=Profiles.Bob squelch=3600

    # Charles uses the site default squelch
    notify=charles@example.com 

Because a page will often receive several edits in rapid succession (e.g., a long post followed by several minor edits), a site administrator can also set a $NotifyDelay value that specifies how long to wait after an initial post before sending notifications:

    # enable notifications
    $EnableNotify = 1;
    $NotifySquelch = 86400;    # wait at least one day between notifications
    $NotifyDelay = 300;        # wait five minutes after initial post

Note that the squelch and delay values are minimums; notifications are sent on the first execution of PmWiki after the delay period has expired. For inactive sites, this could be much longer than the specified delay periods. This isn't really considered an issue since timely notifications are less important on relatively inactive sites. (Active sites will generally receive timely notifications.)

Wichtig für MS Windows Installationen

Oftmals sind die Mail-Funktionen von PHP-Engines auf Windowssystemen nicht korrekt konfiguriert. In diesen Fällen muss in die config.php folgende Zeile eingefügt werden:

    ini_set('SMTP','smtp.server.com');

Dabei ist smtp.server.com die Adresse des versendenden Mailservers.

Notify Variables

<< | Variables | >>

$EnableNotify
Tells stdconfig.php to enable the notify script.
        $EnableNotify = 1;          # enable notify
        $EnableNotify = 0;          # disable notify
$NotifyFrom
Return email address to be used in the sent email.
        $NotifyFrom = 'wiki@example.com';
        $NotifyFrom = 'Wiki server <wiki@example.com>';
$NotifyDelay
The length of time (seconds) to wait before sending mail after the first post. Defaults to zero - posts are sent as soon as any squelch period has expired.
        $NotifyDelay = 300;    # send mail 5+ min after first post
$NotifySquelch
The default minimum time (seconds) that must elapse between sending mail messages. Useful when $NotifyDelay is set to a small value to keep the number of mail notification messages down. Defaults to 10800 (three hours). Individual recipients can override this value in the Site.NotifyList page.
        $NotifySquelch = 43200;  # wait 12+ hours between mailings
$NotifyItemFmt
The text to be sent for each changed item in the post. The string "$PostTime" is substituted with the time of the post (controlled by $NotifyTimeFmt below).
        # default
        $NotifyItemFmt = ' * $FullName . . . $PostTime by $Author';

        # include the page's URL in the message
        $NotifyItemFmt =
          " * \$FullName . . . \$PostTime by \$Author\n     \$PageUrl";

        # include the change summary and link to the page's history in the message
        $NotifyItemFmt = 
          " * {\$FullName} . . . \$PostTime by {\$Author}
          \n    Summary: {\$LastModifiedSummary}\n    {\$PageUrl}?action=diff";
$NotifyTimeFmt
The format for dates/times in $PostTime above. Defaults to the value of $TimeFmt.
        $NotifyTimeFmt = 'm-H:%M';  # 2004-03-20 17:44
$NotifyBodyFmt
The body of the message to be sent. The string "$NotifyItems" is replaced with the list of posts (as formatted by $NotifyItemFmt above).
$NotifySubjectFmt
The subject line of the mail to be sent.
$NotifyHeaders
String of extra mail headers to be passed to the mail() function.
$NotifyParameters
String of additional parameters to be passed to PHP's mail() function [1].
$NotifyFile
The scratch file where Notify keeps track of recent posting information. Defaults to "$WikiDir/.notifylist". Note that this file must generally be writable by the webserver process.
$NotifyListPageFmt
The name of the page containing notify= lines for use by notify.php. Defaults to {$SiteGroup}.NotifyList.
$NotifyList
An array of notify= specifications that can be specified from a local customization file (used in addition to entries in Site.NotifyList).
        # send notifications to alice@example.com
        $NotifyList[] = 'notify=alice@example.com';

<< | DocumentationIndex | >>