7 use Friendica\Core\Config;
8 use Friendica\Core\L10n;
9 use Friendica\Core\PConfig;
10 use Friendica\Core\System;
12 function theme_content(App $a)
18 $colorset = PConfig::get(local_user(), 'duepuntozero', 'colorset');
21 return clean_form($a, $colorset, $user);
24 function theme_post(App $a)
30 if (isset($_POST['duepuntozero-settings-submit'])) {
31 PConfig::set(local_user(), 'duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
35 function theme_admin(App $a)
37 $colorset = Config::get('duepuntozero', 'colorset');
40 return clean_form($a, $colorset, $user);
43 function theme_admin_post(App $a)
45 if (isset($_POST['duepuntozero-settings-submit'])) {
46 Config::set('duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
50 /// @TODO $a is no longer used
51 function clean_form(App $a, &$colorset, $user)
54 'default' => L10n::t('default'),
55 'greenzero' => L10n::t('greenzero'),
56 'purplezero' => L10n::t('purplezero'),
57 'easterbunny' => L10n::t('easterbunny'),
58 'darkzero' => L10n::t('darkzero'),
59 'comix' => L10n::t('comix'),
60 'slackr' => L10n::t('slackr'),
64 $color = PConfig::get(local_user(), 'duepuntozero', 'colorset');
66 $color = Config::get('duepuntozero', 'colorset');
69 $t = get_markup_template("theme_settings.tpl");
70 $o = replace_macros($t, [
71 '$submit' => L10n::t('Submit'),
72 '$baseurl' => System::baseUrl(),
73 '$title' => L10n::t("Theme settings"),
74 '$colorset' => ['duepuntozero_colorset', L10n::t('Variations'), $color, '', $colorset],