|
Cookbook /
AddToWatchlistSummary: Add or remove a page from your watchlist trail with a single click.
Version: 20110325
Prerequisites: PmWiki 2.2.17 or newer
Status: beta
Maintainer: Petko
Discussion: AddToWatchlist-Talk
DescriptionThe recipe offers an easier way for authors to manage their watchlist trails. WatchLists are used by wiki authors to monitor changes to a selected list of pages. The watchlist can be displayed in a profile page or can serve to send e-mail notifications to the author. Watchlists are organized with WikiTrails, simple bulleted lists of links to the watched pages. This recipe enables easy addition or removal of a page to the watchlist trail of the author. InstallationThe recipe requires PmWiki version 2.2.17 or newer.
* %rel=nofollow% [[{*$FullName}?action={*$WatchlistAction} | {*$WatchlistText}]] %%
ConfigurationYou can configure the watchlist page format, related to the Author profile page. In config.php you could add one of those lines:
$WatchlistTrailFmt = '{$FullName}-Watchlist'; # for Profiles.UserName-Watchlist
$WatchlistTrailFmt = 'Watchlists.{$Name}'; # for Watchlists.UserName
The page variables in the format are related to the user profile page. This format is not required, if not set, the user profile page will be used. UsageIf you add the special link in Site.PageActions, this link will appear on every page. If the page isn't in your watchlist trail, you will see the "Watch" link; if it is, you will see the "Unwatch" link. Clicking on this link will open your watchlist trail, with an added or removed link to the page. Your watchlist trail will look like this: It lists the pages you are watching (newly added pages appear on top); clicking on the "Unwatch" link will remove the page from the trail. The recipe adds 3 new PageVariables and a conditional which can be used in wiki pages and in pagelists:
I18nFor international wikis, you can translate the following strings, eg. in your French XLPage: 'Watch' => 'Suivre', 'Unwatch' => 'Ne plus suivre', Notes
Change log / Release notes
See also
ContributorsRecipe written and maintained by Petko. CommentsSee discussion at AddToWatchlist-Talk User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |