|
Cookbook /
AddToWatchlist-TalkSummary: Talk page for AddToWatchlist.
Maintainer: Petko
This space is for User-contributed commentary and notes. Please include your name and a date along with your comment. This is a wonderful recipe. It could be even better with a few more configuration options. It appears the watchlist can be kept on a page other than the author's Profiles page (or that page with a suffix). For example, I seem to be able to use in config Yes, from version 20110322 you can use FYI, I think you made a typo in your script. In version 20110322c I have to specify "Watchist" not "Watchlist" to get it to work. RandyB March 25, 2011, at 01:13 PM Thanks, corrected. --Petko March 25, 2011, at 01:29 PM Is there a way to specify terminology other than "Watch" and "Unwatch" - for example "Star" and "UnStar" or "Remember" and "Forget"? Yes, you can "set" the English "translations" like this: Is there a way to control where redirection goes after the post, for example, if I want the user to stay on the current page rather than go to the page where the list is stored? Yes, you can add to the special link url You can also redirect to a fixed page with &goto=Group.Page in the link or you can set a default redirect page with the variable Is there a way to encode extra info in the target? For example, " How would you use this extra info? If I understand correctly, you want a single watchlist page for all users, which would construct pagelists based on the author name (brilliant idea)? In that case, I think it is better to use a page variable, either create one or use For example on my watchlist page I might have " The "Return to Page" link can be done with something like You can probably anticipate my next question... Can I use an image such as an uncolored star for Watch and colored star for UnWatch - thereby allowing the user to toggle the page on and off the list? ("Starred pages" are becoming common - for example in Google Docs.) - RandyB March 21, 2011, at 12:43 PM Great idea. You could do the same as with the English "translation", use the "★" star or ♡ ♥ hearts Unicode characters. You can use grey and gold colors if you like: You could even set star icons, just use the url address like you would include a picture: XLSDV('en',array(
'Watch' => 'http://yoursite/pub/star-gray.png"Page not in your watchlist. Click to add it."',
'Unwatch'=>'http://yoursite/pub/star-gold.png"Page in your watchlist. Click to remove it."'));
It is probably a good idea to add "tooltip titles" to the icons (see PmWiki:Images) so that your users know what the icons do. --Petko March 21, 2011, at 03:21 PM Found a problem: "Watching" or "unwatching" a page eliminates the history for the target page where I keep my list. RandyB March 21, 2011, at 01:42 PM Nice catch, thanks, fixed in 20110321a (just released). --Petko March 21, 2011, at 02:40 PM Comment lier cette recette avec notify ?Les membres peuvent choisir les pages à suivre, mais les mails ne sont pas envoyé...
Pourtant, j'ai bien ajouté Il y a un truc que je ne comprend pas ! Merci d'avance !Manu February 22, 2012, at 02:55 PM Pour chaque utilisateur, il faut ajouter dans SiteAdmin.NotifyList une telle ligne: Merci ! Je vais tester ça ! Je vais utiliser une requête SQL via php pour le faire automatiquement dans config.php
$EnableNotify = 1;
include_once("$FarmD/cookbook/adodb/adodb.inc.php");
$DB['mysql'] = NewADOConnection('mysql');
if (!$DB['mysql']) die("Connection failed");
$DB['mysql']->Connect('mysqlxxxxxxxx', 'xxxxxxxxxx', 'xxxxxxxxxx', 'xxxxxxxxx');
$rs = $DB['mysql']->Execute("SELECT email,username FROM pmwiki_users");
if ($rs){
while ($arr = $rs->FetchRow()) {
$monMail=$arr['email'];
$monPseudo=$arr['username'];
$NotifyList[] = 'notify='.$monMail.' trail=Watchlists.'.$monPseudo.'';
}
}
Manu? February 22, 2012, at 11:47 PM Talk page for the AddToWatchlist recipe (users). |