8 use Friendica\Core\Config;
9 use Friendica\Core\PConfig;
10 use Friendica\Core\System;
12 function theme_content(App $a) {
17 $colorset = PConfig::get( local_user(), 'duepuntozero', 'colorset');
20 return clean_form($a, $colorset, $user);
23 function theme_post(App $a) {
28 if (isset($_POST['duepuntozero-settings-submit'])){
29 PConfig::set(local_user(), 'duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
33 function theme_admin(App $a) {
34 $colorset = Config::get( 'duepuntozero', 'colorset');
37 return clean_form($a, $colorset, $user);
40 function theme_admin_post(App $a) {
41 if (isset($_POST['duepuntozero-settings-submit'])){
42 Config::set('duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
46 /// @TODO $a is no longer used
47 function clean_form(App $a, &$colorset, $user) {
49 'default' =>t('default'),
50 'greenzero' =>t('greenzero'),
51 'purplezero' =>t('purplezero'),
52 'easterbunny' =>t('easterbunny'),
53 'darkzero' =>t('darkzero'),
55 'slackr' =>t('slackr'),
59 $color = PConfig::get(local_user(), 'duepuntozero', 'colorset');
61 $color = Config::get( 'duepuntozero', 'colorset');
64 $t = get_markup_template("theme_settings.tpl" );
65 /// @TODO No need for adding string here, $o is not defined
66 $o .= replace_macros($t, array(
67 '$submit' => t('Submit'),
68 '$baseurl' => System::baseUrl(),
69 '$title' => t("Theme settings"),
70 '$colorset' => array('duepuntozero_colorset', t('Variations'), $color, '', $colorset),