Add opt-in RSS feed for watchlist
authorAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 24 Jul 2009 01:22:06 +0000 (01:22 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 24 Jul 2009 01:22:06 +0000 (01:22 +0000)
commit7b66b147387fa4e1fe58a88815765aaa622575c7
tree4389c1c554db9efbc0aa11e3df3cec222ea9fe52
parentda31137022583a41763993332955f065ec0d85ce
Add opt-in RSS feed for watchlist

Authentication is via a token entered in preferences, if not blank.  If
you set a token in your preferences, the following sort of link will
generate the RSS feed:

api.php?action=feedwatchlist&list=watchlist&wluser=Simetrical&wltoken=91c1ef18279f9c24ccf67a79e899ae4d2a3201bc

I haven't actually added the <link> tag to Special:Watchlist, since I've
done enough coding for one night.  Someone else can feel free to do
that (otherwise people might get kind of confused :) ).

An auto-generated random token is suggested to the user on the pref page
so that they don't have to be too creative.  Pref help text is rather
underemphasized in the default style, though.

It would be worth considering making this opt-out instead of opt-in,
but that would require some voodoo magic to get the default prefs to
work right (since we'd need a different value for each user).  We might
set the default to some function of user id + secret site-specific value
to avoid having to store the values in the database.

Since the feature is implemented via the API, it only works if the API
is enabled.  Some API people might want to review my code for sanity.

Bug: 471
RELEASE-NOTES
includes/HTMLForm.php
includes/Preferences.php
includes/api/ApiFeedWatchlist.php
includes/api/ApiQueryWatchlist.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc