8 function theme_content(&$a){
12 $font_size = get_pconfig(local_user(), 'diabook-red', 'font_size' );
13 $line_height = get_pconfig(local_user(), 'diabook-red', 'line_height' );
14 $resolution = get_pconfig(local_user(), 'diabook-red', 'resolution' );
16 return diabook_form($a,$font_size, $line_height,$resolution);
19 function theme_post(&$a){
23 if (isset($_POST['diabook-blue-settings-submit'])){
24 set_pconfig(local_user(), 'diabook-red', 'font_size', $_POST['diabook-red_font_size']);
25 set_pconfig(local_user(), 'diabook-red', 'line_height', $_POST['diabook-red_line_height']);
26 set_pconfig(local_user(), 'diabook-red', 'resolution', $_POST['diabook-red_resolution']);
31 function theme_admin(&$a){
32 $font_size = get_config('diabook-red', 'font_size' );
33 $line_height = get_config('diabook-red', 'line_height' );
34 $resolution = get_config('diabook-red', 'resolution' );
36 return diabook_form($a,$font_size, $line_height,$resolution);
39 function theme_admin_post(&$a){
40 if (isset($_POST['diabook-red-settings-submit'])){
41 set_config('diabook-red', 'font_size', $_POST['diabook-red_font_size']);
42 set_config('diabook-red', 'line_height', $_POST['diabook-red_line_height']);
43 set_config('diabook-red', 'resolution', $_POST['diabook-red_resolution']);
48 function diabook_form(&$a, $font_size, $line_height, $resolution){
49 $line_heights = array(
74 $t = file_get_contents( dirname(__file__). "/theme_settings.tpl" );
75 $o .= replace_macros($t, array(
76 '$submit' => t('Submit'),
77 '$baseurl' => $a->get_baseurl(),
78 '$title' => t("Theme settings"),
79 '$font_size' => array('diabook-red_font_size', t('Set font-size for posts and comments'), $font_size, '', $font_sizes),
80 '$line_height' => array('diabook-red_line_height', t('Set line-height for posts and comments'), $line_height, '', $line_heights),
81 '$resolution' => array('diabook-red_resolution', t('Set resolution for middle column'), $resolution, '', $resolutions),