]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add activitystreams links to other actions
authorEvan Prodromou <evan@status.net>
Wed, 22 Jun 2011 21:19:46 +0000 (17:19 -0400)
committerEvan Prodromou <evan@status.net>
Wed, 22 Jun 2011 21:19:46 +0000 (17:19 -0400)
actions/all.php
actions/public.php
actions/replies.php
actions/showfavorites.php
actions/showgroup.php
actions/showprofiletag.php
actions/tag.php

index 3deaea52f95ca6e059f5971566bd5145792ac734..4ee3911b40fdb26e84150db918b43fb9955a474f 100644 (file)
@@ -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(
index 90e0e6e2594c5e0a8b149bc7fa6275559b1d6b30..37a1ef3c2377849a03c0056e166d0fdb5af3f4ed 100644 (file)
@@ -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,
index cf248a7785c49e0c89ece25321bca148443026d3..86042557dc11d2cb1afebc12b14ecb55669365f2 100644 (file)
@@ -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.
index 65bb8f1bebae77207013e65b9741360a96aabbfd..64fa14bc82b367132a78b0add5647dfd0f555a9d 100644 (file)
@@ -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.
index 530deff622ff21a8b0cdf1668afb3245cbcb59a0..d4f65a805983d01fa5361b4729080d06d97a7297 100644 (file)
@@ -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.
index d1b0768d232aebf95dbf9a06896cf5b41a3dc6d7..a101e4bafab74a053b9bbbdab10f7ac67150f833 100644 (file)
@@ -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,
index f3514bef55a2152af619f7ee57693d7a33183e08..33339cb8bfd153fd95976cfe684dc476ad1300ee 100644 (file)
@@ -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.