From ab00c52430610633768cf3d856f105cad0f52e9d Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 3 Sep 2014 09:02:07 +0000 Subject: feature 3133: add colorscheme parameter for themes. This way we can use the appropriate CSS for selectize (and other things) git-svn-id: http://piwigo.org/svn/trunk@29389 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/template.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/template.class.php b/include/template.class.php index 322a78957..c3fe95a7c 100644 --- a/include/template.class.php +++ b/include/template.class.php @@ -177,7 +177,7 @@ class Template * @param bool $load_css * @param bool $load_local_head */ - function set_theme($root, $theme, $path, $load_css=true, $load_local_head=true) + function set_theme($root, $theme, $path, $load_css=true, $load_local_head=true, $colorscheme='dark') { $this->set_template_dir($root.'/'.$theme.'/'.$path); @@ -203,6 +203,12 @@ class Template $tpl_var['local_head'] = realpath($root.'/'.$theme.'/'.$themeconf['local_head'] ); } $themeconf['id'] = $theme; + + if (!isset($themeconf['colorscheme'])) + { + $themeconf['colorscheme'] = $colorscheme; + } + $this->smarty->append('themes', $tpl_var); $this->smarty->append('themeconf', $themeconf, true); } -- cgit v1.2.3