Lightning wrote:
I was thinking that it'd be cool if we could subscribe to articles and every 24hrs get an e-mail message listing the changes to those articles, recent changes style. I know it is kind of like a watch list, but watch lists have a problem, they only show the last change. this would show all the updates to certain articles whithing the last 24 hours.
Cf: http://usemod.com/cgi-bin/mb.pl?SubscribedChanges
I know its kind of like recent changes too, and it should feed from the recent changes table, but I couldnt find too much documentation on the recent changes table. that table has another problem. currently we just store the last x recent changes in there. If wikipedia continues growing and that table grows so much that the ammount of changes per day is bigger than the table size then that would break the subscription system. thats why it feeds directly from curr and old.
It doesn't store the last x number of edits, but rather the last 7 days' worth, occasionally culled.
[snip many queries]
Hmm, that sounds like a lot of trouble to go to; and if the number of subscribers becomes relatively large, we'll be pumping a lot of numbers into SQL statements. What about something like:
SELECT user_name,user_email, rc_namespace,rc_title,rc_user_text, rc_minor,rc_timestamp,rc_comment FROM user,recentchanges,subscriptions WHERE user_id=sub_user AND rc_cur_id=sub_page AND rc_timestamp > $cutofftime GROUP BY user_id,rc_cur_id ORDER BY rc_timestamp DESC
foreach( $results as $item ) { if( $item->user_name != $last->user_name ) { email_last_batch() reset() } add_to_output($item) $last = $item }
with of course the same caveats on cur_id use as mentiond for watchlists. Moves, deletions, and renames need to be specially handled or things drop off the list.
-- brion vibber (brion @ pobox.com)