8 function theme_content(&$a){
12 $resize = get_pconfig(local_user(), 'cleanzero', 'resize' );
13 $color = get_pconfig(local_user(), 'cleanzero', 'color' );
14 $font_size = get_pconfig(local_user(), 'cleanzero', 'font_size' );
16 return cleanzero_form($a,$color,$font_size,$resize);
19 function theme_post(&$a){
23 if (isset($_POST['cleanzero-settings-submit'])){
24 set_pconfig(local_user(), 'cleanzero', 'resize', $_POST['cleanzero_resize']);
25 set_pconfig(local_user(), 'cleanzero', 'color', $_POST['cleanzero_color']);
26 set_pconfig(local_user(), 'cleanzero', 'font_size', $_POST['cleanzero_font_size']);
31 function theme_admin(&$a){
32 $resize = get_config('cleanzero', 'resize' );
33 $color = get_config('cleanzero', 'color' );
34 $font_size = get_config('cleanzero', 'font_size' );
36 return cleanzero_form($a,$color,$font_size,$resize);
39 function theme_admin_post(&$a){
40 if (isset($_POST['cleanzero-settings-submit'])){
41 set_config('cleanzero', 'resize', $_POST['cleanzero_resize']);
42 set_config('cleanzero', 'color', $_POST['cleanzero_color']);
43 set_config('cleanzero', 'font_size', $_POST['cleanzero_font_size']);
48 function cleanzero_form(&$a, $color,$font_size,$resize){
50 "cleanzero"=>"cleanzero",
51 "cleanzero-green"=>"green",
52 "cleanzero-purple"=>"purple"
62 "0"=>"0 (no resizing)",
69 $t = file_get_contents( dirname(__file__). "/theme_settings.tpl" );
70 $o .= replace_macros($t, array(
71 '$submit' => t('Submit'),
72 '$baseurl' => $a->get_baseurl(),
73 '$title' => t("Theme settings"),
74 '$resize' => array('cleanzero_resize',t ('Set resize level for images in posts and comments (width and height)'),$resize,'',$resizes),
75 '$font_size' => array('cleanzero_font_size', t('Set font-size for posts and comments'), $font_size, '', $font_sizes),
76 '$color' => array('cleanzero_color', t('Color scheme'), $color, '', $colors),