]> git.mxchange.org Git - friendica.git/blob - view/theme/quattro/config.php
quattro: icons for "Mark all sys notifs read" and "See all notifs" as icons in a...
[friendica.git] / view / theme / quattro / 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         $align = get_pconfig(local_user(), 'quattro', 'align' );
13         $color = get_pconfig(local_user(), 'quattro', 'color' );
14         $colors = array(
15                 "dark"=>"Quattro", 
16                 "green"=>"Green"
17         );
18         
19         $t = file_get_contents( dirname(__file__). "/theme_settings.tpl" );
20         $o .= replace_macros($t, array(
21                 '$submit' => t('Submit'),
22                 '$baseurl' => $a->get_baseurl(),
23                 '$title' => t("Theme settings"),
24                 '$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))),
25                 '$color' => array('quattro_color', t('Color scheme'), $color, '', $colors),
26         ));
27         return $o;
28 }
29
30 function theme_post(&$a){
31         if(! local_user())
32                 return;
33         
34         if (isset($_POST['quattro-settings-submit'])){
35                 set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
36                 set_pconfig(local_user(), 'quattro', 'color', $_POST['quattro_color']);
37         }
38 }
39