Changeset 503:a4f39cc10d7a for plugins/blowupConfig
- Timestamp:
- 07/04/11 08:52:37 (14 years ago)
- Branch:
- themes
- Parents:
- 502:d002906f0b30 (diff), 501:ead05faef1e4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/blowupConfig/index.php
r500 r503 24 24 'body_bg_c' => null, 25 25 'body_bg_g' => 'light', 26 26 27 27 'body_txt_f' => null, 28 28 'body_txt_s' => null, 29 29 'body_txt_c' => null, 30 30 'body_line_height' => null, 31 31 32 32 'top_image' => 'default', 33 33 'top_height' => null, 34 34 'uploaded' => null, 35 35 36 36 'blog_title_hide' => null, 37 37 'blog_title_f' => null, … … 40 40 'blog_title_a' => null, 41 41 'blog_title_p' => null, 42 42 43 43 'body_link_c' => null, 44 44 'body_link_f_c' => null, 45 45 'body_link_v_c' => null, 46 46 47 47 'sidebar_position' => null, 48 48 'sidebar_text_f' => null, … … 59 59 'sidebar_link_f_c' => null, 60 60 'sidebar_link_v_c' => null, 61 61 62 62 'date_title_f' => null, 63 63 'date_title_s' => null, 64 64 'date_title_c' => null, 65 65 66 66 'post_title_f' => null, 67 67 'post_title_s' => null, … … 71 71 'post_commentmy_bg_c' => null, 72 72 'post_commentmy_c' => null, 73 73 74 74 'prelude_c' => null, 75 75 'footer_f' => null, … … 78 78 'footer_l_c' => null, 79 79 'footer_bg_c' => null, 80 81 'extra_css' => null 80 82 ); 81 83 … … 108 110 $blowup_user['body_txt_c'] = blowupConfig::adjustColor($_POST['body_txt_c']); 109 111 $blowup_user['body_line_height'] = blowupConfig::adjustFontSize($_POST['body_line_height']); 110 112 111 113 $blowup_user['blog_title_hide'] = (integer) !empty($_POST['blog_title_hide']); 112 114 $update_blog_title = !$blowup_user['blog_title_hide'] && ( … … 115 117 !empty($_POST['blog_title_p']) 116 118 ); 117 119 118 120 if ($update_blog_title) 119 121 { … … 124 126 $blowup_user['blog_title_p'] = blowupConfig::adjustPosition($_POST['blog_title_p']); 125 127 } 126 128 127 129 $blowup_user['body_link_c'] = blowupConfig::adjustColor($_POST['body_link_c']); 128 130 $blowup_user['body_link_f_c'] = blowupConfig::adjustColor($_POST['body_link_f_c']); 129 131 $blowup_user['body_link_v_c'] = blowupConfig::adjustColor($_POST['body_link_v_c']); 130 132 131 133 $blowup_user['sidebar_text_f'] = $_POST['sidebar_text_f']; 132 134 $blowup_user['sidebar_text_s'] = blowupConfig::adjustFontSize($_POST['sidebar_text_s']); … … 142 144 $blowup_user['sidebar_link_f_c'] = blowupConfig::adjustColor($_POST['sidebar_link_f_c']); 143 145 $blowup_user['sidebar_link_v_c'] = blowupConfig::adjustColor($_POST['sidebar_link_v_c']); 144 146 145 147 $blowup_user['sidebar_position'] = ($_POST['sidebar_position'] == 'left') ? 'left' : null; 146 148 147 149 $blowup_user['date_title_f'] = $_POST['date_title_f']; 148 150 $blowup_user['date_title_s'] = blowupConfig::adjustFontSize($_POST['date_title_s']); 149 151 $blowup_user['date_title_c'] = blowupConfig::adjustColor($_POST['date_title_c']); 150 152 151 153 $blowup_user['post_title_f'] = $_POST['post_title_f']; 152 154 $blowup_user['post_title_s'] = blowupConfig::adjustFontSize($_POST['post_title_s']); … … 154 156 $blowup_user['post_comment_c'] = blowupConfig::adjustColor($_POST['post_comment_c']); 155 157 $blowup_user['post_commentmy_c'] = blowupConfig::adjustColor($_POST['post_commentmy_c']); 156 157 158 159 158 160 $blowup_user['footer_f'] = $_POST['footer_f']; 159 161 $blowup_user['footer_s'] = blowupConfig::adjustFontSize($_POST['footer_s']); … … 161 163 $blowup_user['footer_l_c'] = blowupConfig::adjustColor($_POST['footer_l_c']); 162 164 $blowup_user['footer_bg_c'] = blowupConfig::adjustColor($_POST['footer_bg_c']); 163 165 166 167 $blowup_user['extra_css'] = blowupConfig::cleanCSS($_POST['extra_css']); 168 164 169 if ($can_write_images) 165 170 { … … 168 173 $uploaded = blowupConfig::imagesPath().'/'.$blowup_user['uploaded']; 169 174 } 170 175 171 176 if (!empty($_FILES['upfile']) && !empty($_FILES['upfile']['name'])) { 172 177 files::uploadStatus($_FILES['upfile']); … … 174 179 $blowup_user['uploaded'] = basename($uploaded); 175 180 } 176 181 177 182 $blowup_user['top_image'] = in_array($_POST['top_image'],$top_images) ? $_POST['top_image'] : 'default'; 178 183 179 184 $blowup_user['body_bg_c'] = blowupConfig::adjustColor($_POST['body_bg_c']); 180 185 $blowup_user['body_bg_g'] = in_array($_POST['body_bg_g'],$gradient_types) ? $_POST['body_bg_g'] : ''; … … 184 189 blowupConfig::createImages($blowup_user,$uploaded); 185 190 } 186 191 187 192 $core->blog->settings->addNamespace('themes'); 188 193 $core->blog->settings->themes->put('blowup_style',serialize($blowup_user)); 189 194 $core->blog->triggerBlog(); 190 195 191 196 http::redirect($p_url.'&upd=1'); 192 197 } … … 233 238 234 239 echo '<form id="theme_config" action="'.$p_url.'" method="post" enctype="multipart/form-data">'; 235 240 236 241 echo '<fieldset><legend>'.__('General').'</legend>'; 237 242 … … 240 245 '<p class="field"><label for="body_bg_c">'.__('Background color:').' '. 241 246 form::field('body_bg_c',7,7,$blowup_user['body_bg_c'],'colorpicker').'</label></p>'. 242 247 243 248 '<p class="field"><label for="body_bg_g">'.__('Background color fill:').' '. 244 249 form::combo('body_bg_g',$gradient_types,$blowup_user['body_bg_g']).'</label></p>'; … … 304 309 $preview_image = 'index.php?pf=blowupConfig/alpha-img/page-t/'.$blowup_user['top_image'].'.png'; 305 310 } 306 311 307 312 echo 308 313 '<fieldset><legend>'.__('Top image').'</legend>'. … … 310 315 form::combo('top_image',$top_images,($blowup_user['top_image'] ? $blowup_user['top_image'] : 'default')).'</label></p>'. 311 316 '<p>'.__('Choose "Custom..." to upload your own image.').'</p>'. 312 317 313 318 '<p id="uploader"><label for="upfile">'.__('Add your image:'). 314 319 ' ('.sprintf(__('JPEG or PNG file, 800 pixels wide, maximum size %s'),files::size(DC_MAX_UPLOAD_SIZE)).')'. 315 320 '<input type="file" name="upfile" id="upfile" size="35" />'. 316 321 '</label></p>'. 317 322 318 323 '<h3>'.__('Preview').'</h3>'. 319 324 '<div class="grid" style="width:800px;border:1px solid #ccc;">'. … … 425 430 '</fieldset>'; 426 431 432 echo 433 '<fieldset><legend>'.__('Additional CSS').'</legend>'. 434 '<p>'.form::textarea('extra_css',72,5,html::escapeHTML($blowup_user['extra_css']),'maximal','',false,'title="'.__('Additional CSS').'"').'</p>'. 435 '</fieldset>'; 436 437 438 427 439 // Import / Export configuration 428 440 $tmp_array = array(); -
plugins/blowupConfig/index.php
r295 r503 223 223 echo 224 224 '<h2>'.html::escapeHTML($core->blog->name). 225 ' › <a href="blog_theme.php">'.__('Blog appearance').'</a> › '.__('Blowup configuration').'</h2>'.225 ' › <a href="blog_theme.php">'.__('Blog appearance').'</a> › <span class="page-title">'.__('Blowup configuration').'</span></h2>'. 226 226 '<p><a class="back" href="blog_theme.php">'.__('back').'</a></p>'; 227 227
Note: See TracChangeset
for help on using the changeset viewer.