diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php
index ff9e69336..d8495a59c 100755
--- a/classes/pref/feeds.php
+++ b/classes/pref/feeds.php
@@ -1197,12 +1197,7 @@ class Pref_Feeds extends Handler_Protected {
$opml->opml_import($_SESSION["uid"]);
}
- function index() {
-
- print "
";
- print "
rss_feed ".__('Feeds')."\">";
-
+ private function index_feeds() {
$sth = $this->pdo->prepare("SELECT COUNT(id) AS num_errors
FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ?");
$sth->execute([$_SESSION['uid']]);
@@ -1214,16 +1209,15 @@ class Pref_Feeds extends Handler_Protected {
}
if ($num_errors > 0) {
- $error_button = "
" .
- __("Feeds with errors") . " ";
+ $error_button = "
".
+ __("Feeds with errors")." ";
} else {
$error_button = "";
}
- $inactive_button = "
" .
__("Inactive feeds") . " ";
@@ -1235,175 +1229,202 @@ class Pref_Feeds extends Handler_Protected {
$feed_search = $_SESSION["prefs_feed_search"] ?? "";
}
- print '
';
+ ?>
- print "
"; #toolbar
+
+
+
+
+
+
+
- print "
-
- ".
- __('Search')."
-
";
+
- print "
".
- "
" . __('Select')." ";
- print "
";
- print "
".__('All')."
";
- print "
".__('None')."
";
- print "
";
+
- print "
".
- "
" . __('Feeds')." ";
- print "
";
- print "
".__('Subscribe to feed')."
";
- print "
".__('Edit selected feeds')."
";
- print "
".__('Reset sort order')."
";
- print "
".__('Batch subscribe')."
";
- print "
"
- .__('Unsubscribe')."
";
- print "
";
+
+
+
+
+
+
+
+
+
- if (get_pref('ENABLE_FEED_CATS')) {
- print "
".
- "
" . __('Categories')." ";
- print "
";
- print "
".__('Add category')."
";
- print "
".__('Reset sort order')."
";
- print "
".__('Remove selected')."
";
- print "
";
+
+
- }
+
"
+ persist="true"
+ model="feedModel"
+ openOnClick="false">
+
+
+
+
-
-
-
-
-
-
";
+ private function index_opml() {
+ ?>
-# print "
-# ".__('Hint: you can drag feeds and categories around.')."
-#
";
+
- print '
';
- print '
';
+
- print "
"; # feeds pane
-
- print "
";
-
- print "
" . __("Using OPML you can export and import your feeds, filters, labels and Tiny Tiny RSS settings.") . " ";
-
- print_notice("Only main settings profile can be migrated using OPML.");
-
- print "
";
+
- print "
";
+
+
+
+
- print "" .
- __('Export OPML') . " ";
+
+
+
+
+
- print "
";
- print_checkbox("include_settings", true, "1", "");
- print " " . __("Include settings");
- print " ";
+
- print "";
+
- print "
";
+
+
+
+
- print "
" . __("Published OPML") . " ";
-
- print "
" . __('Your OPML can be published publicly and can be subscribed by anyone who knows the URL below.') .
- " " .
- __("Published OPML does not include your Tiny Tiny RSS settings, feeds that require authentication or feeds hidden from Popular feeds.") . "
";
-
- print "
".
- __('Display published OPML URL')." ";
+
+
+
+ run_hooks(PluginHost::HOOK_PREFS_TAB_SECTION, "prefFeedsOPML");
+ }
- print "
"; # pane
-
- print "
share ".__('Published & shared articles / Generated feeds')."\">";
-
- print "
" . __('Published articles can be subscribed by anyone who knows the following URL:') . " ";
-
+ private function index_shared() {
$rss_url = htmlspecialchars(get_self_url_prefix() .
- "/public.php?op=rss&id=-2&view-mode=all_articles");;
+ "/public.php?op=rss&id=-2&view-mode=all_articles");
+ ?>
- print "".
- __('Display URL')."
- ".
- __('Clear all generated URLs')." ";
+
+
+
+
+
+
+
+
+
+ run_hooks(PluginHost::HOOK_PREFS_TAB_SECTION, "prefFeedsPublishedGenerated");
+ }
- print ""; #pane
+ function index() {
+ ?>
- PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB, "prefFeeds");
+
+
+ index_feeds() ?>
+
- print "
"; #container
+
+ index_opml() ?>
+
+
+
+ index_shared() ?>
+
+
+ run_hooks(PluginHost::HOOK_PREFS_TAB, "prefFeeds");
+ $plugin_data = trim((string)ob_get_contents());
+ ob_end_clean();
+ ?>
+
+
+
+
+
+