From bc1e9ee1b1fffcb554afced8504270032c97341f Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 4 Mar 2013 10:04:57 +0000 Subject: added loggedIn class to main tpl container --- lib/tpl/dokuwiki/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/tpl/dokuwiki/main.php') diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index 963750a1c..cd5a66ad4 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -29,7 +29,7 @@ $showSidebar = $hasSidebar && ($ACT=='show');
+ ?> "> -- cgit v1.2.3 From 0a8f03d88cd0597d1317cf5164383dea2ae29ca4 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 12 Jul 2013 19:53:46 +0200 Subject: add TEMPLATE_DOKUWIKI_PAGETOOLFLOAT_DISPLAY event to template This adds a custom event to the 'dokuwiki' template that allows plugin authors to easily integrate custom pagetool buttons into the template. --- lib/tpl/dokuwiki/main.php | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'lib/tpl/dokuwiki/main.php') diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index 43a0c0da7..30cd4dda9 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -75,12 +75,23 @@ $showSidebar = $hasSidebar && ($ACT=='show');
    ', ''); - tpl_action('revert', 1, 'li', 0, '', ''); - tpl_action('revisions', 1, 'li', 0, '', ''); - tpl_action('backlink', 1, 'li', 0, '', ''); - tpl_action('subscribe', 1, 'li', 0, '', ''); - tpl_action('top', 1, 'li', 0, '', ''); + $data = array( + 'edit' => tpl_action('edit', 1, 'li', 1, '', ''), + 'revert' => tpl_action('revert', 1, 'li', 1, '', ''), + 'revisions' => tpl_action('revisions', 1, 'li', 1, '', ''), + 'backlink' => tpl_action('backlink', 1, 'li', 1, '', ''), + 'subscribe' => tpl_action('subscribe', 1, 'li', 1, '', ''), + 'top' => tpl_action('top', 1, 'li', 1, '', '') + ); + + // the page tools can be ammended through a custom plugin hook + $evt = new Doku_Event('TEMPLATE_DOKUWIKI_PAGETOOLFLOAT_DISPLAY', $data); + if($evt->advise_before()){ + foreach($evt->data as $k => $html) echo $html; + } + $evt->advise_after(); + unset($data); + unset($evt); ?>
-- cgit v1.2.3 From c71db656795e82055d114764ad93f71a968a2f28 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 21 Jul 2013 21:20:44 +0100 Subject: added tpl_classes() to return useful layout classes --- lib/tpl/dokuwiki/main.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/tpl/dokuwiki/main.php') diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index d432a701e..016146275 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -27,9 +27,8 @@ $showSidebar = $hasSidebar && ($ACT=='show'); -
+
-- cgit v1.2.3 From ab3a75dc6d3e7c7136a38c796c4b0da66ce96bc2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 1 Aug 2013 19:31:35 +0200 Subject: rename event to TEMPLATE_DOKUWIKI_PAGETOOLS_DISPLAY also made it more secure against copy'n'paste --- lib/tpl/dokuwiki/main.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/tpl/dokuwiki/main.php') diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index 30cd4dda9..712d01175 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -85,7 +85,11 @@ $showSidebar = $hasSidebar && ($ACT=='show'); ); // the page tools can be ammended through a custom plugin hook - $evt = new Doku_Event('TEMPLATE_DOKUWIKI_PAGETOOLFLOAT_DISPLAY', $data); + // 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; } -- cgit v1.2.3 From 4432749ab2140ede94ac1c724ab39b7219fdb406 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Fri, 4 Oct 2013 17:59:13 +0100 Subject: RS#2860 fix configuration option key to 'template' --- lib/tpl/dokuwiki/main.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/tpl/dokuwiki/main.php') diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index 9e507d86d..f6ca4ed86 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -83,11 +83,11 @@ $showSidebar = $hasSidebar && ($ACT=='show'); 'top' => tpl_action('top', 1, 'li', 1, '', '') ); - // the page tools can be ammended through a custom plugin hook + // the page tools can be amended 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'; + // of using $conf['template'] here + $hook = 'TEMPLATE_'.strtoupper($conf['template']).'_PAGETOOLS_DISPLAY'; $evt = new Doku_Event($hook, $data); if($evt->advise_before()){ foreach($evt->data as $k => $html) echo $html; -- cgit v1.2.3 From 834ad97fc976d60bd2e57b488a43aca1f39b2277 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Nov 2013 21:18:23 +0000 Subject: Improved pagetools event in dokuwiki template This moves the template name away from the hook name into the event data (as the 'tpl' value). Therefore it moves the previous data items into the 'items' sub array. A 'view' value has also been added to describe in which template file the event was called ('main' or 'detail'). This way it will be much easier for plugins to consider default cases and differentiate between main and other layouts. --- lib/tpl/dokuwiki/main.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'lib/tpl/dokuwiki/main.php') diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index f6ca4ed86..0dbaa681b 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -75,22 +75,22 @@ $showSidebar = $hasSidebar && ($ACT=='show');
    tpl_action('edit', 1, 'li', 1, '', ''), - 'revert' => tpl_action('revert', 1, 'li', 1, '', ''), - 'revisions' => tpl_action('revisions', 1, 'li', 1, '', ''), - 'backlink' => tpl_action('backlink', 1, 'li', 1, '', ''), - 'subscribe' => tpl_action('subscribe', 1, 'li', 1, '', ''), - 'top' => tpl_action('top', 1, 'li', 1, '', '') + 'tpl' => $conf['template'], + 'view' => 'main', + 'items' => array( + 'edit' => tpl_action('edit', 1, 'li', 1, '', ''), + 'revert' => tpl_action('revert', 1, 'li', 1, '', ''), + 'revisions' => tpl_action('revisions', 1, 'li', 1, '', ''), + 'backlink' => tpl_action('backlink', 1, 'li', 1, '', ''), + 'subscribe' => tpl_action('subscribe', 1, 'li', 1, '', ''), + 'top' => tpl_action('top', 1, 'li', 1, '', '') + ) ); // the page tools can be amended 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['template'] here - $hook = 'TEMPLATE_'.strtoupper($conf['template']).'_PAGETOOLS_DISPLAY'; - $evt = new Doku_Event($hook, $data); + $evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data); if($evt->advise_before()){ - foreach($evt->data as $k => $html) echo $html; + foreach($evt->data['items'] as $k => $html) echo $html; } $evt->advise_after(); unset($data); -- cgit v1.2.3 From f8cadb6a04d3c1c201dd77627c89bd1c0efcac51 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 17 Nov 2013 20:39:07 +0000 Subject: removed tpl from TEMPLATE_PAGETOOLS_DISPLAY event as it's always available in --- lib/tpl/dokuwiki/main.php | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/tpl/dokuwiki/main.php') diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index 0dbaa681b..3bc46406a 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -75,7 +75,6 @@ $showSidebar = $hasSidebar && ($ACT=='show');
      $conf['template'], 'view' => 'main', 'items' => array( 'edit' => tpl_action('edit', 1, 'li', 1, '', ''), -- cgit v1.2.3