host = $host; $host->add_hook($host::HOOK_PREFS_TAB, $this); } function is_public_method($method) { return in_array($method, ["subscribe", "sharepopup"]); } function subscribe() : void { if (Config::get(Config::SINGLE_USER_MODE)) { UserHelper::login_sequence(); } if (!empty($_SESSION["uid"])) { $feed_url = clean($_REQUEST["feed_url"] ?? ""); $csrf_token = clean($_POST["csrf_token"] ?? ""); header('Content-Type: text/html; charset=utf-8'); ?> <?= __("Subscribe to feed...") ?>

%s.", $feed_url)); break; case 1: print_notice(T_sprintf("Subscribed to %s.", $feed_url)); break; case 2: print_error(T_sprintf("Could not subscribe to %s.", $feed_url)); break; case 3: print_error(T_sprintf("No feeds found in %s.", $feed_url)); break; case 4: $feed_urls = $rc["feeds"]; break; case 5: print_error(T_sprintf("Could not subscribe to %s.
Can't download the Feed URL.", $feed_url)); break; } if ($feed_urls) { ?>
">
host->get_public_method_url($this, "subscribe")); } } function sharepopup() : void { if (Config::get(Config::SINGLE_USER_MODE)) { UserHelper::login_sequence(); } header('Content-Type: text/html; charset=utf-8'); ?> <?= __("Share with Tiny Tiny RSS") ?>

"window.close()"]) ?>
host->get_public_method_url($this, "sharepopup"); ?>
" />
"/>

host->get_public_method_url($this, "subscribe"); $bm_share_url = $this->host->get_public_method_url($this, "sharepopup"); $confirm_str = str_replace("'", "\'", __('Subscribe to %s in Tiny Tiny RSS?')); $bm_subscribe_url = htmlspecialchars("javascript:{if(confirm('$confirm_str'.replace('%s',window.location.href)))window.location.href='$bm_subscribe_url&feed_url='+encodeURIComponent(window.location.href)}"); $bm_share_url = htmlspecialchars("javascript:(function(){var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='$bm_share_url',l=d.location,e=encodeURIComponent,g=f+'&title='+((e(s))?e(s):e(document.title))+'&url='+e(l.href);function a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=500,height=250')){l.href=g;}}a();})()"); ?>

'alt-info', "onclick" => "window.open('https://tt-rss.org/wiki/ShareAnything')"]) ?>