Changeset 2393:662f66a598e3 for themes
- Timestamp:
- 10/16/13 22:00:38 (12 years ago)
- Branch:
- 2.6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
themes/ductile/_config.php
r2335 r2393 23 23 24 24 $standalone_config = (boolean) $core->themes->moduleInfo($core->blog->settings->system->theme,'standalone_config'); 25 26 // Load contextual help 27 if (file_exists(dirname(__FILE__).'/locales/'.$_lang.'/resources.php')) { 28 require dirname(__FILE__).'/locales/'.$_lang.'/resources.php'; 29 } 25 30 26 31 $list_types = array( … … 110 115 { 111 116 global $font_families; 112 117 113 118 return isset($font_families[$c]) ? '<span style="position:absolute;top:0;left:32em;">'.$font_families[$c].'</span>' : ''; 114 119 } … … 140 145 { 141 146 // Compute contrast ratio between two colors 142 147 143 148 $color = adjustColor($color); 144 149 if (($color == '') || (strlen($color) != 7)) return 0; 145 150 $background = adjustColor($background); 146 151 if (($background == '') || (strlen($background) != 7)) return 0; 147 152 148 153 $l1 = (0.2126 * pow(hexdec(substr($color,1,2))/255,2.2)) + 149 154 (0.7152 * pow(hexdec(substr($color,3,2))/255,2.2)) + … … 197 202 198 203 $large = ((($s > 1.5) && ($bold == false)) || (($s > 1.2) && ($bold == true))); 199 204 200 205 // Check ratio 201 206 if ($ratio > 7) { … … 216 221 $ratio = computeContrastRatio($color,$background); 217 222 $level = contrastRatioLevel($ratio,$size,$bold); 218 return 223 return 219 224 '<span style="position:absolute;top:0;left:23em;">'. 220 225 sprintf(__('ratio %.1f'),$ratio). … … 366 371 $ductile_stickers = $new_ductile_stickers; 367 372 } 368 373 369 374 for ($i = 0; $i < count($_POST['list_type']); $i++) { 370 375 $ductile_lists[$_POST['list_ctx'][$i]] = $_POST['list_type'][$i]; 371 376 } 372 377 373 378 for ($i = 0; $i < count($_POST['count_nb']); $i++) { 374 379 $ductile_counts[$_POST['count_ctx'][$i]] = $_POST['count_nb'][$i]; 375 380 } 376 381 377 382 } 378 383 379 384 # CSS 380 385 if ($conf_tab == 'css') { … … 392 397 $ductile_user['blog_title_s'] = adjustFontSize($_POST['blog_title_s']); 393 398 $ductile_user['blog_title_c'] = adjustColor($_POST['blog_title_c']); 394 399 395 400 $ductile_user['post_title_w'] = (integer) !empty($_POST['post_title_w']); 396 401 $ductile_user['post_title_s'] = adjustFontSize($_POST['post_title_s']); 397 402 $ductile_user['post_title_c'] = adjustColor($_POST['post_title_c']); 398 403 399 404 $ductile_user['post_link_w'] = (integer) !empty($_POST['post_link_w']); 400 405 $ductile_user['post_link_v_c'] = adjustColor($_POST['post_link_v_c']); 401 406 $ductile_user['post_link_f_c'] = adjustColor($_POST['post_link_f_c']); 402 407 403 408 $ductile_user['post_simple_title_c'] = adjustColor($_POST['post_simple_title_c']); 404 409 405 410 $ductile_user['blog_title_w_m'] = (integer) !empty($_POST['blog_title_w_m']); 406 411 $ductile_user['blog_title_s_m'] = adjustFontSize($_POST['blog_title_s_m']); 407 412 $ductile_user['blog_title_c_m'] = adjustColor($_POST['blog_title_c_m']); 408 413 409 414 $ductile_user['post_title_w_m'] = (integer) !empty($_POST['post_title_w_m']); 410 415 $ductile_user['post_title_s_m'] = adjustFontSize($_POST['post_title_s_m']); 411 416 $ductile_user['post_title_c_m'] = adjustColor($_POST['post_title_c_m']); 412 417 } 413 418 414 419 $core->blog->settings->addNamespace('themes'); 415 420 $core->blog->settings->themes->put($core->blog->settings->system->theme.'_style',serialize($ductile_user)); … … 423 428 // Template cache reset 424 429 $core->emptyTemplatesCache(); 425 430 426 431 dcPage::message(__('Theme configuration upgraded.'),true,true); 427 432 } … … 454 459 echo '<h4 class="border-top pretty-title">'.__('Stickers').'</h4>'; 455 460 456 echo 461 echo 457 462 '<div class="table-outer">'. 458 463 '<table class="dragable">'.'<caption>'.__('Stickers (footer)').'</caption>'. … … 469 474 foreach ($ductile_stickers as $i => $v) { 470 475 $count++; 471 echo 476 echo 472 477 '<tr class="line" id="l_'.$i.'">'. 473 478 '<td class="handle minimal">'.form::field(array('order['.$i.']'),2,3,$count,'position','',false). … … 494 499 '<tbody>'; 495 500 foreach ($ductile_lists as $k => $v) { 496 echo 501 echo 497 502 '<tr>'. 498 503 '<td scope="row">'.$contexts[$k].'</td>'.
Note: See TracChangeset
for help on using the changeset viewer.