From cfe186a5905005f882e870f5af79b31d53dd04ae Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 11 Nov 2013 11:49:36 +0000 Subject: updated inline documentation about location of local style.ini --- lib/tpl/dokuwiki/style.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/tpl') diff --git a/lib/tpl/dokuwiki/style.ini b/lib/tpl/dokuwiki/style.ini index 897b6e6da..cc23c169f 100644 --- a/lib/tpl/dokuwiki/style.ini +++ b/lib/tpl/dokuwiki/style.ini @@ -2,7 +2,8 @@ ; for limitations of the ini format used here ; To extend this file or make changes to it, it is recommended to create -; a style.local.ini file to prevent losing any changes after an upgrade. +; a local conf/tpl//style.ini file to prevent losing +; any changes after an upgrade. ; Please don't forget to copy the section your changes should be under ; (i.e. [stylesheets] or [replacements]) into that file as well. -- 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/detail.php | 14 ++++++-------- lib/tpl/dokuwiki/main.php | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 20 deletions(-) (limited to 'lib/tpl') diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php index c602830f7..2ee36a2a9 100644 --- a/lib/tpl/dokuwiki/detail.php +++ b/lib/tpl/dokuwiki/detail.php @@ -110,26 +110,24 @@ header('X-UA-Compatible: IE=edge,chrome=1');
    = AUTH_UPLOAD) && function_exists('media_managerURL')) { $mmURL = media_managerURL(array('ns' => $imgNS, 'image' => $IMG)); - $data['mediaManager'] = '
  • '.$lang['img_manager'].'
  • '; + $data['items']['mediaManager'] = '
  • '.$lang['img_manager'].'
  • '; } // Back to [ID]; @todo: transfer logic to backend - $data['img_backto'] = '
  • '.$lang['img_backto'].' '.$ID.'
  • '; + $data['items']['img_backto'] = '
  • '.$lang['img_backto'].' '.$ID.'
  • '; // 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); 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/detail.php | 1 - lib/tpl/dokuwiki/main.php | 1 - 2 files changed, 2 deletions(-) (limited to 'lib/tpl') diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php index 2ee36a2a9..ec846f6fd 100644 --- a/lib/tpl/dokuwiki/detail.php +++ b/lib/tpl/dokuwiki/detail.php @@ -110,7 +110,6 @@ header('X-UA-Compatible: IE=edge,chrome=1');
        $conf['template'], 'view' => 'main', 'items' => array( 'edit' => tpl_action('edit', 1, 'li', 1, '', ''), -- cgit v1.2.3