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' );
15 return diabook_form($a,$font_size, $line_height);
18 function theme_post(&$a){
22 if (isset($_POST['diabook-blue-settings-submit'])){
23 set_pconfig(local_user(), 'diabook-red', 'font_size', $_POST['diabook-red_font_size']);
24 set_pconfig(local_user(), 'diabook-red', 'line_height', $_POST['diabook-red_line_height']);
29 function theme_admin(&$a){
30 $font_size = get_config('diabook-red', 'font_size' );
31 $line_height = get_config('diabook-red', 'line_height' );
33 return diabook_form($a,$font_size, $line_height);
36 function theme_admin_post(&$a){
37 if (isset($_POST['diabook-red-settings-submit'])){
38 set_config('diabook-red', 'font_size', $_POST['diabook-red_font_size']);
39 set_config('diabook-red', 'line_height', $_POST['diabook-red_line_height']);
44 function diabook_form(&$a, $font_size, $line_height){
45 $line_heights = array(
62 $t = file_get_contents( dirname(__file__). "/theme_settings.tpl" );
63 $o .= replace_macros($t, array(
64 '$submit' => t('Submit'),
65 '$baseurl' => $a->get_baseurl(),
66 '$title' => t("Theme settings"),
67 '$font_size' => array('diabook-red_font_size', t('Set font-size for posts and comments'), $font_size, '', $font_sizes),
68 '$line_height' => array('diabook-red_line_height', t('Set line-height for posts and comments'), $line_height, '', $line_heights),