8 function theme_content(&$a){
12 $colorset = get_pconfig( local_user(), 'duepuntozero', 'colorset');
15 return clean_form($a, $colorset, $user);
18 function theme_post(&$a){
22 if (isset($_POST['duepuntozero-settings-submit'])){
23 set_pconfig(local_user(), 'duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
28 function theme_admin(&$a){
29 $colorset = get_config( 'duepuntozero', 'colorset');
32 return clean_form($a, $colorset, $user);
35 function theme_admin_post(&$a){
36 if (isset($_POST['duepuntozero-settings-submit'])){
37 set_config('duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
42 function clean_form(&$a, &$colorset, $user){
44 'default'=>t('default'),
45 'greenzero'=>t('greenzero'),
46 'purplezero'=>t('purplezero'),
47 'easterbunny'=>t('easterbunny'),
48 'darkzero'=>t('darkzero'),
50 'slackr'=>t('slackr'),
53 $color = get_pconfig(local_user(), 'duepuntozero', 'colorset');
55 $color = get_config( 'duepuntozero', 'colorset');
57 $t = get_markup_template("theme_settings.tpl" );
58 $o .= replace_macros($t, array(
59 '$submit' => t('Submit'),
60 '$baseurl' => $a->get_baseurl(),
61 '$title' => t("Theme settings"),
62 '$colorset' => array('duepuntozero_colorset', t('Variations'), $color, '', $colorset),