7 use Friendica\Core\Config;
8 use Friendica\Core\L10n;
9 use Friendica\Core\PConfig;
10 use Friendica\Core\Renderer;
11 use Friendica\Core\System;
13 function theme_content(App $a)
19 $colorset = PConfig::get(local_user(), 'duepuntozero', 'colorset');
22 return clean_form($a, $colorset, $user);
25 function theme_post(App $a)
31 if (isset($_POST['duepuntozero-settings-submit'])) {
32 PConfig::set(local_user(), 'duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
36 function theme_admin(App $a)
38 $colorset = Config::get('duepuntozero', 'colorset');
41 return clean_form($a, $colorset, $user);
44 function theme_admin_post(App $a)
46 if (isset($_POST['duepuntozero-settings-submit'])) {
47 Config::set('duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
51 /// @TODO $a is no longer used
52 function clean_form(App $a, &$colorset, $user)
55 'default' => L10n::t('default'),
56 'greenzero' => L10n::t('greenzero'),
57 'purplezero' => L10n::t('purplezero'),
58 'easterbunny' => L10n::t('easterbunny'),
59 'darkzero' => L10n::t('darkzero'),
60 'comix' => L10n::t('comix'),
61 'slackr' => L10n::t('slackr'),
65 $color = PConfig::get(local_user(), 'duepuntozero', 'colorset');
67 $color = Config::get('duepuntozero', 'colorset');
70 $t = Renderer::getMarkupTemplate("theme_settings.tpl");
71 $o = Renderer::replaceMacros($t, [
72 '$submit' => L10n::t('Submit'),
73 '$title' => L10n::t("Theme settings"),
74 '$colorset' => ['duepuntozero_colorset', L10n::t('Variations'), $color, '', $colorset],