
Watchlist Plugin<-- Contributions to this plugin are appreciated. Please update the plugin page at http://twiki.org/cgi-bin/view/Plugins/WatchlistPlugin
IntroductionThe WatchlistPlugin adds watchlist feature to TWiki topics. Topics of interest can be watched and unwatched. A user can see recent changes of all watched topics. A user can also subscribe to get e-mail notification of changes, either on each topic save, or in digest mode. To reduce noise, a user is not notified if he or she changes a topic on his or her watchlist. This plugin is intended to augment the MailerContrib with a point and click watch and subscribe feature. At a later point, the WatchlistPlugin will replace the MailerContrib, which operates on the not as easy to use WebNotify topics.User InterfaceThis plugin adds a "Watch" link to the topic action row at the bottom of every TWiki topic. Once watched, one can "Unwatch" the topic. It also adds a Watch
Screenshot of "Watched Topics" tab:
Screenshot of "Preferences" tab:
The user profile pages have a "Watchlist Changes" box that shows recently changed topics the user is watching.
Screenshot of user profile:
Syntax RulesThis section is for application developers who want to create custom watchlist integrations.<--/twistyPlugin twikiMakeVisibleInline-->
The WatchlistPlugin handles the %WATCHLIST{...}% variable. All watchlist interaction is done using this variable.
<--/twistyPlugin--> Watchlist TemplateThis section is for site administrators who want to customize the watchlists.<--/twistyPlugin twikiMakeVisibleInline-->
This plugin has a WatchlistTemplate topic and two e-mail templates.
1. WatchlistTemplate:
The WatchlistTemplate topic is used as a template for user watchlist topics. It contains a tab interface with three tabs showing the recent changes, the watchlist topics, and the preferences.
2. watchlistdigestnotify.tmpl:
The watchlistdigestnotify.tmpl template file is the e-mail template for digest notification. It is located in the twiki/templates directory. The plugin handles the TWiki variables, and in addition these special variables:
watchlistimmediatenotify.tmpl template file is the e-mail template for immediate notification. It is located in the twiki/templates directory. The plugin handles the TWiki variables, and in addition these special variables:
<--/twistyPlugin--> Installation & ConfigurationYou do not need to install anything on the browser to use this plugin. These instructions are for the administrator who installs the plugin on the TWiki server.<--/twistyPlugin twikiMakeVisibleInline-->
1. Plugin Installation:
cron (or equivalent) job to run the tools/watchlistnotify script. The script must be run as the webserver user and can be used as follows from the command-line:
$ cd /var/www/twiki/bin $ ../tools/watchlistnotifyChange first to the twiki bin directory so that the script can find the TWiki libraries. An optional quiet=1 parameter can be specified to suppress progress output.
This example shows a crontab entry for user apache on a RedHat or CentOS server that sends daily digest notification at 01:00, and logs the progress output:
00 01 * * * (cd /var/www/twiki/bin; nice ../tools/watchlistnotify >/var/www/twiki/data/watchlistnotify-log.txt 2>&1)The tool can also be called from any directory if the twiki bin directory is specified. Example: 00 00 * * * cd /var/www/twiki/tools && perl -I /var/www/twiki/bin ./watchlistnotify quiet=1 %STOPINCLUDE%:
%IF{
"context WatchlistPluginEnabled AND context authenticated"
then=" * $percntWATCHLIST{ \"showwatchlink\" format=\"<a href='$url' title='$watch this topic'>$watch %ICON{ "menu-down" format="<img src='$urlpath' width='$width' height='$height' border='0' alt='' />" }%</a>\" }$percnt
* $percntWATCHLIST{ \"showwatchlistlink\" format=\"[[$url][Watchlist Changes]]\" }$percnt"
else="<nop>"
}%
5. Upgrade the TWikiUserMappingContrib to get the "Watchlist Changes" box in the user profile topics:
To add the "Watchlist Changes" box to the user profile topics, upgrade the TWikiUserMappingContrib to version 2013-02-26 or later, or update the Main.UserProfileHeader to the latest version at TWikisvn:TWikiUserMappingContrib/data/Main/UserProfileHeader.txttemplates/viewtopicactionbuttons.tmpl and make the following two modifications.
1. In template definition %TMPL:DEF{"topicactionbuttons"}%, add %TMPL:P{"action_watch"}% before %TMPL:P{"action_printable"}%.
2. Add the following two template definitions:
%TMPL:DEF{"action_watch"}%%TMPL:P{context="WatchlistPluginEnabled" then="watch_link" else=""}%%TMPL:END%
%TMPL:DEF{"watch_link"}%<span>%IF{ "context authenticated" then="$percntWATCHLIST{showwatchlink}$percnt" else="<strike>Watch</strike>" }%</span>%TMPL:P{"sep"}%%TMPL:END%
7. Test the Plugin:
Test if the installation was successful by watching and unwatching topics. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Added: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<--/twistyPlugin--> Plugin Info
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Changed: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| < < |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Changed: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| < < |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<--/twistyPlugin twikiMakeVisibleInline--> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Added: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<--/twistyPlugin-->
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Watchlist Plugin<-- Contributions to this plugin are appreciated. Please update the plugin page at http://twiki.org/cgi-bin/view/Plugins/WatchlistPlugin
IntroductionThe WatchlistPlugin adds watchlist feature to TWiki topics. Topics of interest can be watched and unwatched. A user can see recent changes of all watched topics. A user can also subscribe to get e-mail notification of changes, either on each topic save, or in digest mode. To reduce noise, a user is not notified if he or she changes a topic on his or her watchlist. This plugin is intended to augment the MailerContrib with a point and click watch and subscribe feature. At a later point, the WatchlistPlugin will replace the MailerContrib, which operates on the not as easy to use WebNotify topics.User InterfaceThis plugin adds a "Watch" link to the topic action row at the bottom of every TWiki topic. Once watched, one can "Unwatch" the topic. It also adds a Watch
Screenshot of "Watched Topics" tab:
Screenshot of "Preferences" tab:
The user profile pages have a "Watchlist Changes" box that shows recently changed topics the user is watching.
Screenshot of user profile:
Syntax RulesThis section is for application developers who want to create custom watchlist integrations.<--/twistyPlugin twikiMakeVisibleInline-->
The WatchlistPlugin handles the %WATCHLIST{...}% variable. All watchlist interaction is done using this variable.
<--/twistyPlugin--> Watchlist TemplateThis section is for site administrators who want to customize the watchlists.<--/twistyPlugin twikiMakeVisibleInline-->
This plugin has a WatchlistTemplate topic and two e-mail templates.
1. WatchlistTemplate:
The WatchlistTemplate topic is used as a template for user watchlist topics. It contains a tab interface with three tabs showing the recent changes, the watchlist topics, and the preferences.
2. watchlistdigestnotify.tmpl:
The watchlistdigestnotify.tmpl template file is the e-mail template for digest notification. It is located in the twiki/templates directory. The plugin handles the TWiki variables, and in addition these special variables:
watchlistimmediatenotify.tmpl template file is the e-mail template for immediate notification. It is located in the twiki/templates directory. The plugin handles the TWiki variables, and in addition these special variables:
<--/twistyPlugin--> Installation & ConfigurationYou do not need to install anything on the browser to use this plugin. These instructions are for the administrator who installs the plugin on the TWiki server.<--/twistyPlugin twikiMakeVisibleInline-->
1. Plugin Installation:
cron (or equivalent) job to run the tools/watchlistnotify script. The script must be run as the webserver user and can be used as follows from the command-line:
$ cd /var/www/twiki/bin $ ../tools/watchlistnotifyChange first to the twiki bin directory so that the script can find the TWiki libraries. An optional quiet=1 parameter can be specified to suppress progress output.
This example shows a crontab entry for user apache on a RedHat or CentOS server that sends daily digest notification at 01:00, and logs the progress output:
00 01 * * * (cd /var/www/twiki/bin; nice ../tools/watchlistnotify >/var/www/twiki/data/watchlistnotify-log.txt 2>&1)The tool can also be called from any directory if the twiki bin directory is specified. Example: 00 00 * * * cd /var/www/twiki/tools && perl -I /var/www/twiki/bin ./watchlistnotify quiet=1 %STOPINCLUDE%:
%IF{
"context WatchlistPluginEnabled AND context authenticated"
then=" * $percntWATCHLIST{ \"showwatchlink\" format=\"<a href='$url' title='$watch this topic'>$watch %ICON{ "menu-down" format="<img src='$urlpath' width='$width' height='$height' border='0' alt='' />" }%</a>\" }$percnt
* $percntWATCHLIST{ \"showwatchlistlink\" format=\"[[$url][Watchlist Changes]]\" }$percnt"
else="<nop>"
}%
5. Upgrade the TWikiUserMappingContrib to get the "Watchlist Changes" box in the user profile topics:
To add the "Watchlist Changes" box to the user profile topics, upgrade the TWikiUserMappingContrib to version 2013-02-26 or later, or update the Main.UserProfileHeader to the latest version at TWikisvn:TWikiUserMappingContrib/data/Main/UserProfileHeader.txttemplates/viewtopicactionbuttons.tmpl and make the following two modifications.
1. In template definition %TMPL:DEF{"topicactionbuttons"}%, add %TMPL:P{"action_watch"}% before %TMPL:P{"action_printable"}%.
2. Add the following two template definitions:
%TMPL:DEF{"action_watch"}%%TMPL:P{context="WatchlistPluginEnabled" then="watch_link" else=""}%%TMPL:END%
%TMPL:DEF{"watch_link"}%<span>%IF{ "context authenticated" then="$percntWATCHLIST{showwatchlink}$percnt" else="<strike>Watch</strike>" }%</span>%TMPL:P{"sep"}%%TMPL:END%
7. Test the Plugin:
Test if the installation was successful by watching and unwatching topics.
<--/twistyPlugin--> Plugin Info
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Changed: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| < < |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Changed: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| < < |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<--/twistyPlugin twikiMakeVisibleInline--> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Added: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<--/twistyPlugin-->
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Watchlist Plugin<-- Contributions to this plugin are appreciated. Please update the plugin page at http://twiki.org/cgi-bin/view/Plugins/WatchlistPlugin
Introduction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Changed: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| < < | The WatchlistPlugin adds watchlist feature to TWiki topics. Topics of interest can be watched and unwatched. A user can see recent changes of all watched topics. A user can also subscribe to get e-mail notification of changes, either on each topic save, or in digest mode. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > | The WatchlistPlugin adds watchlist feature to TWiki topics. Topics of interest can be watched and unwatched. A user can see recent changes of all watched topics. A user can also subscribe to get e-mail notification of changes, either on each topic save, or in digest mode. To reduce noise, a user is not notified if he or she changes a topic on his or her watchlist. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This plugin is intended to augment the MailerContrib with a point and click watch and subscribe feature. At a later point, the WatchlistPlugin will replace the MailerContrib, which operates on the not as easy to use WebNotify topics.
User InterfaceThis plugin adds a "Watch" link to the topic action row at the bottom of every TWiki topic. Once watched, one can "Unwatch" the topic. It also adds a Watch | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Changed: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| < < | Each user has a <WikiName>Watchlist topic in the Main web, such as JimmyNeutronWatchlist. The topic has three tabs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > | Each user has a <WikiName>Watchlist topic in the Main web based on their WikiWord name, such as JimmyNeutronWatchlist. The topic has three tabs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Screenshot of "Watched Topics" tab:
Screenshot of "Preferences" tab:
The user profile pages have a "Watchlist Changes" box that shows recently changed topics the user is watching.
Screenshot of user profile:
Syntax RulesThis section is for application developers who want to create custom watchlist integrations.<--/twistyPlugin twikiMakeVisibleInline-->
The WatchlistPlugin handles the %WATCHLIST{...}% variable. All watchlist interaction is done using this variable.
<--/twistyPlugin--> Watchlist TemplateThis section is for site administrators who want to customize the watchlists.<--/twistyPlugin twikiMakeVisibleInline-->
This plugin has a WatchlistTemplate topic and two e-mail templates.
1. WatchlistTemplate:
The WatchlistTemplate topic is used as a template for user watchlist topics. It contains a tab interface with three tabs showing the recent changes, the watchlist topics, and the preferences.
2. watchlistdigestnotify.tmpl:
The watchlistdigestnotify.tmpl template file is the e-mail template for digest notification. It is located in the twiki/templates directory. The plugin handles the TWiki variables, and in addition these special variables:
watchlistimmediatenotify.tmpl template file is the e-mail template for immediate notification. It is located in the twiki/templates directory. The plugin handles the TWiki variables, and in addition these special variables:
<--/twistyPlugin--> Installation & ConfigurationYou do not need to install anything on the browser to use this plugin. These instructions are for the administrator who installs the plugin on the TWiki server.<--/twistyPlugin twikiMakeVisibleInline-->
1. Plugin Installation:
cron (or equivalent) job to run the tools/watchlistnotify script. The script must be run as the webserver user and can be used as follows from the command-line:
$ cd /var/www/twiki/bin $ ../tools/watchlistnotifyChange first to the twiki bin directory so that the script can find the TWiki libraries. An optional quiet=1 parameter can be specified to suppress progress output.
This example shows a crontab entry for user apache on a RedHat or CentOS server that sends daily digest notification at 01:00, and logs the progress output: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Changed: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| < < | 00 01 * * * (cd /var/www/twiki/tools; nice ../tools/watchlistnotify >/var/www/twiki/data/watchlistnotify-log.txt 2>&1) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > | 00 01 * * * (cd /var/www/twiki/bin; nice ../tools/watchlistnotify >/var/www/twiki/data/watchlistnotify-log.txt 2>&1) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The tool can also be called from any directory if the twiki bin directory is specified. Example:
00 00 * * * cd /var/www/twiki/tools && perl -I /var/www/twiki/bin ./watchlistnotify quiet=1 %STOPINCLUDE%:
%IF{
"context WatchlistPluginEnabled AND context authenticated"
then=" * $percntWATCHLIST{ \"showwatchlink\" format=\"<a href='$url' title='$watch this topic'>$watch %ICON{ "menu-down" format="<img src='$urlpath' width='$width' height='$height' border='0' alt='' />" }%</a>\" }$percnt
* $percntWATCHLIST{ \"showwatchlistlink\" format=\"[[$url][Watchlist Changes]]\" }$percnt"
else="<nop>"
}%
5. Upgrade the TWikiUserMappingContrib to get the "Watchlist Changes" box in the user profile topics:
To add the "Watchlist Changes" box to the user profile topics, upgrade the TWikiUserMappingContrib to version 2013-02-26 or later, or update the Main.UserProfileHeader to the latest version at TWikisvn:TWikiUserMappingContrib/data/Main/UserProfileHeader.txttemplates/viewtopicactionbuttons.tmpl and make the following two modifications.
1. In template definition %TMPL:DEF{"topicactionbuttons"}%, add %TMPL:P{"action_watch"}% before %TMPL:P{"action_printable"}%.
2. Add the following two template definitions:
%TMPL:DEF{"action_watch"}%%TMPL:P{context="WatchlistPluginEnabled" then="watch_link" else=""}%%TMPL:END%
%TMPL:DEF{"watch_link"}%<span>%IF{ "context authenticated" then="$percntWATCHLIST{showwatchlink}$percnt" else="<strike>Watch</strike>" }%</span>%TMPL:P{"sep"}%%TMPL:END%
7. Test the Plugin:
Test if the installation was successful by watching and unwatching topics.
<--/twistyPlugin--> Plugin Info
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Changed: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| < < |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Changed: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| < < |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<--/twistyPlugin twikiMakeVisibleInline--> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Added: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<--/twistyPlugin-->
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Watchlist Plugin<-- Contributions to this plugin are appreciated. Please update the plugin page at http://twiki.org/cgi-bin/view/Plugins/WatchlistPlugin
IntroductionThe WatchlistPlugin adds watchlist feature to TWiki topics. Topics of interest can be watched and unwatched. A user can see recent changes of all watched topics. A user can also subscribe to get e-mail notification of changes, either on each topic save, or in digest mode. This plugin is intended to augment the MailerContrib with a point and click watch and subscribe feature. At a later point, the WatchlistPlugin will replace the MailerContrib, which operates on the not as easy to use WebNotify topics.User InterfaceThis plugin adds a "Watch" link to the topic action row at the bottom of every TWiki topic. Once watched, one can "Unwatch" the topic. It also adds a Watch
Screenshot of "Watched Topics" tab:
Screenshot of "Preferences" tab:
The user profile pages have a "Watchlist Changes" box that shows recently changed topics the user is watching.
Screenshot of user profile:
Syntax RulesThis section is for application developers who want to create custom watchlist integrations.<--/twistyPlugin twikiMakeVisibleInline-->
The WatchlistPlugin handles the %WATCHLIST{...}% variable. All watchlist interaction is done using this variable.
<--/twistyPlugin--> Watchlist TemplateThis section is for site administrators who want to customize the watchlists.<--/twistyPlugin twikiMakeVisibleInline-->
This plugin has a WatchlistTemplate topic and two e-mail templates.
1. WatchlistTemplate:
The WatchlistTemplate topic is used as a template for user watchlist topics. It contains a tab interface with three tabs showing the recent changes, the watchlist topics, and the preferences.
2. watchlistdigestnotify.tmpl:
The watchlistdigestnotify.tmpl template file is the e-mail template for digest notification. It is located in the twiki/templates directory. The plugin handles the TWiki variables, and in addition these special variables:
watchlistimmediatenotify.tmpl template file is the e-mail template for immediate notification. It is located in the twiki/templates directory. The plugin handles the TWiki variables, and in addition these special variables:
<--/twistyPlugin--> Installation & ConfigurationYou do not need to install anything on the browser to use this plugin. These instructions are for the administrator who installs the plugin on the TWiki server.<--/twistyPlugin twikiMakeVisibleInline-->
1. Plugin Installation:
cron (or equivalent) job to run the tools/watchlistnotify script. The script must be run as the webserver user and can be used as follows from the command-line:
$ cd /var/www/twiki/bin $ ../tools/watchlistnotifyChange first to the twiki bin directory so that the script can find the TWiki libraries. An optional quiet=1 parameter can be specified to suppress progress output.
This example shows a crontab entry for user apache on a RedHat or CentOS server that sends daily digest notification at 01:00, and logs the progress output:
00 01 * * * (cd /var/www/twiki/tools; nice ../tools/watchlistnotify >/var/www/twiki/data/watchlistnotify-log.txt 2>&1)The tool can also be called from any directory if the twiki bin directory is specified. Example: 00 00 * * * cd /var/www/twiki/tools && perl -I /var/www/twiki/bin ./watchlistnotify quiet=1 %STOPINCLUDE%:
%IF{
"context WatchlistPluginEnabled AND context authenticated"
then=" * $percntWATCHLIST{ \"showwatchlink\" format=\"<a href='$url' title='$watch this topic'>$watch %ICON{ "menu-down" format="<img src='$urlpath' width='$width' height='$height' border='0' alt='' />" }%</a>\" }$percnt
* $percntWATCHLIST{ \"showwatchlistlink\" format=\"[[$url][Watchlist Changes]]\" }$percnt"
else="<nop>"
}%
5. Upgrade the TWikiUserMappingContrib to get the "Watchlist Changes" box in the user profile topics:
To add the "Watchlist Changes" box to the user profile topics, upgrade the TWikiUserMappingContrib to version 2013-02-26 or later, or update the Main.UserProfileHeader to the latest version at TWikisvn:TWikiUserMappingContrib/data/Main/UserProfileHeader.txttemplates/viewtopicactionbuttons.tmpl and make the following two modifications.
1. In template definition %TMPL:DEF{"topicactionbuttons"}%, add %TMPL:P{"action_watch"}% before %TMPL:P{"action_printable"}%.
2. Add the following two template definitions:
%TMPL:DEF{"action_watch"}%%TMPL:P{context="WatchlistPluginEnabled" then="watch_link" else=""}%%TMPL:END%
%TMPL:DEF{"watch_link"}%<span>%IF{ "context authenticated" then="$percntWATCHLIST{showwatchlink}$percnt" else="<strike>Watch</strike>" }%</span>%TMPL:P{"sep"}%%TMPL:END%
7. Test the Plugin:
Test if the installation was successful by watching and unwatching topics.
<--/twistyPlugin--> Plugin Info
<--/twistyPlugin twikiMakeVisibleInline-->
<--/twistyPlugin-->
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||