]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
trac855 trac856 and Feed list for the Favorited page
authorcsarven <csarven@controlyourself.ca>
Fri, 5 Dec 2008 22:14:02 +0000 (17:14 -0500)
committercsarven <csarven@controlyourself.ca>
Fri, 5 Dec 2008 22:14:02 +0000 (17:14 -0500)
darcs-hash:20081205221402-eefa4-9c765fe3c7a6e0cf9cdee1749ed2bebb24d3deaf.gz

actions/favorited.php
actions/public.php
actions/tag.php
lib/personal.php
lib/util.php

index 78749a3ab9c14097654b5777418f93718969bd39..035e2f9535d42429863c0796feac02c4f4fccb1d 100644 (file)
@@ -44,6 +44,11 @@ class FavoritedAction extends StreamAction {
                common_raw($output);
                common_element_end('div');
                $this->public_views_menu();
+
+               $this->show_feeds_list(array(0=>array('href'=>common_local_url('favoritedrss'),
+                                                                                         'type' => 'rss',
+                                                                                         'version' => 'RSS 1.0',
+                                                                                         'item' => 'favoritedrss')));
        }
 
        function show_header() {
@@ -108,4 +113,4 @@ class FavoritedAction extends StreamAction {
                common_pagination($page > 1, $cnt > NOTICES_PER_PAGE,
                                                  $page, 'favorited');
        }
-}
\ No newline at end of file
+}
index 753b9d07fe942a98773d05111785b55902e50657..8a41dcd56b420ab2c6370059878771c790cc3f29 100644 (file)
@@ -53,6 +53,16 @@ class PublicAction extends StreamAction {
                }
 
                $this->public_views_menu();
+
+
+               $this->show_feeds_list(array(0=>array('href'=>common_local_url('publicrss'),
+                                                                                         'type' => 'rss',
+                                                                                         'version' => 'RSS 1.0',
+                                                                                         'item' => 'publicrss'),
+                                                                        1=>array('href'=>common_local_url('publicatom'),
+                                                                                         'type' => 'atom',
+                                                                                         'version' => 'Atom 1.0',
+                                                                                         'item' => 'publicatom')));
        }
 
        function get_instructions() {
@@ -92,4 +102,4 @@ class PublicAction extends StreamAction {
                common_pagination($page > 1, $cnt > NOTICES_PER_PAGE,
                                                  $page, 'public');
        }
-}
\ No newline at end of file
+}
index 034072a6bff405ab2ef4c168425e58f257c5f5be..50b76dbcdb40830cbf541fe967dd7509b89dab51 100644 (file)
@@ -35,7 +35,6 @@ class TagAction extends StreamAction {
                        common_show_header(sprintf(_("Notices tagged with %s"), $tag),
                                                           array($this, 'show_header'), $tag,
                                                           array($this, 'show_top'));
-
                        $this->show_notices($tag);
                } else {
                        common_show_header(_("Tags"),
@@ -69,6 +68,12 @@ class TagAction extends StreamAction {
                        common_element_end('div');
                        $this->public_views_menu();
                }
+               else {
+                       $this->show_feeds_list(array(0=>array('href'=>common_local_url('tagrss'),
+                                                                                                 'type' => 'rss',
+                                                                                                 'version' => 'RSS 1.0',
+                                                                                                 'item' => 'tagrss')));
+               }
        }
 
        function show_tags()
index f1c6ea9b137a1476b95c71a138ef3e23b1e1235d..86433b4867fea94ea4e77f539ea7d81fb2d034ec 100644 (file)
@@ -122,6 +122,34 @@ class PersonalAction extends Action {
                                $feed['textContent'] = "RSS";
                                break;
 
+                       case 'publicrss':
+                               $feed_classname = $feed['type'];
+                               $feed_mimetype = "application/".$feed['type']."+xml";
+                               $feed_title = "Public timeline ".$feed['version']." feed";
+                               $feed['textContent'] = "RSS";
+                               break;
+
+                       case 'publicatom':
+                               $feed_classname = "atom";
+                               $feed_mimetype = "application/".$feed['type']."+xml";
+                               $feed_title = "Public timeline ".$feed['version']." feed";
+                               $feed['textContent'] = "Atom";
+                               break;
+
+                       case 'tagrss':
+                               $feed_classname = $feed['type'];
+                               $feed_mimetype = "application/".$feed['type']."+xml";
+                               $feed_title = $feed['version']." feed for this tag";
+                               $feed['textContent'] = "RSS";
+                               break;
+
+                       case 'favoritedrss':
+                               $feed_classname = $feed['type'];
+                               $feed_mimetype = "application/".$feed['type']."+xml";
+                               $feed_title = "Favorited ".$feed['version']." feed";
+                               $feed['textContent'] = "RSS";
+                               break;
+
                        case 'foaf':
                                $feed_classname = "foaf";
                                $feed_mimetype = "application/".$feed['type']."+xml";
index 077c9219a8889b9e279014c716f219060546c520..1b0fc1ec827e6d3a628ccda25c85e653bb2b9d74 100644 (file)
@@ -1064,6 +1064,8 @@ function common_fancy_url($action, $args=NULL) {
                }
         case 'publicrss':
                return common_path('rss');
+        case 'publicatom':
+               return common_path("api/statuses/public_timeline.atom");
         case 'publicxrds':
                return common_path('xrds');
         case 'featuredrss':