diff --git a/actions/all.php b/actions/all.php index 3deaea52f9..4ee3911b40 100644 --- a/actions/all.php +++ b/actions/all.php @@ -99,6 +99,15 @@ class AllAction extends ProfileAction function getFeeds() { return array( + new Feed(Feed::JSON, + common_local_url( + 'ApiTimelineFriends', array( + 'format' => 'as', + 'id' => $this->user->nickname + ) + ), + // TRANS: %s is user nickname. + sprintf(_('Feed for friends of %s (Activity Streams JSON)'), $this->user->nickname)), new Feed(Feed::RSS1, common_local_url( 'allrss', array( diff --git a/actions/public.php b/actions/public.php index 90e0e6e259..37a1ef3c23 100644 --- a/actions/public.php +++ b/actions/public.php @@ -162,7 +162,12 @@ class PublicAction extends Action */ function getFeeds() { - return array(new Feed(Feed::RSS1, common_local_url('publicrss'), + return array(new Feed(Feed::JSON, + common_local_url('ApiTimelinePublic', + array('format' => 'as')), + // TRANS: Link description for public timeline feed. + _('Public Stream Feed (Activity Streams JSON)')), + new Feed(Feed::RSS1, common_local_url('publicrss'), // TRANS: Link description for public timeline feed. _('Public Stream Feed (RSS 1.0)')), new Feed(Feed::RSS2, diff --git a/actions/replies.php b/actions/replies.php index cf248a7785..86042557dc 100644 --- a/actions/replies.php +++ b/actions/replies.php @@ -143,7 +143,16 @@ class RepliesAction extends Action */ function getFeeds() { - return array(new Feed(Feed::RSS1, + return array(new Feed(Feed::JSON, + common_local_url('ApiTimelineMentions', + array( + 'id' => $this->user->nickname, + 'format' => 'as')), + // TRANS: Link for feed with replies for a user. + // TRANS: %s is a user nickname. + sprintf(_('Replies feed for %s (Activity Streams JSON)'), + $this->user->nickname)), + new Feed(Feed::RSS1, common_local_url('repliesrss', array('nickname' => $this->user->nickname)), // TRANS: Link for feed with replies for a user. diff --git a/actions/showfavorites.php b/actions/showfavorites.php index 65bb8f1beb..64fa14bc82 100644 --- a/actions/showfavorites.php +++ b/actions/showfavorites.php @@ -165,7 +165,15 @@ class ShowfavoritesAction extends Action */ function getFeeds() { - return array(new Feed(Feed::RSS1, + return array(new Feed(Feed::JSON, + common_local_url('ApiTimelineFavorites', + array( + 'id' => $this->user->nickname, + 'format' => 'as')), + // TRANS: Feed link text. %s is a username. + sprintf(_('Feed for favorites of %s (Activity Streams JSON)'), + $this->user->nickname)), + new Feed(Feed::RSS1, common_local_url('favoritesrss', array('nickname' => $this->user->nickname)), // TRANS: Feed link text. %s is a username. diff --git a/actions/showgroup.php b/actions/showgroup.php index 530deff622..d4f65a8059 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -220,7 +220,14 @@ class ShowgroupAction extends Action common_local_url('grouprss', array('nickname' => $this->group->nickname)); - return array(new Feed(Feed::RSS1, + return array(new Feed(Feed::JSON, + common_local_url('ApiTimelineGroup', + array('format' => 'as', + 'id' => $this->group->id)), + // TRANS: Tooltip for feed link. %s is a group nickname. + sprintf(_('Notice feed for %s group (Activity Streams JSON)'), + $this->group->nickname)), + new Feed(Feed::RSS1, common_local_url('grouprss', array('nickname' => $this->group->nickname)), // TRANS: Tooltip for feed link. %s is a group nickname. diff --git a/actions/showprofiletag.php b/actions/showprofiletag.php index d1b0768d23..a101e4bafa 100644 --- a/actions/showprofiletag.php +++ b/actions/showprofiletag.php @@ -169,7 +169,18 @@ class ShowprofiletagAction extends Action function getFeeds() { #XXX: make these actually work - return array(new Feed(Feed::RSS2, + return array(new Feed(Feed::JSON, + common_local_url( + 'ApiTimelineList', array( + 'user' => $this->tagger->id, + 'id' => $this->peopletag->id, + 'format' => 'as' + ) + ), + // TRANS: Feed title. + // TRANS: %s is tagger's nickname. + sprintf(_('Feed for friends of %s (Activity Streams JSON)'), $this->tagger->nickname)), + new Feed(Feed::RSS2, common_local_url( 'ApiTimelineList', array( 'user' => $this->tagger->id, diff --git a/actions/tag.php b/actions/tag.php index f3514bef55..33339cb8bf 100644 --- a/actions/tag.php +++ b/actions/tag.php @@ -79,7 +79,15 @@ class TagAction extends Action function getFeeds() { - return array(new Feed(Feed::RSS1, + return array(new Feed(Feed::JSON, + common_local_url('ApiTimelineTag', + array('format' => 'as', + 'tag' => $this->tag)), + // TRANS: Link label for feed on "notices with tag" page. + // TRANS: %s is the tag the feed is for. + sprintf(_('Notice feed for tag %s (Activity Streams JSON)'), + $this->tag)), + new Feed(Feed::RSS1, common_local_url('tagrss', array('tag' => $this->tag)), // TRANS: Link label for feed on "notices with tag" page.