Extension talk:CategoryWatch/Archive

That would be a very useful tool for those who work in Wikipedias along a field. It is not easy to keep in touch with new articles. So keep up the work, I hope to see that tool in action soon! Regards, Denis Barthel 19:43, 5 September 2008 (UTC)

Notification message in 1.15.1
Hey folks. I seem to have CategoryWatch working nicely in 1.15.1. However, the message sent to a user watching the category contains only the standard notification for article watching (ie. whatever is in 'MediaWiki:Enotif body'). Could someone drop a hint regarding what needs to change to get category move-in/out details sent? Is there something in Enotif_body that needs to be there to trigger it? - Lucas Billett 17:00, 9 December 2009 (UTC)
 * My bad. I had removed the $NEWPAGE element from enotif, which is what the extension strtr's on. - Lucas Billett 19:56, 9 December 2009 (UTC)

MW 1.14?
Doesn't seem to work in MW 1.14?

Also would it be possible to have a $wgCategoryWatchNotifyOnlyAdditions? So the user is only notified about new pages being added to the category not Page edits, moves or deletions etc.? Maybe a prefs setting is better: "[_] When I watch a category page only notify me about new additons." --Subfader 22:32, 15 March 2009 (UTC)
 * yeah good idea, we're using this extension a lot and I've been getting a bit annoyed with notifications of articles moving out of my watched categories since this never requires any action from me. It doesn't currently notify users when articles in the category are edited though. I'll check out the 1.14 problem asap as we've just upgraded our main wiki to 1.14. --Nad 10:07, 16 March 2009 (UTC)
 * It works. I got emails for 2 articles being added to the category. The mails were not very helpful (plain text, nothing linked). --Subfader 13:42, 16 March 2009 (UTC)

How to use extension
Just a question I am hoping you can answer (probably a stupid question)... but...

I know how to add a page to my watchlist. But with this extension properly installed, how does it know to email me if any page is created that has the same category name as the page that I put on my watch list. Is there somewhere that I specify that ALL pages which are labelled as CategoryX, for instance, and have been changed or added that I get an email.... or is just putting 1 page with that category on my watch list automatically put that category on my watch list. Thanks

Salutation Wrong
I noticed that the source code was modified on Apr 24 09:48:21 2009 [49810] to add $WATCHINGUSERNAME in the emailed message.

$WATCHINGUSERNAME was assigned $name. Should it be assigned $watchingUser->getName. $name is the person who edited the page not the person who is watching the page.

I also modified my version of the code so that an email is not sent if the editor and watcher are the same person. This mimics how the normal watch works.

Wolcott 16:26, 27 May 2009 (UTC)

Watching changes to all pages in a category
Does anybody know if it is possible to be notified of all changes to pages in a particular category.

Current implementation tells you when pages are added/moved, but I would be interested in an extension that lets you know when any page in a category is updated, to easily keep up with all pages in a category. Could this functionality be added? or are there other extensions covering this?

--Carter040 12:53, 14 September 2009 (UTC)


 * Update: Have looked at the code and made a modification so the above mentioned is realized. However I would like to know how to get permission or agreement on incorporating this here in the repository. The behaviour is currently implemented so it can be controlled by a global variable..

--Carter040 12:17, 15 September 2009 (UTC)

I have also made this modification (changed the rest of the behavior a bit for our purposes, so it's not just a clean update) but in addition, added notification for everything that happens in subcategories of the category. The code snippets below should be relatively easy to implement for users familiar with php. It has a deadswitch for infinite categories, not particularly elegant.

and in function onArticleSaveComplete

and of course you need $messages['en'] = array( 'categorywatch-catchange' => 'changed $1'

--Cm 11:55, 29 October 2009 (UTC)

Subject, No Subject..
This extension is fantastic and useful. I use the extension for our events mailing list, so that our mailing list has got an user (admin user) with watchlist the category:event. I used this extension since mediawiki 1.13; now I'm using mediawiki 1.15.1 release. It is writing very well so I'm added some custom msgs into CategoryWatch.i18n.php and I'm changed two lines with others into CategoryWatch.php:

$subject = wfMsg( 'categorywatch-emailsubject', $page ); $body   = wfMsgForContent( 'enotif_body' );

changed with:

0. $array  = array (""); 1. $event  = preg_split("/\|/",$summary); 2. $summary = str_replace("|others=", " and ", $summary); 3. $summary = str_replace("|", "", $summary); 4. $summary = str_replace($array, "", $summary); 5. $event_s = str_replace("title=", "", $event[1]); 6. $summary = str_replace($event_s, "", $summary); 7. if (!$event_s) $event_s = "New event"; 8. $subject = wfMsg( 'categorywatch-emailsubject', $event_s ); 9. $body   = wfMsg( 'categorywatch-enotif_body' );

Results are:
 * when we create new event (new page into category:event), we receive email with subject "New event" and string $event_s is removed from $summary
 * only one admin has got category:event into watchlist, and this admin receive email with subject $event_s and string $event_s is removed from $summary
 * if I modify line 8 with $subject = wfMsg( "categorywatch-emailsubject", $page );, we receive always email with subject $page and string $event_s is removed from $summary

Why is $event_s not empty until line 6 and after is it empty? Can you help me about it? -- Bilardi 08:55, 21 October 2009 (UTC)

Using CategoryWatch
Please explain this part. Thanks. Bennylin 10:42, 6 April 2010 (UTC)