]> git.wh0rd.org Git - tt-rss.git/commitdiff
add patch to integrate better with firefox (closes #148)
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 31 Aug 2007 00:55:33 +0000 (01:55 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 31 Aug 2007 00:55:33 +0000 (01:55 +0100)
functions.php
modules/pref-feeds.php

index d37f4bdf4f6c1226db19a7b4ead95dc3483aa708..d8faef6aad8e3263772c5b0f5bbd247d8b20811e 100644 (file)
                        (SELECT COUNT(int_id) FROM ttrss_user_entries WHERE ref_id = id) = 0");
        }
 
+        function add_feed_url() {
+               $url_path = 'http://' . $_SERVER["HTTP_HOST"] . parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
+               $url_path .= "?op=pref-feeds&quiet=1&subop=add&feed_url=%s";
+               return $url_path;
+        }
+
 ?>
index 25cbf707a8ec5945b8ad1b295b3890e89ff290c4..6df9804b229e44172f27dea3830a45436c1162ee 100644 (file)
                                value=\"".__('Export OPML')."\">";                      
 
 
+               print "<h3>" . __("Firefox Integration") . "</h3>";
+                
+                print "<p>" . __('This Tiny Tiny RSS site can be used as a Firefox Feed Reader by clicking the link below.');
+               print "</p><p class=\"small\"> <a href='javascript:window.navigator.registerContentHandler(" .
+                      "\"application/vnd.mozilla.maybe.feed\", " .
+                      "\"" . add_feed_url() . "\", " . " \"Tiny Tiny RSS\")'>" .
+                      __('Click here to register this site as a feed reader.') . "</a></p>";
+
+
                print "<h3>".__("Published articles")."</h3>";
 
                if (!get_pref($link, "_PREFS_PUBLISH_KEY")) {