]> git.wh0rd.org - tt-rss.git/blobdiff - classes/pref/feeds.php
add several HOOK_PREFS_TAB_SECTION hook points
[tt-rss.git] / classes / pref / feeds.php
index 1f6d63f2c2626b8cba5e045edc8a13a8ec70d05e..b423eab9525e6fb4aaa3cb9f13aa98ba7f6e0e27 100644 (file)
@@ -475,7 +475,6 @@ class Pref_Feeds extends Handler_Protected {
        function editfeed() {
                global $purge_intervals;
                global $update_intervals;
-               global $update_methods;
 
                $feed_id = db_escape_string($_REQUEST["id"]);
 
@@ -547,20 +546,10 @@ class Pref_Feeds extends Handler_Protected {
                print_select_hash("update_interval", $update_interval, $update_intervals,
                        'dojoType="dijit.form.Select"');
 
-               /* Update method */
-
-               $update_method = db_fetch_result($result, 0, "update_method",
-                       'dojoType="dijit.form.Select"');
-
-               print " " . __('using') . " ";
-               print_select_hash("update_method", $update_method, $update_methods,
-                       'dojoType="dijit.form.Select"');
+               /* Purge intl */
 
                $purge_interval = db_fetch_result($result, 0, "purge_interval");
 
-
-                       /* Purge intl */
-
                print "<hr/>";
                print __('Article purging:') . " ";
 
@@ -746,7 +735,6 @@ class Pref_Feeds extends Handler_Protected {
        function editfeeds() {
                global $purge_intervals;
                global $update_intervals;
-               global $update_methods;
 
                $feed_ids = db_escape_string($_REQUEST["ids"]);
 
@@ -805,13 +793,6 @@ class Pref_Feeds extends Handler_Protected {
 
                $this->batch_edit_cbox("update_interval");
 
-               /* Update method */
-
-               print " " . __('using') . " ";
-               print_select_hash("update_method", $update_method, $update_methods,
-                       'disabled="1" dojoType="dijit.form.Select"');
-               $this->batch_edit_cbox("update_method");
-
                /* Purge intl */
 
                if (FORCE_ARTICLE_PURGE == 0) {
@@ -929,7 +910,6 @@ class Pref_Feeds extends Handler_Protected {
                        db_escape_string($_POST["cache_images"]));
                $cache_content = checkbox_to_sql_bool(
                        db_escape_string($_POST["cache_content"]));
-               $update_method = (int) db_escape_string($_POST["update_method"]);
 
                $always_display_enclosures = checkbox_to_sql_bool(
                        db_escape_string($_POST["always_display_enclosures"]));
@@ -970,8 +950,7 @@ class Pref_Feeds extends Handler_Protected {
                                always_display_enclosures = $always_display_enclosures,
                                mark_unread_on_update = $mark_unread_on_update,
                                update_on_checksum_change = $update_on_checksum_change,
-                               update_method = '$update_method'
-                               WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
+                       WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
 
                } else {
                        $feed_data = array();
@@ -1045,10 +1024,6 @@ class Pref_Feeds extends Handler_Protected {
                                                $qpart = "rtl_content = $rtl_content";
                                                break;
 
-                                       case "update_method":
-                                               $qpart = "update_method = '$update_method'";
-                                               break;
-
                                        case "cat_id":
                                                $qpart = $category_qpart_nocomma;
                                                break;
@@ -1401,9 +1376,7 @@ class Pref_Feeds extends Handler_Protected {
 
                print "</div>"; # feeds pane
 
-               print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Import and export')."\">";
-
-               print "<h3>" . __("OPML") . "</h3>";
+               print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('OPML')."\">";
 
                print "<p>" . __("Using OPML you can export and import your feeds, filters, labels and Tiny Tiny RSS settings.") . " ";
 
@@ -1441,29 +1414,9 @@ class Pref_Feeds extends Handler_Protected {
                print "<button dojoType=\"dijit.form.Button\" onclick=\"return displayDlg('pubOPMLUrl')\">".
                        __('Display published OPML URL')."</button> ";
 
-
-               print "<h3>" . __("Article archive") . "</h3>";
-
-               print "<p>" . __("You can export and import your Starred and Archived articles for safekeeping or when migrating between tt-rss instances.") . "</p>";
-
-               print "<button dojoType=\"dijit.form.Button\" onclick=\"return exportData()\">".
-                       __('Export my data')."</button> ";
-
-               print "<hr>";
-
-               print "<iframe id=\"data_upload_iframe\"
-                       name=\"data_upload_iframe\" onload=\"dataImportComplete(this)\"
-                       style=\"width: 400px; height: 100px; display: none;\"></iframe>";
-
-               print "<form name=\"import_form\" style='display : block' target=\"data_upload_iframe\"
-                       enctype=\"multipart/form-data\" method=\"POST\"
-                       action=\"backend.php\">
-                       <input id=\"export_file\" name=\"export_file\" type=\"file\">&nbsp;
-                       <input type=\"hidden\" name=\"op\" value=\"dlg\">
-                       <input type=\"hidden\" name=\"method\" value=\"dataimport\">
-                       <button dojoType=\"dijit.form.Button\" onclick=\"return importData();\" type=\"submit\">" .
-                       __('Import') . "</button>";
-
+               global $pluginhost;
+               $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TAB_SECTION,
+                       "hook_prefs_tab_section", "prefFeedsOPML");
 
                print "</div>"; # pane
 
@@ -1504,6 +1457,10 @@ class Pref_Feeds extends Handler_Protected {
 
                print "<a href=\"$bm_url\" class='bookmarklet'>" . __('Share with Tiny Tiny RSS'). "</a>";
 
+               global $pluginhost;
+               $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TAB_SECTION,
+                       "hook_prefs_tab_section", "prefFeedsBookmarklets");
+
                print "</div>"; #pane
 
                print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Published & shared articles / Generated feeds')."\">";
@@ -1528,14 +1485,18 @@ class Pref_Feeds extends Handler_Protected {
                print "<button dojoType=\"dijit.form.Button\" onclick=\"return clearArticleAccessKeys()\">".
                        __('Unshare all articles')."</button> ";
 
+               global $pluginhost;
+               $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TAB_SECTION,
+                       "hook_prefs_tab_section", "prefFeedsPublishedGenerated");
+
                print "</div>"; #pane
 
                global $pluginhost;
+
                $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TAB,
                        "hook_prefs_tab", "prefFeeds");
 
                print "</div>"; #container
-
        }
 
        private function feedlist_init_cat($cat_id, $hidden = false) {