From a4ecf74a5d0559bfd71ce31b48eea36ba13efaeb Mon Sep 17 00:00:00 2001 From: Michael Vogel <icarus@dabo.de> Date: Sun, 23 Feb 2014 15:57:27 +0100 Subject: [PATCH] Vier: Added config.php --- view/theme/vier/config.php | 52 ++++++++++++++++++++++++++++++++++++++ view/theme/vier/flat.css | 4 +++ 2 files changed, 56 insertions(+) create mode 100644 view/theme/vier/config.php create mode 100644 view/theme/vier/flat.css diff --git a/view/theme/vier/config.php b/view/theme/vier/config.php new file mode 100644 index 0000000000..653d2c80df --- /dev/null +++ b/view/theme/vier/config.php @@ -0,0 +1,52 @@ +<?php +/** + * Theme settings + */ + + + +function theme_content(&$a){ + if(!local_user()) + return; + + $style = get_pconfig(local_user(), 'vier', 'style'); + + return vier_form($a,$style); +} + +function theme_post(&$a){ + if(! local_user()) + return; + + if (isset($_POST['vier-settings-submit'])){ + set_pconfig(local_user(), 'vier', 'style', $_POST['vier_style']); + } +} + + +function theme_admin(&$a){ + $style = get_config('vier', 'style'); + return vier_form($a,$style); +} + +function theme_admin_post(&$a){ + if (isset($_POST['vier-settings-submit'])){ + set_config('vier', 'style', $_POST['vier_style']); + } +} + + +function vier_form(&$a, $style){ + $styles = array( + "shadow"=>"Shadow", + "flat"=>"Flat" + ); + $t = get_markup_template("theme_settings.tpl" ); + $o .= replace_macros($t, array( + '$submit' => t('Submit'), + '$baseurl' => $a->get_baseurl(), + '$title' => t("Theme settings"), + '$style' => array('vier_style',t ('Set style'),$style,'',$styles), + )); + return $o; +} diff --git a/view/theme/vier/flat.css b/view/theme/vier/flat.css new file mode 100644 index 0000000000..4faa8a3940 --- /dev/null +++ b/view/theme/vier/flat.css @@ -0,0 +1,4 @@ +*{ box-shadow: 0 0 0 0 !important;} +body, section { background-color: #ffffff !important;} +#profile-jot-form { background-color: #ffffff !important;} +.dspr, .twit, .pump, .dfrn { background-color: #ffffff !important;} -- 2.39.5