3 * Allows user to register their Tiny Tiny RSS instance at subtome.com,
4 * so that they can subscribe to feeds with a few clicks.
8 * @author Christian Weiske <cweiske@cweiske.de>
9 * @license AGPLv3 or later
10 * @link http://docs.subtome.com/developers/
11 * @link https://tt-rss.org/redmine/projects/tt-rss/wiki/FrequentlyAskedQuestions#I-need-a-URL-I-can-call-to-subscribe-to-feed-to-integrate-with-some-third-party-browser-extensionapplication
13 class SubToMe extends Plugin
15 public function about()
19 'Add Tiny Tiny RSS to SubToMe.com',
25 public function init($host)
27 $host->add_hook($host::HOOK_PREFS_TAB, $this);
30 public function hook_prefs_tab($args)
32 if ($args != "prefPrefs") {
35 $name = 'Tiny Tiny RSS @ '
36 . parse_url(get_self_url_prefix(), PHP_URL_HOST);
38 $ttSubscribeUrl = get_self_url_prefix()
39 . '/public.php?op=subscribe&feed_url={url}';
40 $regUrl = 'https://www.subtome.com/register-no-ui.html'
41 . '?name=' . urlencode($name)
42 . '&url=' . urlencode($ttSubscribeUrl);
43 $hRegUrl = htmlspecialchars($regUrl);
45 $jRegUrl = json_encode($regUrl);
48 <div dojoType="dijit.layout.AccordionPane" title="SubToMe">
49 <iframe style="display:none;" src="$hRegUrl"></iframe>
51 Tiny Tiny RSS has been added to subtome.com automatically
52 by visiting the Tiny Tiny RSS preferences.
55 Try the "Subscribe" button on
56 <a href="http://blog.superfeedr.com/">blog.superfeedr.com</a>.
62 public function api_version()