updating config files for duepuntozero

This commit is contained in:
Tobias Diekershoff 2014-09-07 14:00:09 +02:00
parent c72d850113
commit a9782251e5
2 changed files with 23 additions and 1 deletions

View file

@ -43,6 +43,11 @@ function clean_form(&$a, &$colorset, $user){
$colorset = array( $colorset = array(
'default'=>t('default'), 'default'=>t('default'),
'greenzero'=>t('greenzero'), 'greenzero'=>t('greenzero'),
'purplezero'=>t('purplezero'),
'easterbunny'=>t('easterbunny'),
'darkzero'=>t('darkzero'),
'comix'=>t('comix'),
'slackr'=>t('slackr'),
); );
if ($user) { if ($user) {
$color = get_pconfig(local_user(), 'duepuntozero', 'colorset'); $color = get_pconfig(local_user(), 'duepuntozero', 'colorset');
@ -54,7 +59,7 @@ function clean_form(&$a, &$colorset, $user){
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$baseurl' => $a->get_baseurl(), '$baseurl' => $a->get_baseurl(),
'$title' => t("Theme settings"), '$title' => t("Theme settings"),
'$colorset' => array('duepuntozero_colorset', t('Color scheme'), $color, '', $colorset), '$colorset' => array('duepuntozero_colorset', t('Variations'), $color, '', $colorset),
)); ));
return $o; return $o;
} }

View file

@ -5,6 +5,23 @@ function duepuntozero_init(&$a) {
$a->theme_info = array(); $a->theme_info = array();
set_template_engine($a, 'smarty3'); set_template_engine($a, 'smarty3');
$colorset = get_pconfig( local_user(), 'duepuntozero','colorset');
if (!$colorset)
$colorset = get_config('duepuntozero', 'colorset'); // user setting have priority, then node settings
if ($colorset) {
if ($colorset == 'greenzero')
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/greenzero.css" type="text/css" media="screen" />'."\n";
if ($colorset == 'purplezero')
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/purplezero.css" type="text/css" media="screen" />'."\n";
if ($colorset == 'easterbunny')
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/easterbunny.css" type="text/css" media="screen" />'."\n";
if ($colorset == 'darkzero')
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/darkzero.css" type="text/css" media="screen" />'."\n";
if ($colorset == 'comix')
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/comix.css" type="text/css" media="screen" />'."\n";
if ($colorset == 'slackr')
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/slackr.css" type="text/css" media="screen" />'."\n";
}
$a->page['htmlhead'] .= <<< EOT $a->page['htmlhead'] .= <<< EOT
<script> <script>
function insertFormatting(comment,BBcode,id) { function insertFormatting(comment,BBcode,id) {