From 91e9045718073c3a4ad4ce581e9192f0a87baaf7 Mon Sep 17 00:00:00 2001 From: Anika Henke <anika@selfthinker.org> Date: Sun, 29 Jan 2012 19:15:13 +0000 Subject: [PATCH] added two new config options: tagline and sidebar Templates authors should support these to make the transition between templates easier. Templates which already have a sidebar could first check for $conf['sidebar'] and use it if it's defined, otherwise use their old own sidebar functionality to stay backwards-compatible. --- conf/dokuwiki.php | 2 ++ lib/plugins/config/lang/en/lang.php | 2 ++ lib/plugins/config/settings/config.metadata.php | 2 ++ 3 files changed, 6 insertions(+) diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php index 41f0fd566..7a7e4bf1a 100644 --- a/conf/dokuwiki.php +++ b/conf/dokuwiki.php @@ -28,6 +28,8 @@ $conf['mediarevisions'] = 1; //enable/disable media revisions $conf['start'] = 'start'; //name of start page $conf['title'] = 'DokuWiki'; //what to show in the title $conf['template'] = 'default'; //see lib/tpl directory +$conf['tagline'] = ''; //tagline in header (if template supports it) +$conf['sidebar'] = 'sidebar'; //name of sidebar in root namespace (if template supports it) $conf['license'] = 'cc-by-nc-sa'; //see conf/license.php $conf['fullpath'] = 0; //show full path of the document or relative to datadir only? 0|1 $conf['recent'] = 20; //how many entries to show in recent diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php index a075d7cc2..74ec56345 100644 --- a/lib/plugins/config/lang/en/lang.php +++ b/lib/plugins/config/lang/en/lang.php @@ -62,6 +62,8 @@ $lang['cookiedir'] = 'Cookie path. Leave blank for using baseurl.'; $lang['start'] = 'Start page name'; $lang['title'] = 'Wiki title'; $lang['template'] = 'Template'; +$lang['tagline'] = 'Tagline (if template supports it)'; +$lang['sidebar'] = 'Sidebar page name (if template supports it), empty field disables the sidebar'; $lang['license'] = 'Under which license should your content be released?'; $lang['fullpath'] = 'Reveal full path of pages in the footer'; $lang['recent'] = 'Recent changes'; diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index d8ad06134..96451e857 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -91,6 +91,8 @@ $meta['title'] = array('string'); $meta['start'] = array('string','_pattern' => '!^[^:;/]+$!'); // don't accept namespaces $meta['lang'] = array('dirchoice','_dir' => DOKU_INC.'inc/lang/'); $meta['template'] = array('dirchoice','_dir' => DOKU_INC.'lib/tpl/','_pattern' => '/^[\w-]+$/'); +$meta['tagline'] = array('string'); +$meta['sidebar'] = array('string'); $meta['license'] = array('license'); $meta['savedir'] = array('savedir'); $meta['basedir'] = array('string'); -- GitLab