7 use Friendica\Core\Renderer;
10 function theme_content(App $a)
16 $colorset = DI::pConfig()->get(local_user(), 'duepuntozero', 'colorset');
19 return clean_form($a, $colorset, $user);
22 function theme_post(App $a)
28 if (isset($_POST['duepuntozero-settings-submit'])) {
29 DI::pConfig()->set(local_user(), 'duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
33 function theme_admin(App $a)
35 $colorset = DI::config()->get('duepuntozero', 'colorset');
38 return clean_form($a, $colorset, $user);
41 function theme_admin_post(App $a)
43 if (isset($_POST['duepuntozero-settings-submit'])) {
44 DI::config()->set('duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
48 /// @TODO $a is no longer used
49 function clean_form(App $a, &$colorset, $user)
52 'default' => DI::l10n()->t('default'),
53 'greenzero' => DI::l10n()->t('greenzero'),
54 'purplezero' => DI::l10n()->t('purplezero'),
55 'easterbunny' => DI::l10n()->t('easterbunny'),
56 'darkzero' => DI::l10n()->t('darkzero'),
57 'comix' => DI::l10n()->t('comix'),
58 'slackr' => DI::l10n()->t('slackr'),
62 $color = DI::pConfig()->get(local_user(), 'duepuntozero', 'colorset');
64 $color = DI::config()->get('duepuntozero', 'colorset');
67 $t = Renderer::getMarkupTemplate("theme_settings.tpl");
68 $o = Renderer::replaceMacros($t, [
69 '$submit' => DI::l10n()->t('Submit'),
70 '$title' => DI::l10n()->t("Theme settings"),
71 '$colorset' => ['duepuntozero_colorset', DI::l10n()->t('Variations'), $color, '', $colorset],