User:Zachary/Watchlist categories

I just successfully implemented a feature on my test wiki that allows for the creation of "watchlist categories" for filtering the watchlist. You can find a patch for this here, or you can see it in action here.

To be honest though, I'm not a PHP programmer (I am more of a perl guy myself), so I'm sure there is a better way to implement this. Also, I'm not very good at UI. There's probably a "prettier" way to implement the UI changes too.

But feel free to apply/test/modify/whatever the patch as you wish. You'll need to alter the "watchlist" table manually using the following mysql command:

> ALTER TABLE `watchlist` ADD `wl_catid` TINYINT UNSIGNED NOT NULL DEFAULT 0 AFTER `wl_title`

For the UI to link to the "Special:Watchlist/categories" page, you'll need to alter the "MediaWiki:Watchdetails" system message on your wiki, and add something similar to this to it:

* Show and edit watchlist categories

And that's pretty much it! All text is hard-coded in ENGLISH (I haven't yet looked into adding new system messages to allow for i18n of the text), but if someone wants to change that, then by all means go for it!