8 function theme_content(&$a){
12 $align = get_pconfig(local_user(), 'quattro', 'align' );
13 $color = get_pconfig(local_user(), 'quattro', 'color' );
15 return quattro_form($a,$align, $color);
18 function theme_post(&$a){
22 if (isset($_POST['quattro-settings-submit'])){
23 set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
24 set_pconfig(local_user(), 'quattro', 'color', $_POST['quattro_color']);
29 function theme_admin(&$a){
30 $align = get_config('quattro', 'align' );
31 $color = get_config('quattro', 'color' );
33 return quattro_form($a,$align, $color);
36 function theme_admin_post(&$a){
37 if (isset($_POST['quattro-settings-submit'])){
38 set_config('quattro', 'align', $_POST['quattro_align']);
39 set_config('quattro', 'color', $_POST['quattro_color']);
44 function quattro_form(&$a, $align, $color){
50 $t = file_get_contents( dirname(__file__). "/theme_settings.tpl" );
51 $o .= replace_macros($t, array(
52 '$submit' => t('Submit'),
53 '$baseurl' => $a->get_baseurl(),
54 '$title' => t("Theme settings"),
55 '$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))),
56 '$color' => array('quattro_color', t('Color scheme'), $color, '', $colors),