8 use Friendica\Core\System;
10 function theme_content(App $a) {
15 $colorset = get_pconfig( local_user(), 'duepuntozero', 'colorset');
18 return clean_form($a, $colorset, $user);
21 function theme_post(App $a) {
26 if (isset($_POST['duepuntozero-settings-submit'])){
27 set_pconfig(local_user(), 'duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
31 function theme_admin(App $a) {
32 $colorset = get_config( 'duepuntozero', 'colorset');
35 return clean_form($a, $colorset, $user);
38 function theme_admin_post(App $a) {
39 if (isset($_POST['duepuntozero-settings-submit'])){
40 set_config('duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
44 /// @TODO $a is no longer used
45 function clean_form(App $a, &$colorset, $user) {
47 'default' =>t('default'),
48 'greenzero' =>t('greenzero'),
49 'purplezero' =>t('purplezero'),
50 'easterbunny' =>t('easterbunny'),
51 'darkzero' =>t('darkzero'),
53 'slackr' =>t('slackr'),
57 $color = get_pconfig(local_user(), 'duepuntozero', 'colorset');
59 $color = get_config( 'duepuntozero', 'colorset');
62 $t = get_markup_template("theme_settings.tpl" );
63 /// @TODO No need for adding string here, $o is not defined
64 $o .= replace_macros($t, array(
65 '$submit' => t('Submit'),
66 '$baseurl' => App::get_baseurl(),
67 '$title' => t("Theme settings"),
68 '$colorset' => array('duepuntozero_colorset', t('Variations'), $color, '', $colorset),