]> git.wh0rd.org Git - tt-rss.git/commitdiff
add HOOK_TOOLBAR_BUTTON, HOOK_ACTION_ITEM, HOOK_HEADLINE_TOOLBAR_BUTTON
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 1 Apr 2013 14:06:09 +0000 (18:06 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 1 Apr 2013 14:06:09 +0000 (18:06 +0400)
classes/feeds.php
classes/pluginhost.php
index.php

index ff6b864e5da4890c5e034371e62d9bd593fa9de8..0c643325f9a4e916ab3dce2d0564258c21a71d35 100644 (file)
@@ -143,6 +143,10 @@ class Feeds extends Handler_Protected {
 
                //$reply .= "</h2";
 
+               foreach ($pluginhost->get_hooks($pluginhost::HOOK_HEADLINE_TOOLBAR_BUTTON) as $p) {
+                        echo $p->hook_headline_toolbar_button($feed_id, $is_cat);
+               }
+
                return $reply;
        }
 
index a6ba72fc6fb1d648312a4fb2e9b38adac2fcc4ec..5b8a77fd64e9d8e90991a863ff4e115715dc9bb3 100644 (file)
@@ -24,6 +24,9 @@ class PluginHost {
        const HOOK_FEED_FETCHED = 12;
        const HOOK_SANITIZE = 13;
        const HOOK_RENDER_ARTICLE_API = 14;
+       const HOOK_TOOLBAR_BUTTON = 15;
+       const HOOK_ACTION_ITEM = 16;
+       const HOOK_HEADLINE_TOOLBAR_BUTTON = 17;
 
        const KIND_ALL = 1;
        const KIND_SYSTEM = 2;
index 0b8a957bb514de2a24cdec154337c5d517a47998..7fb7a7878732c146cfbc0a16f1f1d6eb34ccb85c 100644 (file)
--- a/index.php
+++ b/index.php
                        <option value="2weeks"><?php echo __('Older than two weeks') ?></option>
                </select>
 
-               <button dojoType="dijit.form.Button"
-                       onclick="viewCurrentFeed()">
-                       <?php echo __('Refresh') ?></button>
-
                </form>
 
+               <?php
+                       global $pluginhost;
+                       foreach ($pluginhost->get_hooks($pluginhost::HOOK_TOOLBAR_BUTTON) as $p) {
+                                echo $p->hook_toolbar_button();
+                       }
+               ?>
+
                <div class="actionChooser">
 
                        <button id="net-alert" dojoType="dijit.form.Button" style="display : none" disabled="true"
                                        <!-- <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcAddLabel')"><?php echo __('Create label...') ?></div>
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcAddFilter')"><?php echo __('Create filter...') ?></div> -->
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcHKhelp')"><?php echo __('Keyboard shortcuts help') ?></div>
+
+                                       <?php
+                                               foreach ($pluginhost->get_hooks($pluginhost::HOOK_ACTION_ITEM) as $p) {
+                                                echo $p->hook_action_item();
+                                               }
+                                       ?>
+
                                        <?php if (!$_SESSION["hide_logout"]) { ?>
                                                <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcLogout')"><?php echo __('Logout') ?></div>
                                        <?php } ?>