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