From 3ceeb5c95239148f35a115e1dcfc69f48bff2842 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Wed, 29 Aug 2007 19:54:36 +0000 Subject: [PATCH] Version 1.2.1 () ------------------------------------------------------------------------ * Bulletproof template can now include custom user stylesheets (*_style.css) in the dropdown of a colorset. (garvinhicking) --- docs/NEWS | 6 ++++++ templates/bulletproof/config.inc.php | 24 +++++++++++++++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index e381bb2..d7de3de 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -35,6 +35,12 @@ Version 1.3 () * Full pingback support, fallback trackback method for WordPress blogs. (brockhaus) +Version 1.2.1 () +------------------------------------------------------------------------ + + * Bulletproof template can now include custom user stylesheets + (*_style.css) in the dropdown of a colorset. (garvinhicking) + Version 1.2 (August 26th, 2007) ------------------------------------------------------------------------ diff --git a/templates/bulletproof/config.inc.php b/templates/bulletproof/config.inc.php index ce396b2..706b2b9 100644 --- a/templates/bulletproof/config.inc.php +++ b/templates/bulletproof/config.inc.php @@ -8,21 +8,35 @@ $probelang = dirname(__FILE__) . '/' . $serendipity['charset'] . 'lang_' . $sere if (file_exists($probelang)) { include $probelang; } - + include dirname(__FILE__) . '/lang_en.inc.php'; $serendipity['smarty']->assign(array('currpage'=> "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])); +$colorsets = array( + 'purple' => BP_COLORSET_OPT1, + 'blue' => BP_COLORSET_OPT2, + 'green' => BP_COLORSET_OPT3, + 'blank' => BP_COLORSET_DEF +); + +if ($serendipity['GET']['adminModule'] == 'templates') { + $css_files = glob(dirname(__FILE__) . '/*_style.css'); + foreach($css_files AS $css_file) { + $css_file = str_replace('_style.css', '', basename($css_file)); + if (!isset($colorsets[$css_file])) { + $colorsets[$css_file] = $css_file; + } + } +} + $template_config = array( array( 'var' => 'colorset', 'name' => THEME_COLORSET, 'type' => 'select', 'default' => 'purple', - 'select_values' => array('purple' => BP_COLORSET_OPT1, - 'blue' => BP_COLORSET_OPT2, - 'green' => BP_COLORSET_OPT3, - 'blank' => BP_COLORSET_DEF) + 'select_values' => $colorsets ), array( 'var' => 'layouttype', -- 2.39.5