aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/quattro/config.php
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2012-04-13 11:21:15 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2012-04-13 11:21:15 +0200
commit7aa3b92f4c4619de76f45f448edfd6e4dcfbceb4 (patch)
treef28c86610cf46b3abc04acd76549129972882f16 /view/theme/quattro/config.php
parent138a0e06b88b0c9163ea0bffff8e3521e6c7ee22 (diff)
downloadvolse-hubzilla-7aa3b92f4c4619de76f45f448edfd6e4dcfbceb4.tar.gz
volse-hubzilla-7aa3b92f4c4619de76f45f448edfd6e4dcfbceb4.tar.bz2
volse-hubzilla-7aa3b92f4c4619de76f45f448edfd6e4dcfbceb4.zip
quattro: add admin theme settigs. darker items background with a bottom border.
Diffstat (limited to 'view/theme/quattro/config.php')
-rw-r--r--view/theme/quattro/config.php42
1 files changed, 31 insertions, 11 deletions
diff --git a/view/theme/quattro/config.php b/view/theme/quattro/config.php
index c9ab3a4a1..c261a78ec 100644
--- a/view/theme/quattro/config.php
+++ b/view/theme/quattro/config.php
@@ -11,6 +11,37 @@ function theme_content(&$a){
$align = get_pconfig(local_user(), 'quattro', 'align' );
$color = get_pconfig(local_user(), 'quattro', 'color' );
+
+ return quattro_form($a,$align, $color);
+}
+
+function theme_post(&$a){
+ if(! local_user())
+ return;
+
+ if (isset($_POST['quattro-settings-submit'])){
+ set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
+ set_pconfig(local_user(), 'quattro', 'color', $_POST['quattro_color']);
+ }
+}
+
+
+function theme_admin(&$a){
+ $align = get_config('quattro', 'align' );
+ $color = get_config('quattro', 'color' );
+
+ return quattro_form($a,$align, $color);
+}
+
+function theme_admin_post(&$a){
+ if (isset($_POST['quattro-settings-submit'])){
+ set_config('quattro', 'align', $_POST['quattro_align']);
+ set_config('quattro', 'color', $_POST['quattro_color']);
+ }
+}
+
+
+function quattro_form(&$a, $align, $color){
$colors = array(
"dark"=>"Quattro",
"green"=>"Green"
@@ -26,14 +57,3 @@ function theme_content(&$a){
));
return $o;
}
-
-function theme_post(&$a){
- if(! local_user())
- return;
-
- if (isset($_POST['quattro-settings-submit'])){
- set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
- set_pconfig(local_user(), 'quattro', 'color', $_POST['quattro_color']);
- }
-}
-