9 function theme_content(App $a) {
14 $align = get_pconfig(local_user(), 'quattro', 'align' );
15 $color = get_pconfig(local_user(), 'quattro', 'color' );
16 $tfs = get_pconfig(local_user(),"quattro","tfs");
17 $pfs = get_pconfig(local_user(),"quattro","pfs");
19 return quattro_form($a,$align, $color, $tfs, $pfs);
22 function theme_post(App $a) {
27 if (isset($_POST['quattro-settings-submit'])){
28 set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
29 set_pconfig(local_user(), 'quattro', 'color', $_POST['quattro_color']);
30 set_pconfig(local_user(), 'quattro', 'tfs', $_POST['quattro_tfs']);
31 set_pconfig(local_user(), 'quattro', 'pfs', $_POST['quattro_pfs']);
35 function theme_admin(App $a) {
36 $align = get_config('quattro', 'align' );
37 $color = get_config('quattro', 'color' );
38 $tfs = get_config("quattro","tfs");
39 $pfs = get_config("quattro","pfs");
41 return quattro_form($a,$align, $color, $tfs, $pfs);
44 function theme_admin_post(App $a) {
45 if (isset($_POST['quattro-settings-submit'])){
46 set_config('quattro', 'align', $_POST['quattro_align']);
47 set_config('quattro', 'color', $_POST['quattro_color']);
48 set_config('quattro', 'tfs', $_POST['quattro_tfs']);
49 set_config('quattro', 'pfs', $_POST['quattro_pfs']);
53 /// @TODO $a is no longer used here
54 function quattro_form(App $a, $align, $color, $tfs, $pfs) {
68 $t = get_markup_template("theme_settings.tpl" );
69 $o .= replace_macros($t, array(
70 '$submit' => t('Submit'),
71 '$baseurl' => App::get_baseurl(),
72 '$title' => t("Theme settings"),
73 '$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))),
74 '$color' => array('quattro_color', t('Color scheme'), $color, '', $colors),
75 '$pfs' => array('quattro_pfs', t('Posts font size'), $pfs),
76 '$tfs' => array('quattro_tfs', t('Textareas font size'), $tfs),