7 use Friendica\Core\Config;
8 use Friendica\Core\L10n;
9 use Friendica\Core\Renderer;
12 function theme_content(App $a)
18 $colorset = DI::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 DI::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 = DI::pConfig()->get(local_user(), 'duepuntozero', 'colorset');
66 $color = Config::get('duepuntozero', 'colorset');
69 $t = Renderer::getMarkupTemplate("theme_settings.tpl");
70 $o = Renderer::replaceMacros($t, [
71 '$submit' => L10n::t('Submit'),
72 '$title' => L10n::t("Theme settings"),
73 '$colorset' => ['duepuntozero_colorset', L10n::t('Variations'), $color, '', $colorset],