This plugin allows some users to be immediately notified by mail each time a child of a given parent topic is modified.
Theory of operation
If this plugin is activated each time a topic
WebTopic
with parent
WebParentTopic
is modified, the web is searched for a topic with name
WebParentTopicNotifyUsers
. If this topic exists an email is sent to each user listed into. The text of the email must be stored in the topic
WebParentTopicNotifyText
or
NotifyText
. If the default email headers do not suits you, it is possible to add the
Notify On Child Modification Form to your
WebParentTopicNotifyText
or
NotifyText
topic and select other ones.
Note that the new variable
%TOPICPARENT%
can be used in the
.*NotifyText
topics and are replaced with the name of the parent topic (i.e.
WebParentTopic
in the current example).
Example
I used this plugin for a local set of forums implemented using TWiki. A forum is build of a main topic which list the entries (child topics of the main topic). The web hosts several forums and I wanted a mean for users to be noticed of entry modifications for a
given forum (and not for all forums as do the classical notification of TWiki). With the
Notify On Child Modification Plugin one can setup a notification system for one forum (of main topic
ForumsMainGeneral
) :
- First create a topic
ForumsMainGeneralNotifyUsers
with the same syntax as Web Notify topic.
- Second create a topic with the text of the mail to be sent, in my case I wanted the same notification for all forums so I used the text below in
NotifyText
topic :
Beloved TWiki user,
Some modification occured in %TOPICPARENT% forum, the description of this forum is :
%SEARCH{"^%TOPICPARENT%$" scope="topic" regex="on" nosearch="on" nototal="on" noheader="on" format="'$formfield(ForumsFormMainTitle)'"}%
The modified entry title is %SEARCH{"^%TOPIC%$" scope="topic" regex="on" nosearch="on" nototal="on" noheader="on" format="'$formfield(ForumsFormItemTitle)'"}%
Your devoted TWiki system.
Moreover I wanted to put a custom subject to these emails so I added the form
Notify On Child Modification Form to the
NotifyText
topic and typed
Something new in forum %TOPICPARENT%
into
NotifyOnChildModificationFormSubject
field.
Thanks
I borrowed most of the perl code from the plain TWiki notification system (cgi-bin script
notify
).
Bugs
I'm a C/PHP/Bash programmer not a Perl one, so there is probably a lot of bugs

. Ha ! I forgot to tell that I'm not an english speaker so there must be also a lot of errors in my text, please let me know, I will correct them.
Plugin Installation Instructions
- Download the tarball file from the Plugin web (see below)
- Untar
NotifyOnChildModificationPlugin.tgz
in your twiki installation directory. Content:
File: | Description: |
data/TWiki/NotifyOnChildModificationPlugin.txt | Plugin topic |
data/TWiki/NotifyOnChildModificationForm*.txt | Plugin form |
lib/TWiki/Plugins/NotifyOnChildModificationPlugin.pm | Plugin Perl module |
NotifyOnChildModificationPlugin Settings
Plugin settings are stored as preferences variables. To reference
a plugin setting write
%<plugin>_<setting>%
, i.e.
%PHPPLUGIN_SHORTDESCRIPTION%
- One line description, is shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = Fine grain electronic mail notification.
- Debug plugin: (See output in
data/debug.txt
)
Plugin Info
Plugin Author | Main.rex |
Plugin Version: | June 2003 (V1.010) |
Change History: | |
June 2003: | Initial version |
CPAN Dependencies: | none |
Perl Version: | 5.005 |
--
XavierRedon? - 28 Jun 2003