summaryrefslogtreecommitdiff
path: root/lib/tpl/dokuwiki/main.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2013-08-01 10:33:31 -0700
committerChristopher Smith <chris@jalakai.co.uk>2013-08-01 10:33:31 -0700
commit7a1c09e067886b15444fc4c1949db932722f8827 (patch)
treee2aecba1c8fbd3cd2cf5e86e3e953fb2c72f7ead /lib/tpl/dokuwiki/main.php
parent301f606fd81604b858381a13d0a0359de10ff561 (diff)
parentab3a75dc6d3e7c7136a38c796c4b0da66ce96bc2 (diff)
downloadrpg-7a1c09e067886b15444fc4c1949db932722f8827.tar.gz
rpg-7a1c09e067886b15444fc4c1949db932722f8827.tar.bz2
Merge pull request #236 from splitbrain/pagetoolsevent
add TEMPLATE_DOKUWIKI_PAGETOOLFLOAT_DISPLAY event to template
Diffstat (limited to 'lib/tpl/dokuwiki/main.php')
-rw-r--r--lib/tpl/dokuwiki/main.php27
1 files changed, 21 insertions, 6 deletions
diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php
index 43a0c0da7..712d01175 100644
--- a/lib/tpl/dokuwiki/main.php
+++ b/lib/tpl/dokuwiki/main.php
@@ -75,12 +75,27 @@ $showSidebar = $hasSidebar && ($ACT=='show');
<div class="tools">
<ul>
<?php
- tpl_action('edit', 1, 'li', 0, '<span>', '</span>');
- tpl_action('revert', 1, 'li', 0, '<span>', '</span>');
- tpl_action('revisions', 1, 'li', 0, '<span>', '</span>');
- tpl_action('backlink', 1, 'li', 0, '<span>', '</span>');
- tpl_action('subscribe', 1, 'li', 0, '<span>', '</span>');
- tpl_action('top', 1, 'li', 0, '<span>', '</span>');
+ $data = array(
+ 'edit' => tpl_action('edit', 1, 'li', 1, '<span>', '</span>'),
+ 'revert' => tpl_action('revert', 1, 'li', 1, '<span>', '</span>'),
+ 'revisions' => tpl_action('revisions', 1, 'li', 1, '<span>', '</span>'),
+ 'backlink' => tpl_action('backlink', 1, 'li', 1, '<span>', '</span>'),
+ 'subscribe' => tpl_action('subscribe', 1, 'li', 1, '<span>', '</span>'),
+ 'top' => tpl_action('top', 1, 'li', 1, '<span>', '</span>')
+ );
+
+ // the page tools can be ammended through a custom plugin hook
+ // if you're deriving from this template and your design is close enough to
+ // the dokuwiki template you might want to trigger a DOKUWIKI event instead
+ // of using $conf['tpl'] here
+ $hook = 'TEMPLATE_'.strtoupper($conf['tpl']).'_PAGETOOLS_DISPLAY';
+ $evt = new Doku_Event($hook, $data);
+ if($evt->advise_before()){
+ foreach($evt->data as $k => $html) echo $html;
+ }
+ $evt->advise_after();
+ unset($data);
+ unset($evt);
?>
</ul>
</div>