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