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' );
15 $theme_width= get_pconfig(local_user(), 'cleanzero', 'theme_width' );
17 return cleanzero_form($a,$color,$font_size,$resize,$theme_width);
20 function theme_post(&$a){
24 if (isset($_POST['cleanzero-settings-submit'])){
25 set_pconfig(local_user(), 'cleanzero', 'resize', $_POST['cleanzero_resize']);
26 set_pconfig(local_user(), 'cleanzero', 'color', $_POST['cleanzero_color']);
27 set_pconfig(local_user(), 'cleanzero', 'font_size', $_POST['cleanzero_font_size']);
28 set_pconfig(local_user(), 'cleanzero', 'theme_width', $_POST['cleanzero_theme_width']);
33 function theme_admin(&$a){
34 $resize = get_config('cleanzero', 'resize' );
35 $color = get_config('cleanzero', 'color' );
36 $font_size = get_config('cleanzero', 'font_size' );
37 $theme_width= get_config('cleanzero', 'theme_width' );
38 return cleanzero_form($a,$color,$font_size,$resize,$theme_width);
41 function theme_admin_post(&$a){
42 if (isset($_POST['cleanzero-settings-submit'])){
43 set_config('cleanzero', 'resize', $_POST['cleanzero_resize']);
44 set_config('cleanzero', 'color', $_POST['cleanzero_color']);
45 set_config('cleanzero', 'font_size', $_POST['cleanzero_font_size']);
46 set_config('cleanzero', 'theme_width', $_POST['cleanzero_theme_width']);
52 function cleanzero_form(&$a, $color,$font_size,$resize,$theme_width){
54 "cleanzero"=>"cleanzero",
55 "cleanzero-green"=>"green",
56 "cleanzero-purple"=>"purple"
66 "0"=>"0 (no resizing)",
72 $theme_widths =array (
73 "standard"=>"standard",
78 $t = get_markup_template("theme_settings.tpl" );
79 $o .= replace_macros($t, array(
80 '$submit' => t('Submit'),
81 '$baseurl' => $a->get_baseurl(),
82 '$title' => t("Theme settings"),
83 '$resize' => array('cleanzero_resize',t ('Set resize level for images in posts and comments (width and height)'),$resize,'',$resizes),
84 '$font_size' => array('cleanzero_font_size', t('Set font-size for posts and comments'), $font_size, '', $font_sizes),
85 '$theme_width' => array('cleanzero_theme_width', t('Set theme width'), $theme_width, '', $theme_widths),
86 '$color' => array('cleanzero_color', t('Color scheme'), $color, '', $colors),