]> git.wh0rd.org Git - tt-rss.git/commitdiff
add several HOOK_PREFS_TAB_SECTION hook points
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 26 Dec 2012 21:12:28 +0000 (01:12 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 26 Dec 2012 21:13:18 +0000 (01:13 +0400)
classes/pluginhost.php
classes/pref/feeds.php
classes/pref/prefs.php

index ee56886f48ea4b336708e309d9b61577059da923..545e62e01b2468a8c284b384b02656375d8829aa 100644 (file)
@@ -9,7 +9,7 @@ class PluginHost {
        const HOOK_ARTICLE_BUTTON = 1;
        const HOOK_ARTICLE_FILTER = 2;
        const HOOK_PREFS_TAB = 3;
-       const HOOK_PREFS_SECTION = 4;
+       const HOOK_PREFS_TAB_SECTION = 4;
        const HOOK_PREFS_TABS = 5;
        const HOOK_FEED_PARSED = 6;
        const HOOK_UPDATE_TASK = 7;
index b28bd54912e88011cb8cb39a059ea5e07a1150ca..b423eab9525e6fb4aaa3cb9f13aa98ba7f6e0e27 100644 (file)
@@ -1414,6 +1414,10 @@ class Pref_Feeds extends Handler_Protected {
                print "<button dojoType=\"dijit.form.Button\" onclick=\"return displayDlg('pubOPMLUrl')\">".
                        __('Display published OPML URL')."</button> ";
 
+               global $pluginhost;
+               $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TAB_SECTION,
+                       "hook_prefs_tab_section", "prefFeedsOPML");
+
                print "</div>"; # pane
 
                if (strpos($_SERVER['HTTP_USER_AGENT'], "Firefox") !== false) {
@@ -1453,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')."\">";
@@ -1477,6 +1485,10 @@ 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;
index 14e88546aa1ab9b32f00f424f06b23d0c42aa1e6..e8926194e6ebf767b8a6ea9761d70cb670e1f0d0 100644 (file)
@@ -366,6 +366,10 @@ class Pref_Prefs extends Handler_Protected {
                        }
                }
 
+               global $pluginhost;
+               $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TAB_SECTION,
+                       "hook_prefs_tab_section", "prefPrefsAuth");
+
                print "</div>"; #pane
 
                print "<div dojoType=\"dijit.layout.AccordionPane\" selected=\"true\" title=\"".__('Preferences')."\">";
@@ -594,6 +598,10 @@ class Pref_Prefs extends Handler_Protected {
 
                print "</table>";
 
+               global $pluginhost;
+               $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TAB_SECTION,
+                       "hook_prefs_tab_section", "prefPrefsPrefsInside");
+
                print '</div>'; # inside pane
                print '<div dojoType="dijit.layout.ContentPane" region="bottom">';
 
@@ -621,6 +629,10 @@ class Pref_Prefs extends Handler_Protected {
                                <label for='prefs_show_advanced'>" .
                                __("Show additional preferences") . "</label>";
 
+               global $pluginhost;
+               $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TAB_SECTION,
+                       "hook_prefs_tab_section", "prefPrefsPrefsOutside");
+
                print "</form>";
                print '</div>'; # inner pane
                print '</div>'; # border container