[0] | 1 | <?php |
---|
| 2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
---|
| 3 | # |
---|
| 4 | # This file is part of Dotclear 2. |
---|
| 5 | # |
---|
[270] | 6 | # Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear |
---|
[0] | 7 | # Licensed under the GPL version 2.0 license. |
---|
| 8 | # See LICENSE file or |
---|
| 9 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
| 10 | # |
---|
| 11 | # -- END LICENSE BLOCK ----------------------------------------- |
---|
| 12 | if (!defined('DC_CONTEXT_ADMIN')) { return; } |
---|
| 13 | |
---|
| 14 | require dirname(__FILE__).'/lib/class.blowup.config.php'; |
---|
| 15 | |
---|
| 16 | $can_write_images = blowupConfig::canWriteImages(); |
---|
| 17 | |
---|
| 18 | if ($core->error->flag()) { |
---|
| 19 | $notices = $core->error->toHTML(); |
---|
| 20 | $core->error->reset(); |
---|
| 21 | } |
---|
| 22 | |
---|
| 23 | $blowup_base = array( |
---|
| 24 | 'body_bg_c' => null, |
---|
| 25 | 'body_bg_g' => 'light', |
---|
[295] | 26 | |
---|
[0] | 27 | 'body_txt_f' => null, |
---|
| 28 | 'body_txt_s' => null, |
---|
| 29 | 'body_txt_c' => null, |
---|
| 30 | 'body_line_height' => null, |
---|
[295] | 31 | |
---|
[0] | 32 | 'top_image' => 'default', |
---|
| 33 | 'top_height' => null, |
---|
| 34 | 'uploaded' => null, |
---|
[295] | 35 | |
---|
[0] | 36 | 'blog_title_hide' => null, |
---|
| 37 | 'blog_title_f' => null, |
---|
| 38 | 'blog_title_s' => null, |
---|
| 39 | 'blog_title_c' => null, |
---|
| 40 | 'blog_title_a' => null, |
---|
| 41 | 'blog_title_p' => null, |
---|
[295] | 42 | |
---|
[0] | 43 | 'body_link_c' => null, |
---|
| 44 | 'body_link_f_c' => null, |
---|
| 45 | 'body_link_v_c' => null, |
---|
[295] | 46 | |
---|
[0] | 47 | 'sidebar_position' => null, |
---|
| 48 | 'sidebar_text_f' => null, |
---|
| 49 | 'sidebar_text_s' => null, |
---|
| 50 | 'sidebar_text_c' => null, |
---|
| 51 | 'sidebar_title_f' => null, |
---|
| 52 | 'sidebar_title_s' => null, |
---|
| 53 | 'sidebar_title_c' => null, |
---|
| 54 | 'sidebar_title2_f' => null, |
---|
| 55 | 'sidebar_title2_s' => null, |
---|
| 56 | 'sidebar_title2_c' => null, |
---|
| 57 | 'sidebar_line_c' => null, |
---|
| 58 | 'sidebar_link_c' => null, |
---|
| 59 | 'sidebar_link_f_c' => null, |
---|
| 60 | 'sidebar_link_v_c' => null, |
---|
[295] | 61 | |
---|
[0] | 62 | 'date_title_f' => null, |
---|
| 63 | 'date_title_s' => null, |
---|
| 64 | 'date_title_c' => null, |
---|
[295] | 65 | |
---|
[0] | 66 | 'post_title_f' => null, |
---|
| 67 | 'post_title_s' => null, |
---|
| 68 | 'post_title_c' => null, |
---|
| 69 | 'post_comment_bg_c' => null, |
---|
| 70 | 'post_comment_c' => null, |
---|
| 71 | 'post_commentmy_bg_c' => null, |
---|
| 72 | 'post_commentmy_c' => null, |
---|
[295] | 73 | |
---|
[0] | 74 | 'prelude_c' => null, |
---|
| 75 | 'footer_f' => null, |
---|
| 76 | 'footer_s' => null, |
---|
| 77 | 'footer_c' => null, |
---|
| 78 | 'footer_l_c' => null, |
---|
| 79 | 'footer_bg_c' => null, |
---|
[295] | 80 | |
---|
| 81 | 'extra_css' => null |
---|
[0] | 82 | ); |
---|
| 83 | |
---|
| 84 | $blowup_user = $core->blog->settings->themes->blowup_style; |
---|
| 85 | |
---|
| 86 | $blowup_user = @unserialize($blowup_user); |
---|
| 87 | if (!is_array($blowup_user)) { |
---|
| 88 | $blowup_user = array(); |
---|
| 89 | } |
---|
| 90 | |
---|
| 91 | $blowup_user = array_merge($blowup_base,$blowup_user); |
---|
| 92 | |
---|
| 93 | $gradient_types = array( |
---|
| 94 | __('Light linear gradient') => 'light', |
---|
| 95 | __('Medium linear gradient') => 'medium', |
---|
| 96 | __('Dark linear gradient') => 'dark', |
---|
| 97 | __('Solid color') => 'solid' |
---|
| 98 | ); |
---|
| 99 | |
---|
| 100 | $top_images = array(__('Custom...') => 'custom'); |
---|
| 101 | $top_images = array_merge($top_images,array_flip(blowupConfig::$top_images)); |
---|
| 102 | |
---|
| 103 | |
---|
| 104 | if (!empty($_POST)) |
---|
| 105 | { |
---|
| 106 | try |
---|
| 107 | { |
---|
| 108 | $blowup_user['body_txt_f'] = $_POST['body_txt_f']; |
---|
| 109 | $blowup_user['body_txt_s'] = blowupConfig::adjustFontSize($_POST['body_txt_s']); |
---|
| 110 | $blowup_user['body_txt_c'] = blowupConfig::adjustColor($_POST['body_txt_c']); |
---|
| 111 | $blowup_user['body_line_height'] = blowupConfig::adjustFontSize($_POST['body_line_height']); |
---|
[295] | 112 | |
---|
[0] | 113 | $blowup_user['blog_title_hide'] = (integer) !empty($_POST['blog_title_hide']); |
---|
| 114 | $update_blog_title = !$blowup_user['blog_title_hide'] && ( |
---|
| 115 | !empty($_POST['blog_title_f']) || !empty($_POST['blog_title_s']) || |
---|
| 116 | !empty($_POST['blog_title_c']) || !empty($_POST['blog_title_a']) || |
---|
| 117 | !empty($_POST['blog_title_p']) |
---|
| 118 | ); |
---|
[295] | 119 | |
---|
[0] | 120 | if ($update_blog_title) |
---|
| 121 | { |
---|
| 122 | $blowup_user['blog_title_f'] = $_POST['blog_title_f']; |
---|
| 123 | $blowup_user['blog_title_s'] = blowupConfig::adjustFontSize($_POST['blog_title_s']); |
---|
| 124 | $blowup_user['blog_title_c'] = blowupConfig::adjustColor($_POST['blog_title_c']); |
---|
| 125 | $blowup_user['blog_title_a'] = preg_match('/^(left|center|right)$/',$_POST['blog_title_a']) ? $_POST['blog_title_a'] : null; |
---|
| 126 | $blowup_user['blog_title_p'] = blowupConfig::adjustPosition($_POST['blog_title_p']); |
---|
| 127 | } |
---|
[295] | 128 | |
---|
[0] | 129 | $blowup_user['body_link_c'] = blowupConfig::adjustColor($_POST['body_link_c']); |
---|
| 130 | $blowup_user['body_link_f_c'] = blowupConfig::adjustColor($_POST['body_link_f_c']); |
---|
| 131 | $blowup_user['body_link_v_c'] = blowupConfig::adjustColor($_POST['body_link_v_c']); |
---|
[295] | 132 | |
---|
[0] | 133 | $blowup_user['sidebar_text_f'] = $_POST['sidebar_text_f']; |
---|
| 134 | $blowup_user['sidebar_text_s'] = blowupConfig::adjustFontSize($_POST['sidebar_text_s']); |
---|
| 135 | $blowup_user['sidebar_text_c'] = blowupConfig::adjustColor($_POST['sidebar_text_c']); |
---|
| 136 | $blowup_user['sidebar_title_f'] = $_POST['sidebar_title_f']; |
---|
| 137 | $blowup_user['sidebar_title_s'] = blowupConfig::adjustFontSize($_POST['sidebar_title_s']); |
---|
| 138 | $blowup_user['sidebar_title_c'] = blowupConfig::adjustColor($_POST['sidebar_title_c']); |
---|
| 139 | $blowup_user['sidebar_title2_f'] = $_POST['sidebar_title2_f']; |
---|
| 140 | $blowup_user['sidebar_title2_s'] = blowupConfig::adjustFontSize($_POST['sidebar_title2_s']); |
---|
| 141 | $blowup_user['sidebar_title2_c'] = blowupConfig::adjustColor($_POST['sidebar_title2_c']); |
---|
| 142 | $blowup_user['sidebar_line_c'] = blowupConfig::adjustColor($_POST['sidebar_line_c']); |
---|
| 143 | $blowup_user['sidebar_link_c'] = blowupConfig::adjustColor($_POST['sidebar_link_c']); |
---|
| 144 | $blowup_user['sidebar_link_f_c'] = blowupConfig::adjustColor($_POST['sidebar_link_f_c']); |
---|
| 145 | $blowup_user['sidebar_link_v_c'] = blowupConfig::adjustColor($_POST['sidebar_link_v_c']); |
---|
[295] | 146 | |
---|
[0] | 147 | $blowup_user['sidebar_position'] = ($_POST['sidebar_position'] == 'left') ? 'left' : null; |
---|
[295] | 148 | |
---|
[0] | 149 | $blowup_user['date_title_f'] = $_POST['date_title_f']; |
---|
| 150 | $blowup_user['date_title_s'] = blowupConfig::adjustFontSize($_POST['date_title_s']); |
---|
| 151 | $blowup_user['date_title_c'] = blowupConfig::adjustColor($_POST['date_title_c']); |
---|
[295] | 152 | |
---|
[0] | 153 | $blowup_user['post_title_f'] = $_POST['post_title_f']; |
---|
| 154 | $blowup_user['post_title_s'] = blowupConfig::adjustFontSize($_POST['post_title_s']); |
---|
| 155 | $blowup_user['post_title_c'] = blowupConfig::adjustColor($_POST['post_title_c']); |
---|
| 156 | $blowup_user['post_comment_c'] = blowupConfig::adjustColor($_POST['post_comment_c']); |
---|
| 157 | $blowup_user['post_commentmy_c'] = blowupConfig::adjustColor($_POST['post_commentmy_c']); |
---|
[295] | 158 | |
---|
| 159 | |
---|
[0] | 160 | $blowup_user['footer_f'] = $_POST['footer_f']; |
---|
| 161 | $blowup_user['footer_s'] = blowupConfig::adjustFontSize($_POST['footer_s']); |
---|
| 162 | $blowup_user['footer_c'] = blowupConfig::adjustColor($_POST['footer_c']); |
---|
| 163 | $blowup_user['footer_l_c'] = blowupConfig::adjustColor($_POST['footer_l_c']); |
---|
| 164 | $blowup_user['footer_bg_c'] = blowupConfig::adjustColor($_POST['footer_bg_c']); |
---|
[295] | 165 | |
---|
| 166 | |
---|
| 167 | $blowup_user['extra_css'] = blowupConfig::cleanCSS($_POST['extra_css']); |
---|
| 168 | |
---|
[0] | 169 | if ($can_write_images) |
---|
| 170 | { |
---|
| 171 | $uploaded = null; |
---|
| 172 | if ($blowup_user['uploaded'] && is_file(blowupConfig::imagesPath().'/'.$blowup_user['uploaded'])) { |
---|
| 173 | $uploaded = blowupConfig::imagesPath().'/'.$blowup_user['uploaded']; |
---|
| 174 | } |
---|
[295] | 175 | |
---|
[0] | 176 | if (!empty($_FILES['upfile']) && !empty($_FILES['upfile']['name'])) { |
---|
| 177 | files::uploadStatus($_FILES['upfile']); |
---|
| 178 | $uploaded = blowupConfig::uploadImage($_FILES['upfile']); |
---|
| 179 | $blowup_user['uploaded'] = basename($uploaded); |
---|
| 180 | } |
---|
[295] | 181 | |
---|
[0] | 182 | $blowup_user['top_image'] = in_array($_POST['top_image'],$top_images) ? $_POST['top_image'] : 'default'; |
---|
[295] | 183 | |
---|
[0] | 184 | $blowup_user['body_bg_c'] = blowupConfig::adjustColor($_POST['body_bg_c']); |
---|
| 185 | $blowup_user['body_bg_g'] = in_array($_POST['body_bg_g'],$gradient_types) ? $_POST['body_bg_g'] : ''; |
---|
| 186 | $blowup_user['post_comment_bg_c'] = blowupConfig::adjustColor($_POST['post_comment_bg_c']); |
---|
| 187 | $blowup_user['post_commentmy_bg_c'] = blowupConfig::adjustColor($_POST['post_commentmy_bg_c']); |
---|
| 188 | $blowup_user['prelude_c'] = blowupConfig::adjustColor($_POST['prelude_c']); |
---|
| 189 | blowupConfig::createImages($blowup_user,$uploaded); |
---|
| 190 | } |
---|
[295] | 191 | |
---|
[0] | 192 | $core->blog->settings->addNamespace('themes'); |
---|
| 193 | $core->blog->settings->themes->put('blowup_style',serialize($blowup_user)); |
---|
| 194 | $core->blog->triggerBlog(); |
---|
[295] | 195 | |
---|
[0] | 196 | http::redirect($p_url.'&upd=1'); |
---|
| 197 | } |
---|
| 198 | catch (Exception $e) |
---|
| 199 | { |
---|
| 200 | $core->error->add($e->getMessage()); |
---|
| 201 | } |
---|
| 202 | } |
---|
| 203 | ?> |
---|
| 204 | <html> |
---|
| 205 | <head> |
---|
| 206 | <title><?php echo __('Blowup configuration'); ?></title> |
---|
| 207 | <?php echo dcPage::jsLoad('index.php?pf=blowupConfig/config.js'); ?> |
---|
| 208 | <?php echo dcPage::jsColorPicker(); ?> |
---|
| 209 | <script type="text/javascript"> |
---|
| 210 | //<![CDATA[ |
---|
| 211 | <?php |
---|
| 212 | echo dcPage::jsVar('dotclear.blowup_public_url',blowupConfig::imagesURL()); |
---|
| 213 | echo dcPage::jsVar('dotclear.msg.predefined_styles',__('Predefined styles')); |
---|
| 214 | echo dcPage::jsVar('dotclear.msg.apply_code',__('Apply code')); |
---|
[78] | 215 | echo dcPage::jsVar('dotclear.msg.predefined_style_title',__('Choose a predefined style')); |
---|
[0] | 216 | ?> |
---|
| 217 | //]]> |
---|
| 218 | </script> |
---|
| 219 | </head> |
---|
| 220 | |
---|
| 221 | <body> |
---|
| 222 | <?php |
---|
| 223 | echo |
---|
| 224 | '<h2>'.html::escapeHTML($core->blog->name). |
---|
[500] | 225 | ' › <a href="blog_theme.php">'.__('Blog appearance').'</a> › <span class="page-title">'.__('Blowup configuration').'</span></h2>'. |
---|
[0] | 226 | '<p><a class="back" href="blog_theme.php">'.__('back').'</a></p>'; |
---|
| 227 | |
---|
| 228 | |
---|
| 229 | if (!$can_write_images) { |
---|
[907] | 230 | dcPage::message(__('For the following reasons, images cannot be created. You won\'t be able to change some background properties.'). |
---|
| 231 | $notices,false,true); |
---|
[0] | 232 | } |
---|
| 233 | |
---|
| 234 | if (!empty($_GET['upd'])) { |
---|
[907] | 235 | dcPage::message(__('Theme configuration has been successfully updated.')); |
---|
[0] | 236 | } |
---|
| 237 | |
---|
| 238 | echo '<form id="theme_config" action="'.$p_url.'" method="post" enctype="multipart/form-data">'; |
---|
[295] | 239 | |
---|
[0] | 240 | echo '<fieldset><legend>'.__('General').'</legend>'; |
---|
| 241 | |
---|
| 242 | if ($can_write_images) { |
---|
| 243 | echo |
---|
[76] | 244 | '<p class="field"><label for="body_bg_c">'.__('Background color:').' '. |
---|
[0] | 245 | form::field('body_bg_c',7,7,$blowup_user['body_bg_c'],'colorpicker').'</label></p>'. |
---|
[295] | 246 | |
---|
[76] | 247 | '<p class="field"><label for="body_bg_g">'.__('Background color fill:').' '. |
---|
[0] | 248 | form::combo('body_bg_g',$gradient_types,$blowup_user['body_bg_g']).'</label></p>'; |
---|
| 249 | } |
---|
| 250 | |
---|
| 251 | echo |
---|
[76] | 252 | '<p class="field"><label for="body_txt_f">'.__('Main text font:').' '. |
---|
[0] | 253 | form::combo('body_txt_f',blowupConfig::fontsList(),$blowup_user['body_txt_f']).'</label></p>'. |
---|
| 254 | |
---|
[76] | 255 | '<p class="field"><label for="body_txt_s">'.__('Main text font size:').' '. |
---|
[0] | 256 | form::field('body_txt_s',7,7,$blowup_user['body_txt_s']).'</label></p>'. |
---|
| 257 | |
---|
[76] | 258 | '<p class="field"><label for="body_txt_c">'.__('Main text color:').' '. |
---|
[0] | 259 | form::field('body_txt_c',7,7,$blowup_user['body_txt_c'],'colorpicker').'</label></p>'. |
---|
| 260 | |
---|
[76] | 261 | '<p class="field"><label for="body_line_height">'.__('Text line height:').' '. |
---|
[0] | 262 | form::field('body_line_height',7,7,$blowup_user['body_line_height']).'</label></p>'. |
---|
| 263 | '</fieldset>'. |
---|
| 264 | |
---|
| 265 | '<fieldset><legend>'.__('Links').'</legend>'. |
---|
[76] | 266 | '<p class="field"><label for="body_link_c">'.__('Links color:').' '. |
---|
[0] | 267 | form::field('body_link_c',7,7,$blowup_user['body_link_c'],'colorpicker').'</label></p>'. |
---|
| 268 | |
---|
[76] | 269 | '<p class="field"><label for="body_link_v_c">'.__('Visited links color:').' '. |
---|
[0] | 270 | form::field('body_link_v_c',7,7,$blowup_user['body_link_v_c'],'colorpicker').'</label></p>'. |
---|
| 271 | |
---|
[76] | 272 | '<p class="field"><label for="body_link_f_c">'.__('Focus links color:').' '. |
---|
[0] | 273 | form::field('body_link_f_c',7,7,$blowup_user['body_link_f_c'],'colorpicker').'</label></p>'. |
---|
| 274 | '</fieldset>'. |
---|
| 275 | |
---|
| 276 | '<fieldset><legend>'.__('Page top').'</legend>'; |
---|
| 277 | |
---|
| 278 | if ($can_write_images) { |
---|
| 279 | echo |
---|
[76] | 280 | '<p class="field"><label for="prelude_c">'.__('Prelude color:').' '. |
---|
[0] | 281 | form::field('prelude_c',7,7,$blowup_user['prelude_c'],'colorpicker').'</label></p>'; |
---|
| 282 | } |
---|
| 283 | |
---|
| 284 | echo |
---|
[76] | 285 | '<p class="field"><label for="blog_title_hide">'.__('Hide main title').' '. |
---|
[0] | 286 | form::checkbox('blog_title_hide',1,$blowup_user['blog_title_hide']).'</label></p>'. |
---|
| 287 | |
---|
[76] | 288 | '<p class="field"><label for="blog_title_f">'.__('Main title font:').' '. |
---|
[0] | 289 | form::combo('blog_title_f',blowupConfig::fontsList(),$blowup_user['blog_title_f']).'</label></p>'. |
---|
| 290 | |
---|
[76] | 291 | '<p class="field"><label for="blog_title_s">'.__('Main title font size:').' '. |
---|
[0] | 292 | form::field('blog_title_s',7,7,$blowup_user['blog_title_s']).'</label></p>'. |
---|
| 293 | |
---|
[76] | 294 | '<p class="field"><label for="blog_title_c">'.__('Main title color:').' '. |
---|
[0] | 295 | form::field('blog_title_c',7,7,$blowup_user['blog_title_c'],'colorpicker').'</label></p>'. |
---|
| 296 | |
---|
[76] | 297 | '<p class="field"><label for="blog_title_a">'.__('Main title alignment:').' '. |
---|
[0] | 298 | form::combo('blog_title_a',array(__('center')=>'center',__('left')=>'left',__('right')=>'right'),$blowup_user['blog_title_a']).'</label></p>'. |
---|
| 299 | |
---|
[76] | 300 | '<p class="field"><label for="blog_title_p">'.__('Main title position (x:y)').' '. |
---|
[0] | 301 | form::field('blog_title_p',7,7,$blowup_user['blog_title_p']).'</label></p>'. |
---|
| 302 | '</fieldset>'; |
---|
| 303 | |
---|
| 304 | if ($can_write_images) { |
---|
| 305 | if ($blowup_user['top_image'] == 'custom' && $blowup_user['uploaded']) { |
---|
| 306 | $preview_image = http::concatURL($core->blog->url,blowupConfig::imagesURL().'/page-t.png'); |
---|
| 307 | } else { |
---|
| 308 | $preview_image = 'index.php?pf=blowupConfig/alpha-img/page-t/'.$blowup_user['top_image'].'.png'; |
---|
| 309 | } |
---|
[295] | 310 | |
---|
[0] | 311 | echo |
---|
| 312 | '<fieldset><legend>'.__('Top image').'</legend>'. |
---|
[76] | 313 | '<p class="field"><label for="top_image">'.__('Top image'). |
---|
[0] | 314 | form::combo('top_image',$top_images,($blowup_user['top_image'] ? $blowup_user['top_image'] : 'default')).'</label></p>'. |
---|
| 315 | '<p>'.__('Choose "Custom..." to upload your own image.').'</p>'. |
---|
[295] | 316 | |
---|
[76] | 317 | '<p id="uploader"><label for="upfile">'.__('Add your image:'). |
---|
[0] | 318 | ' ('.sprintf(__('JPEG or PNG file, 800 pixels wide, maximum size %s'),files::size(DC_MAX_UPLOAD_SIZE)).')'. |
---|
[76] | 319 | '<input type="file" name="upfile" id="upfile" size="35" />'. |
---|
[0] | 320 | '</label></p>'. |
---|
[295] | 321 | |
---|
[0] | 322 | '<h3>'.__('Preview').'</h3>'. |
---|
| 323 | '<div class="grid" style="width:800px;border:1px solid #ccc;">'. |
---|
| 324 | '<img style="display:block;" src="'.$preview_image.'" alt="" id="image-preview" />'. |
---|
| 325 | '</div>'. |
---|
| 326 | '</fieldset>'; |
---|
| 327 | } |
---|
| 328 | |
---|
| 329 | echo |
---|
| 330 | '<fieldset><legend>'.__('Sidebar').'</legend>'. |
---|
[76] | 331 | '<p class="field"><label for="sidebar_position">'.__('Sidebar position:').' '. |
---|
[0] | 332 | form::combo('sidebar_position',array(__('right')=>'right',__('left')=>'left'),$blowup_user['sidebar_position']).'</label></p>'. |
---|
| 333 | |
---|
[76] | 334 | '<p class="field"><label for="sidebar_text_f">'.__('Sidebar text font:').' '. |
---|
[0] | 335 | form::combo('sidebar_text_f',blowupConfig::fontsList(),$blowup_user['sidebar_text_f']).'</label></p>'. |
---|
| 336 | |
---|
[76] | 337 | '<p class="field"><label for="sidebar_text_s">'.__('Sidebar text font size:').' '. |
---|
[0] | 338 | form::field('sidebar_text_s',7,7,$blowup_user['sidebar_text_s']).'</label></p>'. |
---|
| 339 | |
---|
[76] | 340 | '<p class="field"><label for="sidebar_text_c">'.__('Sidebar text color:').' '. |
---|
[0] | 341 | form::field('sidebar_text_c',7,7,$blowup_user['sidebar_text_c'],'colorpicker').'</label></p>'. |
---|
| 342 | |
---|
[76] | 343 | '<p class="field"><label for="sidebar_title_f">'.__('Sidebar titles font:').' '. |
---|
[0] | 344 | form::combo('sidebar_title_f',blowupConfig::fontsList(),$blowup_user['sidebar_title_f']).'</label></p>'. |
---|
| 345 | |
---|
[76] | 346 | '<p class="field"><label for="sidebar_title_s">'.__('Sidebar titles font size:').' '. |
---|
[0] | 347 | form::field('sidebar_title_s',7,7,$blowup_user['sidebar_title_s']).'</label></p>'. |
---|
| 348 | |
---|
[76] | 349 | '<p class="field"><label for="sidebar_title_c">'.__('Sidebar titles color:').' '. |
---|
[0] | 350 | form::field('sidebar_title_c',7,7,$blowup_user['sidebar_title_c'],'colorpicker').'</label></p>'. |
---|
| 351 | |
---|
[76] | 352 | '<p class="field"><label for="sidebar_title2_f">'.__('Sidebar 2nd level titles font:').' '. |
---|
[0] | 353 | form::combo('sidebar_title2_f',blowupConfig::fontsList(),$blowup_user['sidebar_title2_f']).'</label></p>'. |
---|
| 354 | |
---|
[76] | 355 | '<p class="field"><label for="sidebar_title2_s">'.__('Sidebar 2nd level titles font size:').' '. |
---|
[0] | 356 | form::field('sidebar_title2_s',7,7,$blowup_user['sidebar_title2_s']).'</label></p>'. |
---|
| 357 | |
---|
[76] | 358 | '<p class="field"><label for="sidebar_title2_c">'.__('Sidebar 2nd level titles color:').' '. |
---|
[0] | 359 | form::field('sidebar_title2_c',7,7,$blowup_user['sidebar_title2_c'],'colorpicker').'</label></p>'. |
---|
| 360 | |
---|
[76] | 361 | '<p class="field"><label for="sidebar_line_c">'.__('Sidebar lines color:').' '. |
---|
[0] | 362 | form::field('sidebar_line_c',7,7,$blowup_user['sidebar_line_c'],'colorpicker').'</label></p>'. |
---|
| 363 | |
---|
[76] | 364 | '<p class="field"><label for="sidebar_link_c">'.__('Sidebar links color:').' '. |
---|
[0] | 365 | form::field('sidebar_link_c',7,7,$blowup_user['sidebar_link_c'],'colorpicker').'</label></p>'. |
---|
| 366 | |
---|
[76] | 367 | '<p class="field"><label for="sidebar_link_v_c">'.__('Sidebar visited links color:').' '. |
---|
[0] | 368 | form::field('sidebar_link_v_c',7,7,$blowup_user['sidebar_link_v_c'],'colorpicker').'</label></p>'. |
---|
| 369 | |
---|
[76] | 370 | '<p class="field"><label for="sidebar_link_f_c">'.__('Sidebar focus links color:').' '. |
---|
[0] | 371 | form::field('sidebar_link_f_c',7,7,$blowup_user['sidebar_link_f_c'],'colorpicker').'</label></p>'. |
---|
| 372 | '</fieldset>'. |
---|
| 373 | |
---|
| 374 | '<fieldset><legend>'.__('Entries').'</legend>'. |
---|
[76] | 375 | '<p class="field"><label for="date_title_f">'.__('Date title font:').' '. |
---|
[0] | 376 | form::combo('date_title_f',blowupConfig::fontsList(),$blowup_user['date_title_f']).'</label></p>'. |
---|
| 377 | |
---|
[76] | 378 | '<p class="field"><label for="date_title_s">'.__('Date title font size:').' '. |
---|
[0] | 379 | form::field('date_title_s',7,7,$blowup_user['date_title_s']).'</label></p>'. |
---|
| 380 | |
---|
[76] | 381 | '<p class="field"><label for="date_title_c">'.__('Date title color:').' '. |
---|
[0] | 382 | form::field('date_title_c',7,7,$blowup_user['date_title_c'],'colorpicker').'</label></p>'. |
---|
| 383 | |
---|
[76] | 384 | '<p class="field"><label for="post_title_f">'.__('Entry title font:').' '. |
---|
[0] | 385 | form::combo('post_title_f',blowupConfig::fontsList(),$blowup_user['post_title_f']).'</label></p>'. |
---|
| 386 | |
---|
[76] | 387 | '<p class="field"><label for="post_title_s">'.__('Entry title font size:').' '. |
---|
[0] | 388 | form::field('post_title_s',7,7,$blowup_user['post_title_s']).'</label></p>'. |
---|
| 389 | |
---|
[76] | 390 | '<p class="field"><label for="post_title_c">'.__('Entry title color:').' '. |
---|
[0] | 391 | form::field('post_title_c',7,7,$blowup_user['post_title_c'],'colorpicker').'</label></p>'; |
---|
| 392 | |
---|
| 393 | if ($can_write_images) { |
---|
| 394 | echo |
---|
[76] | 395 | '<p class="field"><label for="post_comment_bg_c">'.__('Comment background color:').' '. |
---|
[0] | 396 | form::field('post_comment_bg_c',7,7,$blowup_user['post_comment_bg_c'],'colorpicker').'</label></p>'; |
---|
| 397 | } |
---|
| 398 | |
---|
| 399 | echo |
---|
[76] | 400 | '<p class="field"><label for="post_comment_c">'.__('Comment text color:').' '. |
---|
[0] | 401 | form::field('post_comment_c',7,7,$blowup_user['post_comment_c'],'colorpicker').'</label></p>'; |
---|
| 402 | |
---|
| 403 | if ($can_write_images) { |
---|
| 404 | echo |
---|
[76] | 405 | '<p class="field"><label for="post_commentmy_bg_c">'.__('My comment background color:').' '. |
---|
[0] | 406 | form::field('post_commentmy_bg_c',7,7,$blowup_user['post_commentmy_bg_c'],'colorpicker').'</label></p>'; |
---|
| 407 | } |
---|
| 408 | |
---|
| 409 | echo |
---|
[76] | 410 | '<p class="field"><label for="post_commentmy_c">'.__('My comment text color:').' '. |
---|
[0] | 411 | form::field('post_commentmy_c',7,7,$blowup_user['post_commentmy_c'],'colorpicker').'</label></p>'. |
---|
| 412 | '</fieldset>'. |
---|
| 413 | |
---|
| 414 | '<fieldset><legend>'.__('Footer').'</legend>'. |
---|
[76] | 415 | '<p class="field"><label for="footer_f">'.__('Footer font:').' '. |
---|
[0] | 416 | form::combo('footer_f',blowupConfig::fontsList(),$blowup_user['footer_f']).'</label></p>'. |
---|
| 417 | |
---|
[76] | 418 | '<p class="field"><label for="footer_s">'.__('Footer font size:').' '. |
---|
[0] | 419 | form::field('footer_s',7,7,$blowup_user['footer_s']).'</label></p>'. |
---|
| 420 | |
---|
[76] | 421 | '<p class="field"><label for="footer_c">'.__('Footer color:').' '. |
---|
[0] | 422 | form::field('footer_c',7,7,$blowup_user['footer_c'],'colorpicker').'</label></p>'. |
---|
| 423 | |
---|
[76] | 424 | '<p class="field"><label for="footer_l_c">'.__('Footer links color:').' '. |
---|
[0] | 425 | form::field('footer_l_c',7,7,$blowup_user['footer_l_c'],'colorpicker').'</label></p>'. |
---|
| 426 | |
---|
[76] | 427 | '<p class="field"><label for="footer_bg_c">'.__('Footer background color:').' '. |
---|
[0] | 428 | form::field('footer_bg_c',7,7,$blowup_user['footer_bg_c'],'colorpicker').'</label></p>'. |
---|
| 429 | '</fieldset>'; |
---|
| 430 | |
---|
[295] | 431 | echo |
---|
| 432 | '<fieldset><legend>'.__('Additional CSS').'</legend>'. |
---|
| 433 | '<p>'.form::textarea('extra_css',72,5,html::escapeHTML($blowup_user['extra_css']),'maximal','',false,'title="'.__('Additional CSS').'"').'</p>'. |
---|
| 434 | '</fieldset>'; |
---|
| 435 | |
---|
| 436 | |
---|
| 437 | |
---|
[0] | 438 | // Import / Export configuration |
---|
| 439 | $tmp_array = array(); |
---|
| 440 | $tmp_exclude = array('uploaded','top_height'); |
---|
| 441 | if ($blowup_user['top_image'] == 'custom') { |
---|
| 442 | $tmp_exclude[] = 'top_image'; |
---|
| 443 | } |
---|
| 444 | foreach ($blowup_user as $k => $v) { |
---|
| 445 | if (!in_array($k,$tmp_exclude)) { |
---|
| 446 | $tmp_array[] = $k.':'.'"'.$v.'"'; |
---|
| 447 | } |
---|
| 448 | } |
---|
| 449 | echo |
---|
| 450 | '<h3 id="bu_export">'.__('Configuration import / export').'</h3><fieldset>'. |
---|
| 451 | '<p>'.__('You can share your configuration using the following code. To apply a configuration, paste the code, click on "Apply code" and save.').'</p>'. |
---|
[76] | 452 | '<p>'.form::textarea('export_code',72,5,implode('; ',$tmp_array),'maximal','',false,'title="'.__('Copy this code:').'"').'</p>'. |
---|
[0] | 453 | '</fieldset>'; |
---|
| 454 | |
---|
| 455 | echo |
---|
[217] | 456 | '<p class="clear"><input type="submit" value="'.__('Save').'" />'. |
---|
[0] | 457 | $core->formNonce().'</p>'. |
---|
| 458 | '</form>'; |
---|
| 459 | |
---|
| 460 | dcPage::helpBlock('blowupConfig'); |
---|
| 461 | ?> |
---|
| 462 | </body> |
---|
[295] | 463 | </html> |
---|