]> git.mjollnir.org Git - s9y.git/commitdiff
Allow colorset attributions
authorslothman <slothman>
Thu, 28 Feb 2008 17:25:22 +0000 (17:25 +0000)
committerslothman <slothman>
Thu, 28 Feb 2008 17:25:22 +0000 (17:25 +0000)
templates/bulletproof/config.inc.php
templates/bulletproof/index.tpl

index 07a97329f351edb6e2529ad0abd36245b6c819e0..6eaa47d92604b103124e64d540f9ad8cb7319e24 100644 (file)
@@ -306,7 +306,7 @@ $template_config = array(
     )\r
 );\r
 \r
-$template_loaded_config = serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option']);\r
+$template_loaded_config = &serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option']);\r
 \r
 $navlinks = array();\r
 \r
@@ -330,3 +330,15 @@ for ($i = 0; $i < $template_loaded_config['amount']; $i++) {
 }\r
 \r
 $serendipity['smarty']->assign_by_ref('navlinks', $navlinks);\r
+\r
+// Allow colorset authors to include license and attribution data\r
+$colorset_data = array();  // Maybe we'll want more data later...\r
+$colorset_data['attribution'] = $template_loaded_config['colorset'] . ' colorset provided under BSD license.';\r
+$attribution_file = dirname(__FILE__) . '/' . $template_loaded_config['colorset'] . '_license.txt';\r
+if (is_readable($attribution_file)) {\r
+       $attribution = file_get_contents($attribution_file);\r
+       if (!empty($attribution)) {\r
+               $colorset_data['attribution'] = $attribution;\r
+       }\r
+}\r
+$template_loaded_config['colorset_data'] = $colorset_data;\r
index fc49b59611ee6d5758cd4d5c1259ef7410152794..4c70c2c5cfcbfdefc9a2ea37cfbe82539896c434 100644 (file)
             <!-- if you create a custom template based on bulletproof.          -->
             <!-- ************************************************************** -->
 
-            <div id="serendipity_credit_line">{$CONST.POWERED_BY} <a href="http://www.s9y.org">s9y</a> &ndash; Template by <a href="http://s9y-bulletproof.com">Bulletproof development team</a>.</div>
+            <div id="serendipity_credit_line">{$CONST.POWERED_BY} <a href="http://www.s9y.org">s9y</a> &ndash; Template by <a href="http://s9y-bulletproof.com">Bulletproof development team</a>.<br />{$template_option.colorset_data.attribution}</div>
+            
             {if $template_option.counter_code_toggle == 'true'}
                 <div class="counter_code">{$template_option.counter_code}</div>
             {/if}
 {if $is_embedded != true}
     </body>
     </html>
-{/if}
\ No newline at end of file
+{/if}