From: slothman Date: Thu, 28 Feb 2008 17:25:22 +0000 (+0000) Subject: Allow colorset attributions X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=66413df67234059115f8ca2f57a14713e03a2141;p=s9y.git Allow colorset attributions --- diff --git a/templates/bulletproof/config.inc.php b/templates/bulletproof/config.inc.php index 07a9732..6eaa47d 100644 --- a/templates/bulletproof/config.inc.php +++ b/templates/bulletproof/config.inc.php @@ -306,7 +306,7 @@ $template_config = array( ) ); -$template_loaded_config = serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option']); +$template_loaded_config = &serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option']); $navlinks = array(); @@ -330,3 +330,15 @@ for ($i = 0; $i < $template_loaded_config['amount']; $i++) { } $serendipity['smarty']->assign_by_ref('navlinks', $navlinks); + +// Allow colorset authors to include license and attribution data +$colorset_data = array(); // Maybe we'll want more data later... +$colorset_data['attribution'] = $template_loaded_config['colorset'] . ' colorset provided under BSD license.'; +$attribution_file = dirname(__FILE__) . '/' . $template_loaded_config['colorset'] . '_license.txt'; +if (is_readable($attribution_file)) { + $attribution = file_get_contents($attribution_file); + if (!empty($attribution)) { + $colorset_data['attribution'] = $attribution; + } +} +$template_loaded_config['colorset_data'] = $colorset_data; diff --git a/templates/bulletproof/index.tpl b/templates/bulletproof/index.tpl index fc49b59..4c70c2c 100644 --- a/templates/bulletproof/index.tpl +++ b/templates/bulletproof/index.tpl @@ -396,7 +396,8 @@ -
{$CONST.POWERED_BY} s9y – Template by Bulletproof development team.
+
{$CONST.POWERED_BY} s9y – Template by Bulletproof development team.
{$template_option.colorset_data.attribution}
+ {if $template_option.counter_code_toggle == 'true'}
{$template_option.counter_code}
{/if} @@ -421,4 +422,4 @@ {if $is_embedded != true} -{/if} \ No newline at end of file +{/if}