7 use Friendica\Core\Config;
8 use Friendica\Core\Renderer;
11 function theme_content(App $a)
17 $colorset = DI::pConfig()->get(local_user(), 'duepuntozero', 'colorset');
20 return clean_form($a, $colorset, $user);
23 function theme_post(App $a)
29 if (isset($_POST['duepuntozero-settings-submit'])) {
30 DI::pConfig()->set(local_user(), 'duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
34 function theme_admin(App $a)
36 $colorset = DI::config()->get('duepuntozero', 'colorset');
39 return clean_form($a, $colorset, $user);
42 function theme_admin_post(App $a)
44 if (isset($_POST['duepuntozero-settings-submit'])) {
45 DI::config()->set('duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
49 /// @TODO $a is no longer used
50 function clean_form(App $a, &$colorset, $user)
53 'default' => DI::l10n()->t('default'),
54 'greenzero' => DI::l10n()->t('greenzero'),
55 'purplezero' => DI::l10n()->t('purplezero'),
56 'easterbunny' => DI::l10n()->t('easterbunny'),
57 'darkzero' => DI::l10n()->t('darkzero'),
58 'comix' => DI::l10n()->t('comix'),
59 'slackr' => DI::l10n()->t('slackr'),
63 $color = DI::pConfig()->get(local_user(), 'duepuntozero', 'colorset');
65 $color = DI::config()->get('duepuntozero', 'colorset');
68 $t = Renderer::getMarkupTemplate("theme_settings.tpl");
69 $o = Renderer::replaceMacros($t, [
70 '$submit' => DI::l10n()->t('Submit'),
71 '$title' => DI::l10n()->t("Theme settings"),
72 '$colorset' => ['duepuntozero_colorset', DI::l10n()->t('Variations'), $color, '', $colorset],