]> git.mxchange.org Git - friendica.git/blob - view/theme/vier/config.php
"vier": Several design changes. New option for coloured network items.
[friendica.git] / view / theme / vier / config.php
1 <?php
2 /**
3  * Theme settings
4  */
5
6
7
8 function theme_content(&$a){
9         if(!local_user())
10                 return;
11
12         $style = get_pconfig(local_user(), 'vier', 'style');
13
14         return vier_form($a,$style);
15 }
16
17 function theme_post(&$a){
18         if(! local_user())
19                 return;
20
21         if (isset($_POST['vier-settings-submit'])){
22                 set_pconfig(local_user(), 'vier', 'style', $_POST['vier_style']);
23         }
24 }
25
26
27 function theme_admin(&$a){
28         $style = get_config('vier', 'style');
29         return vier_form($a,$style);
30 }
31
32 function theme_admin_post(&$a){
33         if (isset($_POST['vier-settings-submit'])){
34                 set_config('vier', 'style', $_POST['vier_style']);
35         }
36 }
37
38
39 function vier_form(&$a, $style){
40         $styles = array(
41                 "shadow"=>"Shadow",
42                 "flat"=>"Flat",
43                 "netcolour"=>"Coloured Networks"
44         );
45         $t = get_markup_template("theme_settings.tpl" );
46         $o .= replace_macros($t, array(
47                 '$submit' => t('Submit'),
48                 '$baseurl' => $a->get_baseurl(),
49                 '$title' => t("Theme settings"),
50                 '$style' => array('vier_style',t ('Set style'),$style,'',$styles),
51         ));
52         return $o;
53 }