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