| 1 | <?php |
|---|
| 2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
|---|
| 3 | # |
|---|
| 4 | # This file is part of Dotclear 2. |
|---|
| 5 | # |
|---|
| 6 | # Copyright (c) 2003-2011 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 | l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/admin'); |
|---|
| 15 | |
|---|
| 16 | $list_types = array( |
|---|
| 17 | __('Title') => 'title', |
|---|
| 18 | __('Short') => 'short', |
|---|
| 19 | __('Full') => 'full' |
|---|
| 20 | ); |
|---|
| 21 | |
|---|
| 22 | $contexts = array( |
|---|
| 23 | 'default' => __('Home (first page)'), |
|---|
| 24 | 'default-page' => __('Home (other pages)'), |
|---|
| 25 | 'category' => __('Entries for a category'), |
|---|
| 26 | 'tag' => __('Entries for a tag'), |
|---|
| 27 | 'search' => __('Search result entries'), |
|---|
| 28 | 'archive' => __('Month archive entries') |
|---|
| 29 | ); |
|---|
| 30 | |
|---|
| 31 | $sticker_images = array( |
|---|
| 32 | __('Contact') => 'sticker-contact.png', |
|---|
| 33 | __('Feed') => 'sticker-feed.png', |
|---|
| 34 | __('About') => 'sticker-about.png' |
|---|
| 35 | ); |
|---|
| 36 | |
|---|
| 37 | $fonts = array( |
|---|
| 38 | __('default') => '', |
|---|
| 39 | __('Ductile primary') => 'Ductile body', |
|---|
| 40 | __('Ductile secondary') => 'Ductile alternate', |
|---|
| 41 | __('Times New Roman') => 'Times New Roman', |
|---|
| 42 | __('Georgia') => 'Georgia', |
|---|
| 43 | __('Garamond') => 'Garamond', |
|---|
| 44 | __('Helvetica/Arial') => 'Helvetica/Arial', |
|---|
| 45 | __('Verdana') => 'Verdana', |
|---|
| 46 | __('Trebuchet MS') => 'Trebuchet MS', |
|---|
| 47 | __('Impact') => 'Impact', |
|---|
| 48 | __('Monospace') => 'Monospace' |
|---|
| 49 | ); |
|---|
| 50 | |
|---|
| 51 | function adjustFontSize($s) |
|---|
| 52 | { |
|---|
| 53 | if (preg_match('/^([0-9.]+)\s*(%|pt|px|em|ex)?$/',$s,$m)) { |
|---|
| 54 | if (empty($m[2])) { |
|---|
| 55 | $m[2] = 'em'; |
|---|
| 56 | } |
|---|
| 57 | return $m[1].$m[2]; |
|---|
| 58 | } |
|---|
| 59 | |
|---|
| 60 | return null; |
|---|
| 61 | } |
|---|
| 62 | |
|---|
| 63 | function adjustColor($c) |
|---|
| 64 | { |
|---|
| 65 | if ($c === '') { |
|---|
| 66 | return ''; |
|---|
| 67 | } |
|---|
| 68 | |
|---|
| 69 | $c = strtoupper($c); |
|---|
| 70 | |
|---|
| 71 | if (preg_match('/^[A-F0-9]{3,6}$/',$c)) { |
|---|
| 72 | $c = '#'.$c; |
|---|
| 73 | } |
|---|
| 74 | |
|---|
| 75 | if (preg_match('/^#[A-F0-9]{6}$/',$c)) { |
|---|
| 76 | return $c; |
|---|
| 77 | } |
|---|
| 78 | |
|---|
| 79 | if (preg_match('/^#[A-F0-9]{3,}$/',$c)) { |
|---|
| 80 | return '#'.substr($c,1,1).substr($c,1,1).substr($c,2,1).substr($c,2,1).substr($c,3,1).substr($c,3,1); |
|---|
| 81 | } |
|---|
| 82 | |
|---|
| 83 | return ''; |
|---|
| 84 | } |
|---|
| 85 | |
|---|
| 86 | $ductile_base = array( |
|---|
| 87 | // HTML |
|---|
| 88 | 'subtitle_hidden' => null, |
|---|
| 89 | // CSS |
|---|
| 90 | 'body_font' => null, |
|---|
| 91 | 'alternate_font' => null, |
|---|
| 92 | 'blog_title_w' => null, |
|---|
| 93 | 'blog_title_s' => null, |
|---|
| 94 | 'blog_title_c' => null, |
|---|
| 95 | 'post_title_w' => null, |
|---|
| 96 | 'post_title_s' => null, |
|---|
| 97 | 'post_title_c' => null, |
|---|
| 98 | 'post_link_w' => null, |
|---|
| 99 | 'post_link_v_c' => null, |
|---|
| 100 | 'post_link_f_c' => null, |
|---|
| 101 | 'blog_title_w_m' => null, |
|---|
| 102 | 'blog_title_s_m' => null, |
|---|
| 103 | 'blog_title_c_m' => null, |
|---|
| 104 | 'post_title_w_m' => null, |
|---|
| 105 | 'post_title_s_m' => null, |
|---|
| 106 | 'post_title_c_m' => null, |
|---|
| 107 | 'post_simple_title_c' => null |
|---|
| 108 | ); |
|---|
| 109 | |
|---|
| 110 | $ductile_user = $core->blog->settings->themes->get($core->blog->settings->system->theme.'_style'); |
|---|
| 111 | $ductile_user = @unserialize($ductile_user); |
|---|
| 112 | if (!is_array($ductile_user)) { |
|---|
| 113 | $ductile_user = array(); |
|---|
| 114 | } |
|---|
| 115 | |
|---|
| 116 | $ductile_user = array_merge($ductile_base,$ductile_user); |
|---|
| 117 | |
|---|
| 118 | $ductile_stickers_base = array( |
|---|
| 119 | array('label' => null,'url' => null,'image' => null), |
|---|
| 120 | array('label' => null,'url' => null,'image' => null), |
|---|
| 121 | array('label' => null,'url' => null,'image' => null) |
|---|
| 122 | ); |
|---|
| 123 | |
|---|
| 124 | $ductile_stickers = $core->blog->settings->themes->get($core->blog->settings->system->theme.'_stickers'); |
|---|
| 125 | $ductile_stickers = @unserialize($ductile_stickers); |
|---|
| 126 | if (!is_array($ductile_stickers)) { |
|---|
| 127 | $ductile_stickers = $ductile_stickers_base; |
|---|
| 128 | } |
|---|
| 129 | |
|---|
| 130 | $ductile_lists_base = array( |
|---|
| 131 | 'default' => null, |
|---|
| 132 | 'default-page' => null, |
|---|
| 133 | 'category' => null, |
|---|
| 134 | 'tag' => null, |
|---|
| 135 | 'search' => null, |
|---|
| 136 | 'archive' => null |
|---|
| 137 | ); |
|---|
| 138 | |
|---|
| 139 | $ductile_lists = $core->blog->settings->themes->get($core->blog->settings->system->theme.'_entries_lists'); |
|---|
| 140 | $ductile_lists = @unserialize($ductile_lists); |
|---|
| 141 | if (!is_array($ductile_lists)) { |
|---|
| 142 | $ductile_lists = $ductile_lists_base; |
|---|
| 143 | } |
|---|
| 144 | |
|---|
| 145 | $ductile_counts_base = array( |
|---|
| 146 | 'default' => null, |
|---|
| 147 | 'category' => null, |
|---|
| 148 | 'tag' => null, |
|---|
| 149 | 'search' => null |
|---|
| 150 | ); |
|---|
| 151 | |
|---|
| 152 | $ductile_counts = $core->blog->settings->themes->get($core->blog->settings->system->theme.'_entries_counts'); |
|---|
| 153 | $ductile_counts = @unserialize($ductile_counts); |
|---|
| 154 | if (!is_array($ductile_counts)) { |
|---|
| 155 | $ductile_counts = $ductile_counts_base; |
|---|
| 156 | } |
|---|
| 157 | |
|---|
| 158 | |
|---|
| 159 | $conf_tab = isset($_POST['conf_tab']) ? $_POST['conf_tab'] : 'html'; |
|---|
| 160 | |
|---|
| 161 | if (!empty($_POST)) |
|---|
| 162 | { |
|---|
| 163 | try |
|---|
| 164 | { |
|---|
| 165 | # HTML |
|---|
| 166 | if ($conf_tab == 'html') { |
|---|
| 167 | $ductile_user['subtitle_hidden'] = (integer) !empty($_POST['subtitle_hidden']); |
|---|
| 168 | |
|---|
| 169 | $count = 0; |
|---|
| 170 | if (!empty($_POST['sticker1_label']) && !empty($_POST['sticker1_url'])) { |
|---|
| 171 | $ductile_stickers[$count]['label'] = $_POST['sticker1_label']; |
|---|
| 172 | $ductile_stickers[$count]['url'] = $_POST['sticker1_url']; |
|---|
| 173 | $ductile_stickers[$count]['image'] = $_POST['sticker1_image']; |
|---|
| 174 | $count++; |
|---|
| 175 | } |
|---|
| 176 | if (!empty($_POST['sticker2_label']) && !empty($_POST['sticker2_url'])) { |
|---|
| 177 | $ductile_stickers[$count]['label'] = $_POST['sticker2_label']; |
|---|
| 178 | $ductile_stickers[$count]['url'] = $_POST['sticker2_url']; |
|---|
| 179 | $ductile_stickers[$count]['image'] = $_POST['sticker2_image']; |
|---|
| 180 | $count++; |
|---|
| 181 | } |
|---|
| 182 | if (!empty($_POST['sticker3_label']) && !empty($_POST['sticker3_url'])) { |
|---|
| 183 | $ductile_stickers[$count]['label'] = $_POST['sticker3_label']; |
|---|
| 184 | $ductile_stickers[$count]['url'] = $_POST['sticker3_url']; |
|---|
| 185 | $ductile_stickers[$count]['image'] = $_POST['sticker3_image']; |
|---|
| 186 | $count++; |
|---|
| 187 | } |
|---|
| 188 | for ($i = $count; $i < 3; $i++) { |
|---|
| 189 | $ductile_stickers[$i]['label'] = null; |
|---|
| 190 | $ductile_stickers[$i]['url'] = null; |
|---|
| 191 | $ductile_stickers[$i]['image'] = null; |
|---|
| 192 | } |
|---|
| 193 | |
|---|
| 194 | for ($i = 0; $i < count($_POST['list_type']); $i++) { |
|---|
| 195 | $ductile_lists[$_POST['list_ctx'][$i]] = $_POST['list_type'][$i]; |
|---|
| 196 | } |
|---|
| 197 | |
|---|
| 198 | for ($i = 0; $i < count($_POST['count_nb']); $i++) { |
|---|
| 199 | $ductile_counts[$_POST['count_ctx'][$i]] = $_POST['count_nb'][$i]; |
|---|
| 200 | } |
|---|
| 201 | |
|---|
| 202 | } |
|---|
| 203 | |
|---|
| 204 | # CSS |
|---|
| 205 | if ($conf_tab == 'css') { |
|---|
| 206 | $ductile_user['body_font'] = $_POST['body_font']; |
|---|
| 207 | $ductile_user['alternate_font'] = $_POST['alternate_font']; |
|---|
| 208 | |
|---|
| 209 | $ductile_user['blog_title_w'] = (integer) !empty($_POST['blog_title_w']); |
|---|
| 210 | $ductile_user['blog_title_s'] = adjustFontSize($_POST['blog_title_s']); |
|---|
| 211 | $ductile_user['blog_title_c'] = adjustColor($_POST['blog_title_c']); |
|---|
| 212 | |
|---|
| 213 | $ductile_user['post_title_w'] = (integer) !empty($_POST['post_title_w']); |
|---|
| 214 | $ductile_user['post_title_s'] = adjustFontSize($_POST['post_title_s']); |
|---|
| 215 | $ductile_user['post_title_c'] = adjustColor($_POST['post_title_c']); |
|---|
| 216 | |
|---|
| 217 | $ductile_user['post_link_w'] = (integer) !empty($_POST['post_link_w']); |
|---|
| 218 | $ductile_user['post_link_v_c'] = adjustColor($_POST['post_link_v_c']); |
|---|
| 219 | $ductile_user['post_link_f_c'] = adjustColor($_POST['post_link_f_c']); |
|---|
| 220 | |
|---|
| 221 | $ductile_user['post_simple_title_c'] = adjustColor($_POST['post_simple_title_c']); |
|---|
| 222 | |
|---|
| 223 | $ductile_user['blog_title_w_m'] = (integer) !empty($_POST['blog_title_w_m']); |
|---|
| 224 | $ductile_user['blog_title_s_m'] = adjustFontSize($_POST['blog_title_s_m']); |
|---|
| 225 | $ductile_user['blog_title_c_m'] = adjustColor($_POST['blog_title_c_m']); |
|---|
| 226 | |
|---|
| 227 | $ductile_user['post_title_w_m'] = (integer) !empty($_POST['post_title_w_m']); |
|---|
| 228 | $ductile_user['post_title_s_m'] = adjustFontSize($_POST['post_title_s_m']); |
|---|
| 229 | $ductile_user['post_title_c_m'] = adjustColor($_POST['post_title_c_m']); |
|---|
| 230 | } |
|---|
| 231 | |
|---|
| 232 | $core->blog->settings->addNamespace('themes'); |
|---|
| 233 | $core->blog->settings->themes->put($core->blog->settings->system->theme.'_style',serialize($ductile_user)); |
|---|
| 234 | $core->blog->settings->themes->put($core->blog->settings->system->theme.'_stickers',serialize($ductile_stickers)); |
|---|
| 235 | $core->blog->settings->themes->put($core->blog->settings->system->theme.'_entries_lists',serialize($ductile_lists)); |
|---|
| 236 | $core->blog->settings->themes->put($core->blog->settings->system->theme.'_entries_counts',serialize($ductile_counts)); |
|---|
| 237 | |
|---|
| 238 | // Blog refresh |
|---|
| 239 | $core->blog->triggerBlog(); |
|---|
| 240 | |
|---|
| 241 | // Template cache reset |
|---|
| 242 | $core->emptyTemplatesCache(); |
|---|
| 243 | |
|---|
| 244 | echo |
|---|
| 245 | '<div class="message"><p>'. |
|---|
| 246 | __('Theme configuration upgraded.'). |
|---|
| 247 | '</p></div>'; |
|---|
| 248 | } |
|---|
| 249 | catch (Exception $e) |
|---|
| 250 | { |
|---|
| 251 | $core->error->add($e->getMessage()); |
|---|
| 252 | } |
|---|
| 253 | } |
|---|
| 254 | |
|---|
| 255 | // To be deleted when adminThemeConfigManaged behaviour will be implemented in admin/blog_themes.php : |
|---|
| 256 | echo '</form>'; |
|---|
| 257 | |
|---|
| 258 | # HTML Tab |
|---|
| 259 | |
|---|
| 260 | echo '<div class="multi-part" id="themes-list'.($conf_tab == 'html' ? '' : '-html').'" title="'.__('Content').'">'; |
|---|
| 261 | |
|---|
| 262 | echo '<form id="theme_config" action="blog_theme.php?conf=1" method="post" enctype="multipart/form-data">'; |
|---|
| 263 | |
|---|
| 264 | echo '<fieldset><legend>'.__('Header').'</legend>'. |
|---|
| 265 | '<p class="field"><label for="subtitle_hidden">'.__('Hide blog description:').' '. |
|---|
| 266 | form::checkbox('subtitle_hidden',1,$ductile_user['subtitle_hidden']).'</label>'.'</p>'. |
|---|
| 267 | '</fieldset>'; |
|---|
| 268 | |
|---|
| 269 | echo '<fieldset><legend>'.__('Stickers').'</legend>'; |
|---|
| 270 | |
|---|
| 271 | $img_url = $core->blog->settings->system->themes_url.'/'.$core->blog->settings->system->theme.'/img/'; |
|---|
| 272 | |
|---|
| 273 | echo '<table id="stickerslist">'.'<caption>'.__('Stickers (footer)').'</caption>'. |
|---|
| 274 | '<thead>'. |
|---|
| 275 | '<tr>'. |
|---|
| 276 | '<th scope="col">'.__('Position').'</th>'. |
|---|
| 277 | '<th scope="col">'.__('Label').'</th>'. |
|---|
| 278 | '<th scope="col">'.__('URL').'</th>'. |
|---|
| 279 | '<th scope="col">'.__('Icon').'</th>'. |
|---|
| 280 | '<th>'.'</th>'. |
|---|
| 281 | '</tr>'. |
|---|
| 282 | '</thead>'. |
|---|
| 283 | '<tbody>'. |
|---|
| 284 | '<tr>'. |
|---|
| 285 | '<td scope="raw">1</td>'. |
|---|
| 286 | '<td>'.form::field('sticker1_label',20,255,$ductile_stickers[0]['label']).'</td>'. |
|---|
| 287 | '<td>'.form::field('sticker1_url',40,255,$ductile_stickers[0]['url']).'</td>'. |
|---|
| 288 | '<td>'.form::combo('sticker1_image',$sticker_images,$ductile_stickers[0]['image']).'</td>'. |
|---|
| 289 | '<td>'.'<img src="'.$img_url.$ductile_stickers[0]['image'].'" />'.'</td>'. |
|---|
| 290 | '</tr>'. |
|---|
| 291 | '<tr>'. |
|---|
| 292 | '<td scope="raw">2</td>'. |
|---|
| 293 | '<td>'.form::field('sticker2_label',20,255,$ductile_stickers[1]['label']).'</td>'. |
|---|
| 294 | '<td>'.form::field('sticker2_url',40,255,$ductile_stickers[1]['url']).'</td>'. |
|---|
| 295 | '<td>'.form::combo('sticker2_image',$sticker_images,$ductile_stickers[1]['image']).'</td>'. |
|---|
| 296 | '<td>'.'<img src="'.$img_url.$ductile_stickers[1]['image'].'" />'.'</td>'. |
|---|
| 297 | '</td>'. |
|---|
| 298 | '</tr>'. |
|---|
| 299 | '<tr>'. |
|---|
| 300 | '<td scope="raw">3</td>'. |
|---|
| 301 | '<td>'.form::field('sticker3_label',20,255,$ductile_stickers[2]['label']).'</td>'. |
|---|
| 302 | '<td>'.form::field('sticker3_url',40,255,$ductile_stickers[2]['url']).'</td>'. |
|---|
| 303 | '<td>'.form::combo('sticker3_image',$sticker_images,$ductile_stickers[2]['image']).'</td>'. |
|---|
| 304 | '<td>'.'<img src="'.$img_url.$ductile_stickers[2]['image'].'" />'.'</td>'. |
|---|
| 305 | '</td>'. |
|---|
| 306 | '</tr>'. |
|---|
| 307 | '</tbody>'. |
|---|
| 308 | '</table>'; |
|---|
| 309 | |
|---|
| 310 | echo '</fieldset>'; |
|---|
| 311 | |
|---|
| 312 | echo '<fieldset><legend>'.__('Entries list types and limits').'</legend>'; |
|---|
| 313 | |
|---|
| 314 | echo '<table id="entrieslist">'.'<caption>'.__('Entries lists').'</caption>'. |
|---|
| 315 | '<thead>'. |
|---|
| 316 | '<tr>'. |
|---|
| 317 | '<th scope="col">'.__('Context').'</th>'. |
|---|
| 318 | '<th scope="col">'.__('Entries list type').'</th>'. |
|---|
| 319 | '<th scope="col">'.__('Number of entries').'</th>'. |
|---|
| 320 | '</tr>'. |
|---|
| 321 | '</thead>'. |
|---|
| 322 | '<tbody>'; |
|---|
| 323 | foreach ($ductile_lists as $k => $v) { |
|---|
| 324 | echo |
|---|
| 325 | '<tr>'. |
|---|
| 326 | '<td scope="raw">'.$contexts[$k].'</td>'. |
|---|
| 327 | '<td>'.form::hidden(array('list_ctx[]'),$k).form::combo(array('list_type[]'),$list_types,$v).'</td>'; |
|---|
| 328 | if (array_key_exists($k,$ductile_counts)) { |
|---|
| 329 | echo '<td>'.form::hidden(array('count_ctx[]'),$k).form::field(array('count_nb[]'),2,3,$ductile_counts[$k]).'</td>'; |
|---|
| 330 | } else { |
|---|
| 331 | echo '<td></td>'; |
|---|
| 332 | } |
|---|
| 333 | echo |
|---|
| 334 | '</tr>'; |
|---|
| 335 | } |
|---|
| 336 | echo |
|---|
| 337 | '</tbody>'. |
|---|
| 338 | '</table>'; |
|---|
| 339 | |
|---|
| 340 | echo '</fieldset>'; |
|---|
| 341 | |
|---|
| 342 | echo '<input type="hidden" name="conf_tab" value="html">'; |
|---|
| 343 | echo '<p class="clear"><input type="submit" value="'.__('Save').'" />'.$core->formNonce().'</p>'; |
|---|
| 344 | echo '</form>'; |
|---|
| 345 | |
|---|
| 346 | echo '</div>'; // Close tab |
|---|
| 347 | |
|---|
| 348 | # CSS tab |
|---|
| 349 | |
|---|
| 350 | echo '<div class="multi-part" id="themes-list'.($conf_tab == 'css' ? '' : '-css').'" title="'.__('Presentation').'">'; |
|---|
| 351 | |
|---|
| 352 | echo '<form id="theme_config" action="blog_theme.php?conf=1" method="post" enctype="multipart/form-data">'; |
|---|
| 353 | |
|---|
| 354 | echo '<h3>'.__('General settings').'</h3>'; |
|---|
| 355 | |
|---|
| 356 | echo '<fieldset><legend>'.__('Fonts').'</legend>'. |
|---|
| 357 | '<p class="field"><label for="body_font">'.__('Main:').' '. |
|---|
| 358 | form::combo('body_font',$fonts,$ductile_user['body_font']).'</label></p>'. |
|---|
| 359 | |
|---|
| 360 | '<p class="field"><label for="alternate_font">'.__('Secondary:').' '. |
|---|
| 361 | form::combo('alternate_font',$fonts,$ductile_user['alternate_font']).'</label></p>'. |
|---|
| 362 | '</fieldset>'; |
|---|
| 363 | |
|---|
| 364 | echo '<div class="two-cols">'; |
|---|
| 365 | echo '<div class="col">'; |
|---|
| 366 | |
|---|
| 367 | echo '<fieldset><legend>'.__('Blog title').'</legend>'. |
|---|
| 368 | '<p class="field"><label for="blog_title_w">'.__('In bold:').' '. |
|---|
| 369 | form::checkbox('blog_title_w',1,$ductile_user['blog_title_w']).'</label>'.'</p>'. |
|---|
| 370 | |
|---|
| 371 | '<p class="field"><label for="blog_title_s">'.__('Font size (in em by default):').'</label> '. |
|---|
| 372 | form::field('blog_title_s',7,7,$ductile_user['blog_title_s']).'</p>'. |
|---|
| 373 | |
|---|
| 374 | '<p class="field picker"><label for="blog_title_c">'.__('Color:').'</label> '. |
|---|
| 375 | form::field('blog_title_c',7,7,$ductile_user['blog_title_c'],'colorpicker').'</p>'. |
|---|
| 376 | '</fieldset>'; |
|---|
| 377 | |
|---|
| 378 | echo '</div>'; |
|---|
| 379 | echo '<div class="col">'; |
|---|
| 380 | |
|---|
| 381 | echo '<fieldset><legend>'.__('Post title').'</legend>'. |
|---|
| 382 | '<p class="field"><label for="post_title_w">'.__('In bold:').' '. |
|---|
| 383 | form::checkbox('post_title_w',1,$ductile_user['post_title_w']).'</label>'.'</p>'. |
|---|
| 384 | |
|---|
| 385 | '<p class="field"><label for="post_title_s">'.__('Font size (in em by default):').'</label> '. |
|---|
| 386 | form::field('post_title_s',7,7,$ductile_user['post_title_s']).'</p>'. |
|---|
| 387 | |
|---|
| 388 | '<p class="field picker"><label for="post_title_c">'.__('Color:').'</label> '. |
|---|
| 389 | form::field('post_title_c',7,7,$ductile_user['post_title_c'],'colorpicker').'</p>'. |
|---|
| 390 | '</fieldset>'; |
|---|
| 391 | |
|---|
| 392 | echo '</div>'; |
|---|
| 393 | echo '</div>'; |
|---|
| 394 | |
|---|
| 395 | echo '<fieldset><legend>'.__('Titles without link').'</legend>'. |
|---|
| 396 | |
|---|
| 397 | '<p class="field picker"><label for="post_simple_title_c">'.__('Color:').'</label> '. |
|---|
| 398 | form::field('post_simple_title_c',7,7,$ductile_user['post_simple_title_c'],'colorpicker').'</p>'. |
|---|
| 399 | '</fieldset>'; |
|---|
| 400 | |
|---|
| 401 | echo '<fieldset><legend>'.__('Inside posts links').'</legend>'. |
|---|
| 402 | '<p class="field"><label for="post_link_w">'.__('In bold:').' '. |
|---|
| 403 | form::checkbox('post_link_w',1,$ductile_user['post_link_w']).'</label>'.'</p>'. |
|---|
| 404 | |
|---|
| 405 | '<p class="field picker"><label for="post_link_v_c">'.__('Normal and visited links color:').'</label> '. |
|---|
| 406 | form::field('post_link_v_c',7,7,$ductile_user['post_link_v_c'],'colorpicker').'</p>'. |
|---|
| 407 | |
|---|
| 408 | '<p class="field picker"><label for="body_link_f_c">'.__('Active, hover and focus links color:').'</label> '. |
|---|
| 409 | form::field('post_link_f_c',7,7,$ductile_user['post_link_f_c'],'colorpicker').'</p>'. |
|---|
| 410 | '</fieldset>'; |
|---|
| 411 | |
|---|
| 412 | echo '<h3>'.__('Mobile specific settings').'</h3>'; |
|---|
| 413 | |
|---|
| 414 | echo '<div class="two-cols">'; |
|---|
| 415 | echo '<div class="col">'; |
|---|
| 416 | |
|---|
| 417 | echo '<fieldset><legend>'.__('Blog title').'</legend>'. |
|---|
| 418 | '<p class="field"><label for="blog_title_w_m">'.__('In bold:').' '. |
|---|
| 419 | form::checkbox('blog_title_w_m',1,$ductile_user['blog_title_w_m']).'</label>'.'</p>'. |
|---|
| 420 | |
|---|
| 421 | '<p class="field"><label for="blog_title_s_m">'.__('Font size (in em by default):').'</label> '. |
|---|
| 422 | form::field('blog_title_s_m',7,7,$ductile_user['blog_title_s_m']).'</p>'. |
|---|
| 423 | |
|---|
| 424 | '<p class="field picker"><label for="blog_title_c_m">'.__('Color:').'</label> '. |
|---|
| 425 | form::field('blog_title_c_m',7,7,$ductile_user['blog_title_c_m'],'colorpicker').'</p>'. |
|---|
| 426 | '</fieldset>'; |
|---|
| 427 | |
|---|
| 428 | echo '</div>'; |
|---|
| 429 | echo '<div class="col">'; |
|---|
| 430 | |
|---|
| 431 | echo '<fieldset><legend>'.__('Post title').'</legend>'. |
|---|
| 432 | '<p class="field"><label for="post_title_w_m">'.__('In bold:').' '. |
|---|
| 433 | form::checkbox('post_title_w_m',1,$ductile_user['post_title_w_m']).'</label>'.'</p>'. |
|---|
| 434 | |
|---|
| 435 | '<p class="field"><label for="post_title_s_m">'.__('Font size (in em by default):').'</label> '. |
|---|
| 436 | form::field('post_title_s_m',7,7,$ductile_user['post_title_s_m']).'</p>'. |
|---|
| 437 | |
|---|
| 438 | '<p class="field picker"><label for="post_title_c_m">'.__('Color:').'</label> '. |
|---|
| 439 | form::field('post_title_c_m',7,7,$ductile_user['post_title_c_m'],'colorpicker').'</p>'. |
|---|
| 440 | '</fieldset>'; |
|---|
| 441 | |
|---|
| 442 | echo '</div>'; |
|---|
| 443 | echo '</div>'; |
|---|
| 444 | |
|---|
| 445 | echo '<input type="hidden" name="conf_tab" value="css">'; |
|---|
| 446 | echo '<p class="clear"><input type="submit" value="'.__('Save').'" />'.$core->formNonce().'</p>'; |
|---|
| 447 | echo '</form>'; |
|---|
| 448 | |
|---|
| 449 | echo '</div>'; // Close tab |
|---|
| 450 | |
|---|
| 451 | // To be deleted when adminThemeConfigManaged behaviour will be implemented in admin/blog_themes.php : |
|---|
| 452 | echo '<form style="display:none">'; |
|---|
| 453 | |
|---|
| 454 | ?> |
|---|