| Abe Hassan ( @ 2007-01-14 07:23:00 |
[livejournal] r10062: Add support for RSS/Atom feeds of a jour...
.../data/rss?tag=tagname
.../data/rss?tag=tag1,tag2
(When rendering a user journal, we build up the tagids *before* we call make_feed, so it's available to us. All we had to do was to make use of it.)
Whitaker, David, Artur: Three lines. I win. :)
Committer: ahassan
Add support for RSS/Atom feeds of a journal filtered by tag. Takes the same input as regular tags, as:.../data/rss?tag=tagname
.../data/rss?tag=tag1,tag2
(When rendering a user journal, we build up the tagids *before* we call make_feed, so it's available to us. All we had to do was to make use of it.)
Whitaker, David, Artur: Three lines. I win. :)
U trunk/cgi-bin/LJ/User.pm U trunk/cgi-bin/ljfeed.pl
Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm 2007-01-13 02:41:28 UTC (rev 10061)
+++ trunk/cgi-bin/LJ/User.pm 2007-01-14 07:23:35 UTC (rev 10062)
@@ -5688,9 +5688,9 @@
return $error->("Sorry, the tag system is currently disabled.", "404 Not Found")
if $LJ::DISABLED{tags};
- # throw an error for S1, but only on non-rename accounts.
+ # throw an error if we're rendering in S1, but not for renamed accounts
return $error->("Sorry, tag filtering is not supported within S1 styles.", "404 Not Found")
- if $stylesys == 1 && $u->{journaltype} ne 'R';
+ if $stylesys == 1 && $view ne 'data' && $u->{journaltype} ne 'R';
# overwrite any tags that exist
$opts->{tags} = [];
Modified: trunk/cgi-bin/ljfeed.pl
===================================================================
--- trunk/cgi-bin/ljfeed.pl 2007-01-13 02:41:28 UTC (rev 10061)
+++ trunk/cgi-bin/ljfeed.pl 2007-01-14 07:23:35 UTC (rev 10062)
@@ -78,6 +78,7 @@
'userid' => $u->{'userid'},
'itemshow' => 25,
'order' => "logtime",
+ 'tagids' => $opts->{tagids},
'itemids' => \@itemids,
'friendsview' => 1, # this returns rlogtimes
'dateformat' => "S2", # S2 format time format is easier