Changes in [2656:95fe4eacc716:2683:fb8aa74332f1]
- Files:
-
- 4 added
- 108 edited
Legend:
- Unmodified
- Added
- Removed
-
.hgsubstate
r2656 r2683 1 ea3c26b8075420a1662cf2c9dfdb2199d10b07f4inc/libs/clearbricks1 023222b445b78b875f9f49041e7bd136cebd042e inc/libs/clearbricks -
admin/blog_theme.php
r2579 r2677 133 133 '<p class="info vertical-separator">'.sprintf( 134 134 __("Visit %s repository, the resources center for Dotclear."), 135 '<a href="http://themes.dotaddict.org/ dc2/">Dotaddict</a>'135 '<a href="http://themes.dotaddict.org/galerie-dc2/">Dotaddict</a>' 136 136 ). 137 137 '</p>'. -
admin/comment.php
r2614 r2666 91 91 92 92 if (!$comment_id && !$core->error->flag()) { 93 $core->error->add(__('No comment '));93 $core->error->add(__('No comments')); 94 94 } 95 95 -
admin/js/_preferences.js
r2566 r2679 20 20 return true; 21 21 }); 22 23 // choose format depending of editor based on formats_by_editor defined in preferences.php 24 if (formats_by_editor !== undefined) { 25 var _editors = $.parseJSON(formats_by_editor); 26 27 $('#user_editor').change(function() { 28 if (!_editors[$(this).val()]) {return;} 29 30 $('#user_post_format option').remove(); 31 for (var format in _editors[$(this).val()]) { 32 $('#user_post_format').append('<option value="'+format+'">'+format+'</option>'); 33 } 34 }); 35 } 22 36 }); -
admin/media.php
r2649 r2678 75 75 76 76 $page_url = 'media.php?popup='.$popup.'&post_id='.$post_id; 77 $temp = $core->callBehavior('adminMediaURL',$page_url); 78 if ($temp != '') { 79 $page_url=$temp; 80 } 77 if (($temp = $core->callBehavior('adminMediaURL',$page_url))!='') { 78 $page_url = $temp; 79 } 80 81 81 if ($popup) { 82 82 $open_f = array('dcPage','openPopup'); … … 579 579 } else { 580 580 $link = 'media_item.php?id='.$f->media_id.'&popup='.$popup.'&post_id='.$post_id; 581 $link = $core->callBehavior('adminMediaURL',$link); 581 if (($temp = $core->callBehavior('adminMediaURL',$link))!='') { 582 $link = $temp; 583 } 582 584 } 583 585 -
admin/post.php
r2650 r2683 4 4 # This file is part of Dotclear 2. 5 5 # 6 # Copyright (c) 2003-201 3Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2014 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or -
admin/preferences.php
r2567 r2682 4 4 # This file is part of Dotclear 2. 5 5 # 6 # Copyright (c) 2003-201 3Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2014 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or … … 27 27 28 28 $user_options = $core->auth->getOptions(); 29 if (empty($user_options['editor'])) { 30 $user_options['editor'] = ''; 31 } 29 32 30 33 $core->auth->user_prefs->addWorkspace('dashboard'); … … 58 61 } 59 62 63 # Editors combo 64 $editors_combo = dcAdminCombos::getEditorsCombo(); 65 $editors = array_keys($editors_combo); 66 60 67 # Formaters combo 61 68 $formaters_combo = dcAdminCombos::getFormatersCombo(); 69 70 if (!empty($user_options['editor']) && !empty($formaters_combo[$user_options['editor']])) { 71 $formaters_combo_editor = $formaters_combo[$user_options['editor']]; 72 } elseif (count($editors)!=0) { 73 $formaters_combo_editor = $formaters_combo[$editors[0]]; 74 } else { 75 $formaters_combo = array(); 76 } 62 77 63 78 $status_combo = dcAdminCombos::getPostStatusescombo(); … … 155 170 } 156 171 $user_options['post_format'] = $_POST['user_post_format']; 172 $user_options['editor'] = $_POST['user_editor']; 157 173 $user_options['enable_wysiwyg'] = !empty($_POST['user_wysiwyg']); 158 174 … … 317 333 sprintf(__('Password strength: %s'),__('very strong'))."']});\n". 318 334 "});\n". 335 'var formats_by_editor = \''.json_encode($formaters_combo).'\';'. 319 336 "\n//]]>\n". 320 337 "</script>\n". … … 451 468 '</div>'; 452 469 470 // hide editor selector if less than 2 editors 471 if (count($editors)<2) { 472 $editor_class = ' hidden'; 473 } else { 474 $editor_class = ''; 475 } 476 453 477 echo 454 478 '<div class="fieldset">'. 455 479 '<h4>'.__('Edition').'</h4>'. 456 480 481 '<p class="field'.$editor_class.'"><label for="user_editor">'.__('Preferred editor:').'</label>'. 482 form::combo('user_editor',$editors_combo,$user_options['editor']).'</p>'. 483 457 484 '<p class="field"><label for="user_post_format">'.__('Preferred format:').'</label>'. 458 form::combo('user_post_format',$formaters_combo ,$user_options['post_format']).'</p>'.485 form::combo('user_post_format',$formaters_combo_editor,$user_options['post_format']).'</p>'. 459 486 460 487 '<p class="field"><label for="user_post_status">'.__('Default entry status:').'</label>'. -
inc/admin/lib.admincombos.php
r2566 r2679 51 51 */ 52 52 public static function getPostStatusesCombo() { 53 $status_combo = 53 $status_combo = array(); 54 54 foreach (self::$core->blog->getAllPostStatus() as $k => $v) { 55 55 $status_combo[$v] = (string) $k; … … 141 141 142 142 /** 143 Returns a combo containing all available formaters in admin 144 145 @return <b>array</b> the combo box (form::combo -compatible format) 146 */ 147 public static function getFormatersCombo() { 148 foreach (self::$core->getFormaters() as $v) { 149 $formaters_combo[$v] = $v; 150 } 143 Returns a combo containing all available editors in admin 144 145 @return <b>array</b> the combo box (form::combo -compatible format) 146 */ 147 public static function getEditorsCombo() 148 { 149 $editors_combo = array(); 150 151 foreach (self::$core->getEditors() as $v) { 152 $editors_combo[$v] = $v; 153 } 154 155 return $editors_combo; 156 } 157 158 /** 159 Returns a combo containing all available formaters by editor in admin 160 161 @param editor_id <b>string</b> Editor id (dcLegacyEditor, dcCKEditor, ...) 162 @return <b>array</b> the combo box (form::combo -compatible format) 163 */ 164 public static function getFormatersCombo($editor_id='') 165 { 166 $formaters_combo = array(); 167 168 if (!empty($editor_id)) { 169 foreach (self::$core->getFormaters($editor_id) as $formater) { 170 $formaters_combo[$formater] = $formater; 171 } 172 } else { 173 foreach (self::$core->getFormaters() as $editor => $formaters) { 174 foreach ($formaters as $formater) { 175 $formaters_combo[$editor][$formater] = $formater; 176 } 177 } 178 } 179 151 180 return $formaters_combo; 152 181 } -
inc/admin/lib.pager.php
r2566 r2666 381 381 echo '<p><strong>'.__('No comments or trackbacks matches the filter').'</strong></p>'; 382 382 } else { 383 echo '<p><strong>'.__('No comment ').'</strong></p>';383 echo '<p><strong>'.__('No comments').'</strong></p>'; 384 384 } 385 385 } -
inc/core/class.dc.core.php
r2650 r2683 4 4 # This file is part of Dotclear 2. 5 5 # 6 # Copyright (c) 2003-201 3Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2014 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or … … 102 102 103 103 $this->log = new dcLog($this); 104 105 $this->addFormater('xhtml', create_function('$s','return $s;'));106 $this->addFormater('wiki', array($this,'wikiTransform'));107 $this->loadTemplateEnvironment();108 104 } 109 105 … … 248 244 //@} 249 245 250 251 246 /// @name Text Formatters methods 252 247 //@{ … … 255 250 transform text. The function must be a valid callback and takes one 256 251 argument: the string to transform. It returns the transformed string. 252 253 @param editor_id <b>string</b> Editor id (dcLegacyEditor, dcCKEditor, ...) 254 @param name <b>string</b> Formater name 255 @param func <b>callback</b> Function to use, must be a valid and callable callback 256 */ 257 public function addEditorFormater($editor_id,$name,$func) 258 { 259 if (is_callable($func)) { 260 $this->formaters[$editor_id][$name] = $func; 261 } 262 } 263 264 /// @name Text Formatters methods 265 //@{ 266 /** 267 Adds a new text formater which will call the function <var>$func</var> to 268 transform text. The function must be a valid callback and takes one 269 argument: the string to transform. It returns the transformed string. 257 270 258 271 @param name <b>string</b> Formater name … … 261 274 public function addFormater($name,$func) 262 275 { 263 if (is_callable($func)) { 264 $this->formaters[$name] = $func; 265 } 266 } 267 268 /** 269 Returns formaters list. 270 276 $this->addEditorFormater('dcLegacyEditor',$name,$func); 277 } 278 279 /** 280 Returns editors list 281 282 @return <b>array</b> An array of editors values. 283 */ 284 public function getEditors() 285 { 286 $editors = array(); 287 288 foreach (array_keys($this->formaters) as $editor_id) { 289 $editors[$editor_id] = $this->plugins->moduleInfo($editor_id,'name'); 290 } 291 292 return $editors; 293 } 294 295 /** 296 Returns formaters list by editor 297 298 @param editor_id <b>string</b> Editor id (dcLegacyEditor, dcCKEditor, ...) 271 299 @return <b>array</b> An array of formaters names in values. 272 */ 273 public function getFormaters() 274 { 275 return array_keys($this->formaters); 300 301 /** 302 if @param editor_id is empty: 303 return all formaters sorted by actives editors 304 305 if @param editor_id is not empty 306 return formaters for an editor if editor is active 307 return empty() array if editor is not active. 308 It can happens when a user choose an editor and admin deactivate that editor later 309 */ 310 public function getFormaters($editor_id='') 311 { 312 $formaters_list = array(); 313 314 if (!empty($editor_id)) { 315 if (isset($this->formaters[$editor_id])) { 316 $formaters_list = array_keys($this->formaters[$editor_id]); 317 } 318 } else { 319 foreach ($this->formaters as $editor => $formaters) { 320 $formaters_list[$editor] = array_keys($formaters); 321 } 322 } 323 324 return $formaters_list; 276 325 } 277 326 … … 280 329 transformed using that formater. 281 330 331 @param editor_id <b>string</b> Editor id (dcLegacyEditor, dcCKEditor, ...) 282 332 @param name <b>string</b> Formater name 283 333 @param str <b>string</b> String to transform 284 334 @return <b>string</b> String transformed 285 335 */ 336 public function callEditorFormater($editor_id,$name,$str) 337 { 338 if (isset($this->formaters[$editor_id]) && isset($this->formaters[$editor_id][$name])) { 339 return call_user_func($this->formaters[$editor_id][$name],$str); 340 } 341 342 return $str; 343 } 344 //@} 345 346 /** 347 If <var>$name</var> is a valid formater, it returns <var>$str</var> 348 transformed using that formater. 349 350 @param name <b>string</b> Formater name 351 @param str <b>string</b> String to transform 352 @return <b>string</b> String transformed 353 */ 286 354 public function callFormater($name,$str) 287 355 { 288 if (isset($this->formaters[$name])) { 289 return call_user_func($this->formaters[$name],$str); 290 } 291 292 return $str; 356 return $this->callEditorFormater('dcLegacyEditor',$name,$str); 293 357 } 294 358 //@} 295 359 296 360 297 361 /// @name Behaviors methods -
inc/core/class.dc.media.php
r2566 r2659 1002 1002 } 1003 1003 1004 p rotectedfunction imageThumbRemove($f)1004 public function imageThumbRemove($f) 1005 1005 { 1006 1006 $p = path::info($f); -
inc/core/class.dc.trackback.php
r2566 r2674 482 482 } 483 483 484 private static function detectCharset($ string)485 { 486 return mb_detect_encoding($ remote_content,484 private static function detectCharset($content) 485 { 486 return mb_detect_encoding($content, 487 487 'UTF-8,ISO-8859-1,ISO-8859-2,ISO-8859-3,'. 488 488 'ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,'. -
inc/prepend.php
r2654 r2683 73 73 $__autoload['adminModulesList'] = dirname(__FILE__).'/admin/lib.moduleslist.php'; 74 74 $__autoload['adminThemesList'] = dirname(__FILE__).'/admin/lib.moduleslist.php'; 75 $__autoload['dcThemeConfig'] = dirname(__FILE__).'/admin/lib.themeconfig.php'; 75 76 76 77 $__autoload['dcTemplate'] = dirname(__FILE__).'/public/class.dc.template.php'; -
inc/public/class.dc.template.php
r2646 r2666 276 276 $p[3] = '0'; # lower_case 277 277 $p[4] = '0'; # upper_case or capitalize 278 $p[5] = '0'; # encode_url 278 279 279 280 $p[0] = (integer) (!empty($attr['encode_xml']) || !empty($attr['encode_html'])); … … 287 288 $p[4] = (integer) !empty($attr['upper_case']); 288 289 $p[4] = (!empty($attr['capitalize']) ? 2 : $p[4]); 290 $p[5] = (integer) !empty($attr['encode_url']); 289 291 290 292 return "context::global_filter(%s,".implode(",",$p).",'".addslashes($this->current_tag)."')"; … … 1790 1792 $operation, 1791 1793 array( 1792 'none' => 'no comment ',1794 'none' => 'no comments', 1793 1795 'one' => 'one comment', 1794 1796 'more' => '%d comments' -
inc/public/default-templates/currywurst/README.md
r2623 r2675 64 64 - send-trackback 65 65 66 ### __layout.html 67 68 Reprend l'intégralité du home.html et définit les blocs permettant l'héritage et extension 69 70 La liste des noms utilisés pour les blocs sont les suivants (les noms sont composés de deux termes, le nom du parent direct du bloc et le nom du bloc en question, sachant que le nom 'attr' est réservé aux attributs des balises, comme pour 'body-attr') : 71 72 - html-head : contenu de la balise head 73 - head-title : contenu de la balise title 74 - head-meta : liste des balises meta du head 75 - head-dc : liste des balises dublin core du head 76 - head-linkrel : liste des balises link rel du head 77 - body-attr : attributs de la balise body 78 - html-body : contenu de la balise body 79 - body-page : contenu de la div #page 80 - page-top : contenu d'entête de la div #page (en général inclusion du _top.html) 81 - page-wrapper : contenu principal de la div #page, soit le contenu de la div #wrapper 82 - wrapper-main : contenu principal de la div #wrapper, soit le contenu de la div #main 83 - main-content : contenu de la div #content 84 - wrapper-sidebar : contenu annexe de la div #wrapper (en général inclusion de _sidebar.html) 85 - page-footer : contenu de pied de page de la div #page (en général inclusion du _footer.html) 86 87 Pour rappel, la hiérarchie des blocs html est la suivante : 88 89 - html 90 - head 91 - body 92 - #page 93 - .header 94 - #wrapper 95 - #main 96 - #content 97 - #sidebar/.sidebar 98 - #footer/.footer 99 100 66 101 *** 67 102 -
inc/public/default-templates/currywurst/_footer.html
r2621 r2670 1 1 <p id="gotop"><a href="#top">Haut de page</a></p> 2 2 3 <div id="footer" role="contentinfo"> 4 <div id="blogcustom"> 3 <div class="footer" id="footer" role="contentinfo"> 4 <div class="widgets footer__widgets" id="blogcustom"> 5 <h2 class="blogcustom__title">{{tpl:lang Blog info}}</h2> 5 6 {{tpl:Widgets type="custom"}} 6 7 </div> <!-- End #custom widgets --> -
inc/public/default-templates/currywurst/_sidebar.html
r2603 r2670 1 <div id="sidebar" role="complementary"> 2 <div id="blognav"> 1 <div class="sidebar" id="sidebar" role="complementary"> 2 <div class="widgets blognav__widgets" id="blognav"> 3 <h2 class="blognav__title">{{tpl:lang Blog menu}}</h2> 3 4 {{tpl:Widgets type="nav"}} 4 5 </div> <!-- End #blognav --> 5 <div id="blogextra"> 6 <div class="widgets blogextra__widgets" id="blogextra"> 7 <h2 class="blogextra__title">{{tpl:lang Extra menu}}</h2> 6 8 {{tpl:Widgets type="extra"}} 7 9 </div> <!-- End #blogextra --> -
inc/public/default-templates/currywurst/home.html
r2603 r2675 1 <!DOCTYPE html> 2 <html lang="{{tpl:BlogLanguage}}"> 3 <head> 4 <meta charset="UTF-8" /> 5 <meta name="ROBOTS" content="{{tpl:BlogMetaRobots}}" /> 6 7 <title>{{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf></title> 8 <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogDescription cut_string="180" encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf>" /> 9 <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 10 <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" /> 11 <meta name="date" content="{{tpl:BlogUpdateDate iso8601="1"}}" /> 12 13 <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" /> 14 <meta property="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf>" /> 15 <meta property="dc.description" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogDescription encode_html="1"}}" /> 16 <meta property="dc.language" content="{{tpl:BlogLanguage}}" /> 17 <meta property="dc.publisher" content="{{tpl:BlogEditor encode_html="1"}}" /> 18 <meta property="dc.rights" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 19 <meta property="dc.date" content="{{tpl:BlogUpdateDate iso8601="1"}}" /> 20 <meta property="dc.type" content="text" /> 21 <meta property="dc.format" content="text/html" /> 22 23 <link rel="contents" title="{{tpl:lang Archives}}" href="{{tpl:BlogArchiveURL}}" /> 24 <tpl:Categories> 25 <link rel="section" href="{{tpl:CategoryURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" /> 26 </tpl:Categories> 27 28 <tpl:Entries no_content="1"> 29 <tpl:EntriesHeader> 30 <tpl:Pagination> 31 <tpl:PaginationIf end="0"> 32 <link rel="prev" title="{{tpl:lang previous entries}}" href="{{tpl:PaginationURL offset="1"}}" /> 33 </tpl:PaginationIf> 34 35 <tpl:PaginationIf start="0"> 36 <link rel="next" title="{{tpl:lang next entries}}" href="{{tpl:PaginationURL offset="-1"}}" /> 37 </tpl:PaginationIf> 38 </tpl:Pagination> 39 </tpl:EntriesHeader> 40 41 <link rel="chapter" href="{{tpl:EntryURL}}" title="{{tpl:EntryTitle encode_html="1"}}" /> 42 </tpl:Entries> 43 44 <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:BlogFeedURL type="atom"}}" /> 45 <link rel="EditURI" type="application/rsd+xml" title="RSD" href="{{tpl:BlogRSDURL}}" /> 46 <link rel="meta" type="application/xbel+xml" title="Blogroll" href="{{tpl:BlogrollXbelLink}}" /> 47 48 {{tpl:include src="_head.html"}} 49 </head> 50 <body class="dc-home <tpl:SysIf current_mode="default">dc-home-first</tpl:SysIf>"> 51 <div id="page"> 52 {{tpl:include src="_top.html"}} 53 54 <div id="wrapper"> 55 56 <div id="main" role="main"> 57 <div id="content"> 58 59 <tpl:Entries> 60 61 <!-- First page --> 62 <tpl:SysIf current_mode="default"> 63 <tpl:LoopPosition start="1" length="1"> 64 {{tpl:include src="_entry-full.html"}} 65 </tpl:LoopPosition> 66 67 <tpl:LoopPosition start="2"> 68 {{tpl:include src="_entry-short.html"}} 69 </tpl:LoopPosition> 70 </tpl:SysIf> 71 72 <!-- Next pages --> 73 <tpl:SysIf current_mode="!default"> 74 {{tpl:include src="_entry-short.html"}} 75 </tpl:SysIf> 76 77 <!-- Pagination --> 78 <tpl:EntriesFooter> 79 {{tpl:include src="_pagination.html"}} 80 </tpl:EntriesFooter> 81 82 </tpl:Entries> 83 84 </div> <!-- End #content --> 85 </div> <!-- End #main --> 86 87 {{tpl:include src="_sidebar.html"}} 88 89 </div> <!-- End #wrapper --> 90 91 {{tpl:include src="_footer.html"}} 92 </div> <!-- End #page --> 93 </body> 94 </html> 1 {{tpl:extends parent="__layout.html"}} -
inc/public/default-templates/currywurst/post.html
r2603 r2675 1 <!DOCTYPE html> 2 <html lang="{{tpl:BlogLanguage}}"> 3 <head> 4 <meta charset="UTF-8" /> 1 {{tpl:extends parent="__layout.html"}} 2 3 <tpl:Block name="head-title">{{tpl:EntryTitle encode_html="1"}} - {{tpl:BlogName encode_html="1"}}</tpl:Block> 4 5 <tpl:Block name="head-meta"> 5 6 <meta name="ROBOTS" content="{{tpl:BlogMetaRobots}}" /> 6 7 <title>{{tpl:EntryTitle encode_html="1"}} - {{tpl:BlogName encode_html="1"}}</title>8 7 <meta name="description" lang="{{tpl:EntryLang}}" content="{{tpl:EntryContent full="1" encode_html="1" remove_html="1" cut_string="180"}}" /> 9 8 <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 10 9 <meta name="author" content="{{tpl:EntryAuthorCommonName encode_html="1"}}" /> 11 10 <meta name="date" content="{{tpl:EntryDate iso8601="1"}}" /> 11 </tpl:Block> 12 12 13 <tpl:Block name="head-dc"> 13 14 <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" /> 14 15 <meta property="dc.title" content="{{tpl:EntryTitle encode_html="1"}}" /> … … 21 22 <meta property="dc.type" content="text" /> 22 23 <meta property="dc.format" content="text/html" /> 24 </tpl:Block> 23 25 26 <tpl:Block name"head-linkrel"> 24 27 <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 25 28 <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" /> 26 27 29 <tpl:EntryNext><link rel="next" href="{{tpl:EntryURL}}" title="{{tpl:EntryTitle encode_html="1"}}" /></tpl:EntryNext> 28 30 <tpl:EntryPrevious><link rel="prev" href="{{tpl:EntryURL}}" title="{{tpl:EntryTitle encode_html="1"}}" /></tpl:EntryPrevious> 31 <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:BlogFeedURL type="atom"}}" /> 32 </tpl:Block> 29 33 30 <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:BlogFeedURL type="atom"}}" /> 31 32 {{tpl:include src="_head.html"}} 34 <tpl:Block name="html-head"> 35 {{tpl:parent}} 33 36 34 37 <script type="text/javascript" src="{{tpl:BlogThemeURL}}/../default/js/post.js"></script> … … 38 41 //]]> 39 42 </script> 40 </head> 41 <body class="dc-post"> 42 <div id="page"> 43 {{tpl:EntryPingData}} 43 </tpl:Block> 44 44 45 {{tpl:include src="_top.html"}} 45 <tpl:Block name="body-attr">class="dc-post"</tpl:Block> 46 46 47 <div id="wrapper"> 47 <tpl:Block name="page-top"> 48 {{tpl:EntryPingData}} 49 {{tpl:parent}} 50 </tpl:Block> 48 51 49 <div id="main" role="main"> 50 <div id="content"> 52 <tpl:Block name="main-content"> 53 <p class="navlinks topnl"> 54 <tpl:EntryPrevious><a href="{{tpl:EntryURL}}" 55 title="{{tpl:EntryTitle encode_html="1"}}" class="prev">« {{tpl:EntryTitle encode_html="1" 56 cut_string="50"}}</a></tpl:EntryPrevious> 57 <tpl:EntryNext> <span>-</span> <a href="{{tpl:EntryURL}}" 58 title="{{tpl:EntryTitle encode_html="1"}}" class="next">{{tpl:EntryTitle encode_html="1" 59 cut_string="50"}} »</a></tpl:EntryNext> 60 </p> 51 61 52 <p class="navlinks topnl"> 53 <tpl:EntryPrevious><a href="{{tpl:EntryURL}}" 54 title="{{tpl:EntryTitle encode_html="1"}}" class="prev">« {{tpl:EntryTitle encode_html="1" 55 cut_string="50"}}</a></tpl:EntryPrevious> 56 <tpl:EntryNext> <span>-</span> <a href="{{tpl:EntryURL}}" 57 title="{{tpl:EntryTitle encode_html="1"}}" class="next">{{tpl:EntryTitle encode_html="1" 58 cut_string="50"}} »</a></tpl:EntryNext> 59 </p> 62 {{tpl:include src="_simple-entry.html"}} 60 63 61 {{tpl:include src="_simple-entry.html"}} 62 63 <p class="navlinks"> 64 <tpl:EntryPrevious><a href="{{tpl:EntryURL}}" 65 title="{{tpl:EntryTitle encode_html="1"}}" class="prev">« {{tpl:EntryTitle encode_html="1" 66 cut_string="50"}}</a></tpl:EntryPrevious> 67 <tpl:EntryNext> <span>-</span> <a href="{{tpl:EntryURL}}" 68 title="{{tpl:EntryTitle encode_html="1"}}" class="next">{{tpl:EntryTitle encode_html="1" 69 cut_string="50"}} »</a></tpl:EntryNext> 70 </p> 71 72 </div> 73 </div> <!-- End #main --> 74 75 {{tpl:include src="_sidebar.html"}} 76 77 </div> <!-- End #wrapper --> 78 79 {{tpl:include src="_footer.html"}} 80 </div> <!-- End #page --> 81 </body> 82 </html> 64 <p class="navlinks"> 65 <tpl:EntryPrevious><a href="{{tpl:EntryURL}}" 66 title="{{tpl:EntryTitle encode_html="1"}}" class="prev">« {{tpl:EntryTitle encode_html="1" 67 cut_string="50"}}</a></tpl:EntryPrevious> 68 <tpl:EntryNext> <span>-</span> <a href="{{tpl:EntryURL}}" 69 title="{{tpl:EntryTitle encode_html="1"}}" class="next">{{tpl:EntryTitle encode_html="1" 70 cut_string="50"}} »</a></tpl:EntryNext> 71 </p> 72 </tpl:Block> -
inc/public/default-templates/currywurst/search.html
r2603 r2675 1 <!DOCTYPE html> 2 <html lang="{{tpl:BlogLanguage}}"> 3 <head> 4 <meta charset="UTF-8" /> 1 {{tpl:extends parent="__layout.html"}} 2 3 <tpl:Block name="head-title">{{tpl:lang Search}} - {{tpl:SysSearchString encode_html="1"}} - {{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf></tpl:Block> 4 5 <tpl:Block name="head-meta"> 5 6 <meta name="ROBOTS" content="{{tpl:BlogMetaRobots robots="NOINDEX,NOARCHIVE"}}" /> 6 7 <title>{{tpl:lang Search}} - {{tpl:SysSearchString encode_html="1"}} - {{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf></title>8 7 <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 9 8 <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" /> 10 9 <meta name="date" content="{{tpl:BlogUpdateDate iso8601="1"}}" /> 10 </tpl:Block> 11 11 12 <tpl:Block name="head-dc"> 12 13 <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" /> 13 14 <meta property="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Search}} - {{tpl:SysSearchString encode_html="1"}} - {{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf>" /> … … 18 19 <meta property="dc.type" content="text" /> 19 20 <meta property="dc.format" content="text/html" /> 21 </tpl:Block> 20 22 23 <tpl:Block name="head-linkrel"> 21 24 <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 22 25 <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" /> 23 24 26 <tpl:Entries no_content="1"> 25 27 <tpl:EntriesHeader> … … 28 30 <link rel="prev" title="{{tpl:lang previous entries}}" href="{{tpl:PaginationURL offset="1"}}" /> 29 31 </tpl:PaginationIf> 30 31 32 <tpl:PaginationIf start="0"> 32 33 <link rel="next" title="{{tpl:lang next entries}}" href="{{tpl:PaginationURL offset="-1"}}" /> … … 34 35 </tpl:Pagination> 35 36 </tpl:EntriesHeader> 36 37 37 <link rel="chapter" href="{{tpl:EntryURL}}" title="{{tpl:EntryTitle encode_html="1"}}" /> 38 38 </tpl:Entries> 39 <link rel="meta" type="application/xbel+xml" title="Blogroll" href="{{tpl:BlogrollXbelLink}}" /> 40 </tpl:Block> 39 41 40 <link rel="meta" type="application/xbel+xml" title="Blogroll" href="{{tpl:BlogrollXbelLink}}" />42 <tpl:Block name="body-attr">class="dc-search"</tpl:Block> 41 43 42 {{tpl:include src="_head.html"}} 43 </head> 44 <body class="dc-search"> 45 <div id="page"> 46 {{tpl:include src="_top.html"}} 44 <tpl:Block name="main-content"> 45 <div id="content-info"> 46 <h2>{{tpl:lang Search}}</h2> 47 <tpl:SysIf search_count="==0"> 48 <p>{{tpl:SysSearchString encode_html="1" string="Your search for <em>%1$s</em> returned no result."}}</p> 49 </tpl:SysIf> 50 <tpl:SysIf search_count="==1"> 51 <p>{{tpl:SysSearchString encode_html="1" string="Your search for <em>%1$s</em> returned <strong>%2$s</strong> result."}}</p> 52 </tpl:SysIf> 53 <tpl:SysIf search_count=">1"> 54 <p>{{tpl:SysSearchString encode_html="1" string="Your search for <em>%1$s</em> returned <strong>%2$s</strong> results."}}</p> 55 </tpl:SysIf> 56 </div> 47 57 48 <div id="wrapper"> 58 <div class="content-inner"> 59 <tpl:Entries type="post,page"> 49 60 50 <div id="main" role="main"> 51 <div id="content"> 61 {{tpl:include src="_entry-short.html"}} 52 62 53 <div id="content-info"> 54 <h2>{{tpl:lang Search}}</h2> 55 <tpl:SysIf search_count="==0"> 56 <p>{{tpl:SysSearchString encode_html="1" string="Your search for <em>%1$s</em> returned no result."}}</p> 57 </tpl:SysIf> 58 <tpl:SysIf search_count="==1"> 59 <p>{{tpl:SysSearchString encode_html="1" string="Your search for <em>%1$s</em> returned <strong>%2$s</strong> result."}}</p> 60 </tpl:SysIf> 61 <tpl:SysIf search_count=">1"> 62 <p>{{tpl:SysSearchString encode_html="1" string="Your search for <em>%1$s</em> returned <strong>%2$s</strong> results."}}</p> 63 </tpl:SysIf> 64 </div> 65 66 <div class="content-inner"> 67 <tpl:Entries type="post,page"> 68 69 {{tpl:include src="_entry-short.html"}} 70 71 <tpl:EntriesFooter> 72 <tpl:Pagination> 73 <p class="pagination"> 74 <tpl:PaginationIf end="0"> 75 <a href="{{tpl:PaginationURL offset="+1"}}" class="prev">« {{tpl:lang previous entries}}</a> - 76 </tpl:PaginationIf> 77 {{tpl:lang page}} {{tpl:PaginationCurrent}} {{tpl:lang of}} {{tpl:PaginationCounter}} 78 <tpl:PaginationIf start="0"> 79 - <a href="{{tpl:PaginationURL offset="-1"}}" class="next">{{tpl:lang next entries}} »</a> 80 </tpl:PaginationIf> 81 </p> 82 </tpl:Pagination> 83 </tpl:EntriesFooter> 84 </tpl:Entries> 85 </div> <!-- End #content-inner --> 86 </div> <!-- End #content --> 87 </div> <!-- End #main --> 88 89 {{tpl:include src="_sidebar.html"}} 90 91 </div> <!-- End #wrapper --> 92 93 {{tpl:include src="_footer.html"}} 94 </div> <!-- End #page --> 95 </body> 96 </html> 63 <tpl:EntriesFooter> 64 <tpl:Pagination> 65 <p class="pagination"> 66 <tpl:PaginationIf end="0"> 67 <a href="{{tpl:PaginationURL offset="+1"}}" class="prev">« {{tpl:lang previous entries}}</a> - 68 </tpl:PaginationIf> 69 {{tpl:lang page}} {{tpl:PaginationCurrent}} {{tpl:lang of}} {{tpl:PaginationCounter}} 70 <tpl:PaginationIf start="0"> 71 - <a href="{{tpl:PaginationURL offset="-1"}}" class="next">{{tpl:lang next entries}} »</a> 72 </tpl:PaginationIf> 73 </p> 74 </tpl:Pagination> 75 </tpl:EntriesFooter> 76 </tpl:Entries> 77 </div> <!-- End #content-inner --> 78 </tpl:Block> -
inc/public/lib.tpl.context.php
r2639 r2676 100 100 101 101 102 # Static methods 103 public static function global_filter($str, 104 $encode_xml, $remove_html, $cut_string, $lower_case, $upper_case ,$tag='') 105 { 106 $args = func_get_args(); 107 array_pop($args); 108 $args[0] =& $str; 109 110 # --BEHAVIOR-- publicBeforeContentFilter 111 $res = $GLOBALS['core']->callBehavior('publicBeforeContentFilter',$GLOBALS['core'],$tag,$args); 112 113 if ($remove_html) { 114 $str = self::remove_html($str); 115 $str = preg_replace('/\s+/',' ',$str); 116 } 117 118 if ($encode_xml) { 119 $str = self::encode_xml($str); 120 } 121 122 if ($cut_string) { 123 $str = self::cut_string($str,(integer) $cut_string); 124 } 125 126 if ($lower_case) { 127 $str = self::lower_case($str); 128 } elseif ($upper_case) { 129 if ($upper_case == 2) { 130 $str = self::capitalize($str); 131 } else { 132 $str = self::upper_case($str); 133 } 134 } 135 136 # --BEHAVIOR-- publicAfterContentFilter 137 $res = $GLOBALS['core']->callBehavior('publicAfterContentFilter',$GLOBALS['core'],$tag,$args); 138 139 return $str; 140 } 141 102 # Static methods 103 public static function global_filter($str, 104 $encode_xml, $remove_html, $cut_string, $lower_case, $upper_case ,$encode_url ,$tag='') 105 { 106 $args = func_get_args(); 107 array_pop($args); 108 $args[0] =& $str; 109 110 # --BEHAVIOR-- publicBeforeContentFilter 111 $res = $GLOBALS['core']->callBehavior('publicBeforeContentFilter',$GLOBALS['core'],$tag,$args); 112 113 if ($remove_html) { 114 $str = self::remove_html($str); 115 $str = preg_replace('/\s+/',' ',$str); 116 } 117 118 if ($encode_xml) { 119 $str = self::encode_xml($str); 120 } 121 122 if ($cut_string) { 123 $str = self::cut_string($str,(integer) $cut_string); 124 } 125 126 if ($lower_case) { 127 $str = self::lower_case($str); 128 } elseif ($upper_case) { 129 if ($upper_case == 2) { 130 $str = self::capitalize($str); 131 } else { 132 $str = self::upper_case($str); 133 } 134 } 135 if ($encode_url) { 136 $str = self::encode_url($str); 137 } 138 139 # --BEHAVIOR-- publicAfterContentFilter 140 $res = $GLOBALS['core']->callBehavior('publicAfterContentFilter',$GLOBALS['core'],$tag,$args); 141 142 return $str; 143 } 144 145 public static function encode_url($str) 146 { 147 return urlencode($str); 148 } 142 149 143 150 public static function cut_string($str,$l) … … 304 311 if (isset($GLOBALS['__theme'])) { 305 312 $path[] = $GLOBALS['__theme']; 313 if (isset($GLOBALS['__parent_theme'])) { 314 $path[] = $GLOBALS['__parent_theme']; 315 } 306 316 } 307 317 $path[] = 'default'; -
locales/bn/main.po
r2432 r2666 676 676 msgstr "এই এন্ট্রিটি নেই।" 677 677 678 msgid "No comment "678 msgid "No comments" 679 679 msgstr "শূণ্য মন্তব্য" 680 680 -
locales/bn/public.po
r221 r2666 42 42 msgstr "বিস্তারিত" 43 43 44 msgid "no comment "44 msgid "no comments" 45 45 msgstr "শূণ্য মন্তব্য" 46 46 -
locales/ca/main.po
r2432 r2666 703 703 msgstr "" 704 704 705 msgid "No comment "705 msgid "No comments" 706 706 msgstr "Sense comentaris" 707 707 -
locales/ca/public.po
r221 r2666 41 41 msgstr "Continuar llegint" 42 42 43 msgid "no comment "43 msgid "no comments" 44 44 msgstr "Sense comentaris" 45 45 -
locales/cs/main.po
r2432 r2666 675 675 msgstr "Položka neexistuje!" 676 676 677 msgid "No comment "677 msgid "No comments" 678 678 msgstr "Žádné komentáře" 679 679 -
locales/cs/public.po
r221 r2666 43 43 msgstr "Číst dál..." 44 44 45 msgid "no comment "45 msgid "no comments" 46 46 msgstr "žádné komentáře" 47 47 -
locales/da/main.po
r2432 r2666 677 677 msgstr "Indlægget eksisterer ikke." 678 678 679 msgid "No comment "679 msgid "No comments" 680 680 msgstr "Ingen kommentar" 681 681 -
locales/da/public.po
r221 r2666 42 42 msgstr "" 43 43 44 msgid "no comment "44 msgid "no comments" 45 45 msgstr "" 46 46 -
locales/de/main.po
r2432 r2666 674 674 msgstr "Eintrag existiert nicht." 675 675 676 msgid "No comment "676 msgid "No comments" 677 677 msgstr "Kein Kommentar" 678 678 -
locales/de/public.po
r759 r2666 43 43 msgstr "Weiterlesen" 44 44 45 msgid "no comment "45 msgid "no comments" 46 46 msgstr "Kein Kommentar" 47 47 -
locales/en/main.po
r2487 r2666 763 763 msgstr "" 764 764 765 msgid "No comment "765 msgid "No comments" 766 766 msgstr "" 767 767 -
locales/en/public.po
r2285 r2666 43 43 msgstr "" 44 44 45 msgid "no comment "45 msgid "no comments" 46 46 msgstr "" 47 47 -
locales/eo/main.po
r2432 r2666 667 667 msgstr "" 668 668 669 msgid "No comment "669 msgid "No comments" 670 670 msgstr "" 671 671 -
locales/eo/public.po
r221 r2666 42 42 msgstr "Legi plu" 43 43 44 msgid "no comment "44 msgid "no comments" 45 45 msgstr "neniu komento" 46 46 -
locales/es-ar/main.po
r2432 r2666 678 678 msgstr "La entrada no existe." 679 679 680 msgid "No comment "680 msgid "No comments" 681 681 msgstr "Ningún comentario" 682 682 -
locales/es-ar/public.po
r221 r2666 42 42 msgstr "Continuar leyendo" 43 43 44 msgid "no comment "44 msgid "no comments" 45 45 msgstr "sin comentarios" 46 46 -
locales/es/main.po
r2432 r2666 680 680 msgstr "La entrada no existe." 681 681 682 msgid "No comment "682 msgid "No comments" 683 683 msgstr "Ningún comentario" 684 684 -
locales/es/public.po
r221 r2666 45 45 msgstr "Seguir leyendo" 46 46 47 msgid "no comment "47 msgid "no comments" 48 48 msgstr "sin comentarios" 49 49 -
locales/eu/main.po
r2432 r2666 667 667 msgstr "" 668 668 669 msgid "No comment "669 msgid "No comments" 670 670 msgstr "" 671 671 -
locales/eu/public.po
r221 r2666 41 41 msgstr "Jarraitu irakurketa" 42 42 43 msgid "no comment "43 msgid "no comments" 44 44 msgstr "iruzkinik ez " 45 45 -
locales/fr/main.po
r2577 r2679 771 771 msgstr "Le commentaire a été créé." 772 772 773 msgid "No comment "773 msgid "No comments" 774 774 msgstr "Aucun commentaire" 775 775 … … 2030 2030 msgstr "Édition" 2031 2031 2032 msgid "Preferred editor:" 2033 msgstr "Editeur préféré :" 2034 2032 2035 msgid "Preferred format:" 2033 2036 msgstr "Format d'édition préféré :" -
locales/fr/plugins.po
r2647 r2663 1992 1992 msgstr "Du jeu de template :" 1993 1993 1994 msgid "Reset" 1995 msgstr "Réinitialiser" 1996 1997 msgid "Are you sure you want to reset this file?" 1998 msgstr "Êtes-vous sûr de vouloir réinitialiser ce fichier ?" 1999 2000 msgid "The file has been reset." 2001 msgstr "Le fichier a été réinitialisé." 2002 1994 2003 #~ msgid "RSS or Atom feed subscription links" 1995 2004 #~ msgstr "Liens d'abonnement aux flux RSS ou Atom" -
locales/fr/public.po
r2503 r2666 41 41 msgstr "Lire la suite" 42 42 43 msgid "no comment "43 msgid "no comments" 44 44 msgstr "aucun commentaire" 45 45 -
locales/hu/main.po
r2432 r2666 698 698 msgstr "A bejegyzés nem létezik." 699 699 700 msgid "No comment "700 msgid "No comments" 701 701 msgstr "Nincs hozzászólás" 702 702 -
locales/hu/public.po
r221 r2666 43 43 msgstr "Folytatás" 44 44 45 msgid "no comment "45 msgid "no comments" 46 46 msgstr "nincs hozzászólás" 47 47 -
locales/it/main.po
r2432 r2666 674 674 msgstr "Questo articolo non esiste." 675 675 676 msgid "No comment "676 msgid "No comments" 677 677 msgstr "Nessun commento" 678 678 -
locales/it/public.po
r221 r2666 42 42 msgstr "Continua lettura" 43 43 44 msgid "no comment "44 msgid "no comments" 45 45 msgstr "nessuno commento" 46 46 -
locales/ja/main.po
r2432 r2666 683 683 msgstr "エントリは存在しません。" 684 684 685 msgid "No comment "685 msgid "No comments" 686 686 msgstr "コメントはありません" 687 687 -
locales/ja/public.po
r221 r2666 43 43 msgstr "続きを読む -" 44 44 45 msgid "no comment "45 msgid "no comments" 46 46 msgstr "コメント(0)" 47 47 -
locales/ko/main.po
r2432 r2666 682 682 msgstr "존재하지 않는 글꼭지입니다." 683 683 684 msgid "No comment "684 msgid "No comments" 685 685 msgstr "댓글이 없습니다." 686 686 -
locales/lt/main.po
r2432 r2666 643 643 msgstr "Įrašas neegzistuoja." 644 644 645 msgid "No comment "645 msgid "No comments" 646 646 msgstr "Komentarų nėra." 647 647 -
locales/lt/public.po
r813 r2666 42 42 msgstr "Skaityti toliau" 43 43 44 msgid "no comment "44 msgid "no comments" 45 45 msgstr "komentarų nėra" 46 46 -
locales/nl/main.po
r2432 r2666 670 670 msgstr "" 671 671 672 msgid "No comment "672 msgid "No comments" 673 673 msgstr "" 674 674 -
locales/nl/public.po
r820 r2666 43 43 msgstr "Lees verder" 44 44 45 msgid "no comment "45 msgid "no comments" 46 46 msgstr "geen comments" 47 47 -
locales/oc/main.po
r2432 r2666 674 674 msgstr "" 675 675 676 msgid "No comment "676 msgid "No comments" 677 677 msgstr "" 678 678 -
locales/oc/public.po
r221 r2666 41 41 msgstr "" 42 42 43 msgid "no comment "43 msgid "no comments" 44 44 msgstr "0 comentaris" 45 45 -
locales/pl/main.po
r2432 r2666 671 671 msgstr "Wpis nie istnieje." 672 672 673 msgid "No comment "673 msgid "No comments" 674 674 msgstr "Brak komentarzy" 675 675 -
locales/pl/public.po
r516 r2666 42 42 msgstr "Kontynuuj czytanie" 43 43 44 msgid "no comment "44 msgid "no comments" 45 45 msgstr "brak komentarzy" 46 46 -
locales/pt-br/main.po
r2432 r2666 706 706 msgstr "Este post não existe." 707 707 708 msgid "No comment "708 msgid "No comments" 709 709 msgstr "Nenhum comentário" 710 710 -
locales/pt-br/public.po
r221 r2666 42 42 msgstr "Continue a leitura" 43 43 44 msgid "no comment "44 msgid "no comments" 45 45 msgstr "nenhum comentário" 46 46 -
locales/pt/main.po
r2432 r2666 679 679 msgstr "A entrada não existe." 680 680 681 msgid "No comment "681 msgid "No comments" 682 682 msgstr "Sem comentário" 683 683 -
locales/pt/public.po
r221 r2666 44 44 msgstr "Continuar leitura" 45 45 46 msgid "no comment "46 msgid "no comments" 47 47 msgstr "sem comentário" 48 48 -
locales/ro/main.po
r2432 r2666 669 669 msgstr "" 670 670 671 msgid "No comment "671 msgid "No comments" 672 672 msgstr "" 673 673 -
locales/ro/public.po
r834 r2666 43 43 msgstr "Citește în continuare" 44 44 45 msgid "no comment "45 msgid "no comments" 46 46 msgstr "niciun comentariu" 47 47 -
locales/ru/main.po
r2432 r2666 678 678 msgstr "Эта запись не существует." 679 679 680 msgid "No comment "680 msgid "No comments" 681 681 msgstr "Нет комментариев" 682 682 -
locales/ru/public.po
r221 r2666 40 40 msgstr "Читать дальше" 41 41 42 msgid "no comment "42 msgid "no comments" 43 43 msgstr "нет комментариев" 44 44 -
locales/sr/main.po
r2432 r2666 695 695 msgstr "Ce billet n'existe pas." 696 696 697 msgid "No comment "697 msgid "No comments" 698 698 msgstr "Aucun commentaire" 699 699 -
locales/sr/public.po
r221 r2666 42 42 msgstr "" 43 43 44 msgid "no comment "44 msgid "no comments" 45 45 msgstr "" 46 46 -
locales/sv/main.po
r2432 r2666 667 667 msgstr "" 668 668 669 msgid "No comment "669 msgid "No comments" 670 670 msgstr "" 671 671 -
locales/sv/public.po
r221 r2666 42 42 msgstr "" 43 43 44 msgid "no comment "44 msgid "no comments" 45 45 msgstr "" 46 46 -
locales/te/main.po
r2432 r2666 692 692 msgstr "టపా లేనే లేదు." 693 693 694 msgid "No comment "694 msgid "No comments" 695 695 msgstr "వ్యాఖ్యలు లేవు" 696 696 -
locales/te/public.po
r221 r2666 41 41 msgstr "చదవడం కొనసాగించండి" 42 42 43 msgid "no comment "43 msgid "no comments" 44 44 msgstr "వ్యాఖ్యలు లేవు" 45 45 -
locales/tr/main.po
r2432 r2666 678 678 msgstr "Yazı mevcut değil." 679 679 680 msgid "No comment "680 msgid "No comments" 681 681 msgstr "Ahkam yok" 682 682 -
locales/tr/public.po
r221 r2666 39 39 msgstr "Tamamını oku" 40 40 41 msgid "no comment "41 msgid "no comments" 42 42 msgstr "ahkam yok" 43 43 -
locales/zh-cn/main.po
r2432 r2666 676 676 msgstr "文章不存在。" 677 677 678 msgid "No comment "678 msgid "No comments" 679 679 msgstr "没有评论" 680 680 -
locales/zh-cn/public.po
r253 r2666 42 42 msgstr "继续阅读" 43 43 44 msgid "no comment "44 msgid "no comments" 45 45 msgstr "没有评论" 46 46 -
plugins/blogroll/_define.php
r2566 r2662 16 16 /* Description*/ "Manage your blogroll", 17 17 /* Author */ "Olivier Meunier", 18 /* Version */ '1. 3.1',18 /* Version */ '1.4', 19 19 array( 20 20 'permissions' => 'blogroll', -
plugins/blogroll/_public.php
r2566 r2667 145 145 } 146 146 147 $links = self::getList( '<h3>%s</h3>','<ul>%s</ul>','<li%2$s>%1$s</li>',$w->category);147 $links = self::getList($w->renderSubtitle('',false),'<ul>%s</ul>','<li%2$s>%1$s</li>',$w->category); 148 148 149 149 if (empty($links)) { … … 151 151 } 152 152 153 return 154 ($w->content_only ? '' : '<div class="links'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 155 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 156 $links. 157 ($w->content_only ? '' : '</div>'); 153 return $w->renderDiv($w->content_only,'links '.$w->class,'', 154 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 155 $links); 158 156 } 159 157 } -
plugins/blowupConfig/index.php
r2566 r2657 108 108 { 109 109 $blowup_user['body_txt_f'] = $_POST['body_txt_f']; 110 $blowup_user['body_txt_s'] = blowupConfig::adjustFontSize($_POST['body_txt_s']);111 $blowup_user['body_txt_c'] = blowupConfig::adjustColor($_POST['body_txt_c']);112 $blowup_user['body_line_height'] = blowupConfig::adjustFontSize($_POST['body_line_height']);110 $blowup_user['body_txt_s'] = dcThemeConfig::adjustFontSize($_POST['body_txt_s']); 111 $blowup_user['body_txt_c'] = dcThemeConfig::adjustColor($_POST['body_txt_c']); 112 $blowup_user['body_line_height'] = dcThemeConfig::adjustFontSize($_POST['body_line_height']); 113 113 114 114 $blowup_user['blog_title_hide'] = (integer) !empty($_POST['blog_title_hide']); … … 122 122 { 123 123 $blowup_user['blog_title_f'] = $_POST['blog_title_f']; 124 $blowup_user['blog_title_s'] = blowupConfig::adjustFontSize($_POST['blog_title_s']);125 $blowup_user['blog_title_c'] = blowupConfig::adjustColor($_POST['blog_title_c']);124 $blowup_user['blog_title_s'] = dcThemeConfig::adjustFontSize($_POST['blog_title_s']); 125 $blowup_user['blog_title_c'] = dcThemeConfig::adjustColor($_POST['blog_title_c']); 126 126 $blowup_user['blog_title_a'] = preg_match('/^(left|center|right)$/',$_POST['blog_title_a']) ? $_POST['blog_title_a'] : null; 127 $blowup_user['blog_title_p'] = blowupConfig::adjustPosition($_POST['blog_title_p']);127 $blowup_user['blog_title_p'] = dcThemeConfig::adjustPosition($_POST['blog_title_p']); 128 128 } 129 129 130 $blowup_user['body_link_c'] = blowupConfig::adjustColor($_POST['body_link_c']);131 $blowup_user['body_link_f_c'] = blowupConfig::adjustColor($_POST['body_link_f_c']);132 $blowup_user['body_link_v_c'] = blowupConfig::adjustColor($_POST['body_link_v_c']);130 $blowup_user['body_link_c'] = dcThemeConfig::adjustColor($_POST['body_link_c']); 131 $blowup_user['body_link_f_c'] = dcThemeConfig::adjustColor($_POST['body_link_f_c']); 132 $blowup_user['body_link_v_c'] = dcThemeConfig::adjustColor($_POST['body_link_v_c']); 133 133 134 134 $blowup_user['sidebar_text_f'] = $_POST['sidebar_text_f']; 135 $blowup_user['sidebar_text_s'] = blowupConfig::adjustFontSize($_POST['sidebar_text_s']);136 $blowup_user['sidebar_text_c'] = blowupConfig::adjustColor($_POST['sidebar_text_c']);135 $blowup_user['sidebar_text_s'] = dcThemeConfig::adjustFontSize($_POST['sidebar_text_s']); 136 $blowup_user['sidebar_text_c'] = dcThemeConfig::adjustColor($_POST['sidebar_text_c']); 137 137 $blowup_user['sidebar_title_f'] = $_POST['sidebar_title_f']; 138 $blowup_user['sidebar_title_s'] = blowupConfig::adjustFontSize($_POST['sidebar_title_s']);139 $blowup_user['sidebar_title_c'] = blowupConfig::adjustColor($_POST['sidebar_title_c']);138 $blowup_user['sidebar_title_s'] = dcThemeConfig::adjustFontSize($_POST['sidebar_title_s']); 139 $blowup_user['sidebar_title_c'] = dcThemeConfig::adjustColor($_POST['sidebar_title_c']); 140 140 $blowup_user['sidebar_title2_f'] = $_POST['sidebar_title2_f']; 141 $blowup_user['sidebar_title2_s'] = blowupConfig::adjustFontSize($_POST['sidebar_title2_s']);142 $blowup_user['sidebar_title2_c'] = blowupConfig::adjustColor($_POST['sidebar_title2_c']);143 $blowup_user['sidebar_line_c'] = blowupConfig::adjustColor($_POST['sidebar_line_c']);144 $blowup_user['sidebar_link_c'] = blowupConfig::adjustColor($_POST['sidebar_link_c']);145 $blowup_user['sidebar_link_f_c'] = blowupConfig::adjustColor($_POST['sidebar_link_f_c']);146 $blowup_user['sidebar_link_v_c'] = blowupConfig::adjustColor($_POST['sidebar_link_v_c']);141 $blowup_user['sidebar_title2_s'] = dcThemeConfig::adjustFontSize($_POST['sidebar_title2_s']); 142 $blowup_user['sidebar_title2_c'] = dcThemeConfig::adjustColor($_POST['sidebar_title2_c']); 143 $blowup_user['sidebar_line_c'] = dcThemeConfig::adjustColor($_POST['sidebar_line_c']); 144 $blowup_user['sidebar_link_c'] = dcThemeConfig::adjustColor($_POST['sidebar_link_c']); 145 $blowup_user['sidebar_link_f_c'] = dcThemeConfig::adjustColor($_POST['sidebar_link_f_c']); 146 $blowup_user['sidebar_link_v_c'] = dcThemeConfig::adjustColor($_POST['sidebar_link_v_c']); 147 147 148 148 $blowup_user['sidebar_position'] = ($_POST['sidebar_position'] == 'left') ? 'left' : null; 149 149 150 150 $blowup_user['date_title_f'] = $_POST['date_title_f']; 151 $blowup_user['date_title_s'] = blowupConfig::adjustFontSize($_POST['date_title_s']);152 $blowup_user['date_title_c'] = blowupConfig::adjustColor($_POST['date_title_c']);151 $blowup_user['date_title_s'] = dcThemeConfig::adjustFontSize($_POST['date_title_s']); 152 $blowup_user['date_title_c'] = dcThemeConfig::adjustColor($_POST['date_title_c']); 153 153 154 154 $blowup_user['post_title_f'] = $_POST['post_title_f']; 155 $blowup_user['post_title_s'] = blowupConfig::adjustFontSize($_POST['post_title_s']);156 $blowup_user['post_title_c'] = blowupConfig::adjustColor($_POST['post_title_c']);157 $blowup_user['post_comment_c'] = blowupConfig::adjustColor($_POST['post_comment_c']);158 $blowup_user['post_commentmy_c'] = blowupConfig::adjustColor($_POST['post_commentmy_c']);155 $blowup_user['post_title_s'] = dcThemeConfig::adjustFontSize($_POST['post_title_s']); 156 $blowup_user['post_title_c'] = dcThemeConfig::adjustColor($_POST['post_title_c']); 157 $blowup_user['post_comment_c'] = dcThemeConfig::adjustColor($_POST['post_comment_c']); 158 $blowup_user['post_commentmy_c'] = dcThemeConfig::adjustColor($_POST['post_commentmy_c']); 159 159 160 160 161 161 $blowup_user['footer_f'] = $_POST['footer_f']; 162 $blowup_user['footer_s'] = blowupConfig::adjustFontSize($_POST['footer_s']);163 $blowup_user['footer_c'] = blowupConfig::adjustColor($_POST['footer_c']);164 $blowup_user['footer_l_c'] = blowupConfig::adjustColor($_POST['footer_l_c']);165 $blowup_user['footer_bg_c'] = blowupConfig::adjustColor($_POST['footer_bg_c']);166 167 168 $blowup_user['extra_css'] = blowupConfig::cleanCSS($_POST['extra_css']);162 $blowup_user['footer_s'] = dcThemeConfig::adjustFontSize($_POST['footer_s']); 163 $blowup_user['footer_c'] = dcThemeConfig::adjustColor($_POST['footer_c']); 164 $blowup_user['footer_l_c'] = dcThemeConfig::adjustColor($_POST['footer_l_c']); 165 $blowup_user['footer_bg_c'] = dcThemeConfig::adjustColor($_POST['footer_bg_c']); 166 167 168 $blowup_user['extra_css'] = dcThemeConfig::cleanCSS($_POST['extra_css']); 169 169 170 170 if ($can_write_images) … … 183 183 $blowup_user['top_image'] = in_array($_POST['top_image'],$top_images) ? $_POST['top_image'] : 'default'; 184 184 185 $blowup_user['body_bg_c'] = blowupConfig::adjustColor($_POST['body_bg_c']);185 $blowup_user['body_bg_c'] = dcThemeConfig::adjustColor($_POST['body_bg_c']); 186 186 $blowup_user['body_bg_g'] = in_array($_POST['body_bg_g'],$gradient_types) ? $_POST['body_bg_g'] : ''; 187 $blowup_user['post_comment_bg_c'] = blowupConfig::adjustColor($_POST['post_comment_bg_c']);188 $blowup_user['post_commentmy_bg_c'] = blowupConfig::adjustColor($_POST['post_commentmy_bg_c']);189 $blowup_user['prelude_c'] = blowupConfig::adjustColor($_POST['prelude_c']);187 $blowup_user['post_comment_bg_c'] = dcThemeConfig::adjustColor($_POST['post_comment_bg_c']); 188 $blowup_user['post_commentmy_bg_c'] = dcThemeConfig::adjustColor($_POST['post_commentmy_bg_c']); 189 $blowup_user['prelude_c'] = dcThemeConfig::adjustColor($_POST['prelude_c']); 190 190 blowupConfig::createImages($blowup_user,$uploaded); 191 191 } -
plugins/blowupConfig/lib/class.blowup.config.php
r2566 r2659 14 14 class blowupConfig 15 15 { 16 protected static $css_folder = 'blowup-css'; 17 protected static $img_folder = 'blowup-images'; 18 16 19 protected static $fonts = array( 17 20 'sans-serif' => array( … … 90 93 } 91 94 92 public static function adjustFontSize($s)93 {94 if (preg_match('/^([0-9.]+)\s*(%|pt|px|em|ex)?$/',$s,$m)) {95 if (empty($m[2])) {96 $m[2] = 'px';97 }98 return $m[1].$m[2];99 }100 101 return null;102 }103 104 public static function adjustPosition($p)105 {106 if (!preg_match('/^[0-9]+(:[0-9]+)?$/',$p)) {107 return null;108 }109 110 $p = explode(':',$p);111 112 return $p[0].(count($p) == 1 ? ':0' : ':'.$p[1]);113 }114 115 public static function adjustColor($c)116 {117 if ($c === '') {118 return '';119 }120 121 $c = strtoupper($c);122 123 if (preg_match('/^[A-F0-9]{3,6}$/',$c)) {124 $c = '#'.$c;125 }126 127 if (preg_match('/^#[A-F0-9]{6}$/',$c)) {128 return $c;129 }130 131 if (preg_match('/^#[A-F0-9]{3,}$/',$c)) {132 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);133 }134 135 return '';136 }137 138 public static function cleanCSS($css)139 {140 // TODO ?141 return $css;142 }143 144 95 public static function cssPath() 145 96 { 146 global $core; 147 return path::real($core->blog->public_path).'/blowup-css'; 97 return dcThemeConfig::cssPath(self::$css_folder); 148 98 } 149 99 150 100 public static function cssURL() 151 101 { 152 global $core; 153 return $core->blog->settings->system->public_url.'/blowup-css'; 102 return dcThemeConfig::cssURL(self::$css_folder); 154 103 } 155 104 156 105 public static function canWriteCss($create=false) 157 106 { 158 global $core; 159 160 $public = path::real($core->blog->public_path); 161 $css = self::cssPath(); 162 163 if (!is_dir($public)) { 164 $core->error->add(__('The \'public\' directory does not exist.')); 165 return false; 166 } 167 168 if (!is_dir($css)) { 169 if (!is_writable($public)) { 170 $core->error->add(sprintf(__('The \'%s\' directory cannot be modified.'),'public')); 171 return false; 172 } 173 if ($create) { 174 files::makeDir($css); 175 } 176 return true; 177 } 178 179 if (!is_writable($css)) { 180 $core->error->add(sprintf(__('The \'%s\' directory cannot be modified.'),'public/blowup-css')); 181 return false; 182 } 183 184 return true; 107 return dcThemeConfig::canWriteCss(self::$css_folder,$create); 108 } 109 110 protected static function backgroundImg(&$css,$selector,$value,$image) 111 { 112 dcThemeConfig::backgroundImg(self::$img_folder,$css,$selector,$value,$image); 113 } 114 115 private static function writeCss($theme,$css) 116 { 117 dcThemeConfig::writeCSS(self::$css_folder,$theme,$css); 118 } 119 120 public static function dropCss($theme) 121 { 122 dcThemeConfig::dropCss(self::$css_folder,$theme); 123 } 124 125 public static function publicCssUrlHelper() 126 { 127 return dcThemeConfig::publicCssUrlHelper(self::$css_folder); 128 } 129 130 public static function imagesPath() 131 { 132 return dcThemeConfig::imagesPath(self::$img_folder); 133 } 134 135 public static function imagesURL() 136 { 137 return dcThemeConfig::imagesURL(self::$img_folder); 138 } 139 140 public static function canWriteImages($create=false) 141 { 142 return dcThemeConfig::canWriteImages(self::$img_folder,$create); 143 } 144 145 public static function uploadImage($f) 146 { 147 return dcThemeConfig::uploadImage(self::$img_folder,$f,800); 148 } 149 150 public static function dropImage($img) 151 { 152 dcThemeConfig::dropImage(self::$img_folder,$img); 185 153 } 186 154 … … 205 173 /* Properties 206 174 ---------------------------------------------- */ 207 self::prop($css,'body','background-color',$s['body_bg_c']);208 209 self::prop($css,'body','color',$s['body_txt_c']);210 self::prop($css,'.post-tags li a:link, .post-tags li a:visited, .post-info-co a:link, .post-info-co a:visited','color',$s['body_txt_c']);211 self::prop($css,'#page','font-size',$s['body_txt_s']);212 self::prop($css,'body','font-family',self::fontDef($s['body_txt_f']));213 214 self::prop($css,'.post-content, .post-excerpt, #comments dd, #pings dd, dd.comment-preview','line-height',$s['body_line_height']);175 dcThemeConfig::prop($css,'body','background-color',$s['body_bg_c']); 176 177 dcThemeConfig::prop($css,'body','color',$s['body_txt_c']); 178 dcThemeConfig::prop($css,'.post-tags li a:link, .post-tags li a:visited, .post-info-co a:link, .post-info-co a:visited','color',$s['body_txt_c']); 179 dcThemeConfig::prop($css,'#page','font-size',$s['body_txt_s']); 180 dcThemeConfig::prop($css,'body','font-family',self::fontDef($s['body_txt_f'])); 181 182 dcThemeConfig::prop($css,'.post-content, .post-excerpt, #comments dd, #pings dd, dd.comment-preview','line-height',$s['body_line_height']); 215 183 216 184 if (!$s['blog_title_hide']) 217 185 { 218 self::prop($css,'#top h1 a','color',$s['blog_title_c']);219 self::prop($css,'#top h1','font-size',$s['blog_title_s']);220 self::prop($css,'#top h1','font-family',self::fontDef($s['blog_title_f']));186 dcThemeConfig::prop($css,'#top h1 a','color',$s['blog_title_c']); 187 dcThemeConfig::prop($css,'#top h1','font-size',$s['blog_title_s']); 188 dcThemeConfig::prop($css,'#top h1','font-family',self::fontDef($s['blog_title_f'])); 221 189 222 190 if ($s['blog_title_a'] == 'right' || $s['blog_title_a'] == 'left') { … … 237 205 else 238 206 { 239 self::prop($css,'#top h1 span','text-indent','-5000px');240 self::prop($css,'#top h1','top','0px');207 dcThemeConfig::prop($css,'#top h1 span','text-indent','-5000px'); 208 dcThemeConfig::prop($css,'#top h1','top','0px'); 241 209 $css['#top h1 a'] = array( 242 210 'display' => 'block', … … 245 213 ); 246 214 } 247 self::prop($css,'#top','height',$s['top_height']);248 249 self::prop($css,'.day-date','color',$s['date_title_c']);250 self::prop($css,'.day-date','font-family',self::fontDef($s['date_title_f']));251 self::prop($css,'.day-date','font-size',$s['date_title_s']);252 253 self::prop($css,'a','color',$s['body_link_c']);254 self::prop($css,'a:visited','color',$s['body_link_v_c']);255 self::prop($css,'a:hover, a:focus, a:active','color',$s['body_link_f_c']);256 257 self::prop($css,'#comment-form input, #comment-form textarea','color',$s['body_link_c']);258 self::prop($css,'#comment-form input.preview','color',$s['body_link_c']);259 self::prop($css,'#comment-form input.preview:hover','background',$s['body_link_f_c']);260 self::prop($css,'#comment-form input.preview:hover','border-color',$s['body_link_f_c']);261 self::prop($css,'#comment-form input.submit','color',$s['body_link_c']);262 self::prop($css,'#comment-form input.submit:hover','background',$s['body_link_f_c']);263 self::prop($css,'#comment-form input.submit:hover','border-color',$s['body_link_f_c']);264 265 self::prop($css,'#sidebar','font-family',self::fontDef($s['sidebar_text_f']));266 self::prop($css,'#sidebar','font-size',$s['sidebar_text_s']);267 self::prop($css,'#sidebar','color',$s['sidebar_text_c']);268 269 self::prop($css,'#sidebar h2','font-family',self::fontDef($s['sidebar_title_f']));270 self::prop($css,'#sidebar h2','font-size',$s['sidebar_title_s']);271 self::prop($css,'#sidebar h2','color',$s['sidebar_title_c']);272 273 self::prop($css,'#sidebar h3','font-family',self::fontDef($s['sidebar_title2_f']));274 self::prop($css,'#sidebar h3','font-size',$s['sidebar_title2_s']);275 self::prop($css,'#sidebar h3','color',$s['sidebar_title2_c']);276 277 self::prop($css,'#sidebar ul','border-top-color',$s['sidebar_line_c']);278 self::prop($css,'#sidebar li','border-bottom-color',$s['sidebar_line_c']);279 self::prop($css,'#topnav ul','border-bottom-color',$s['sidebar_line_c']);280 281 self::prop($css,'#sidebar li a','color',$s['sidebar_link_c']);282 self::prop($css,'#sidebar li a:visited','color',$s['sidebar_link_v_c']);283 self::prop($css,'#sidebar li a:hover, #sidebar li a:focus, #sidebar li a:active','color',$s['sidebar_link_f_c']);284 self::prop($css,'#search input','color',$s['sidebar_link_c']);285 self::prop($css,'#search .submit','color',$s['sidebar_link_c']);286 self::prop($css,'#search .submit:hover','background',$s['sidebar_link_f_c']);287 self::prop($css,'#search .submit:hover','border-color',$s['sidebar_link_f_c']);288 289 self::prop($css,'.post-title','color',$s['post_title_c']);290 self::prop($css,'.post-title a, .post-title a:visited','color',$s['post_title_c']);291 self::prop($css,'.post-title','font-family',self::fontDef($s['post_title_f']));292 self::prop($css,'.post-title','font-size',$s['post_title_s']);293 294 self::prop($css,'#comments dd','background-color',$s['post_comment_bg_c']);295 self::prop($css,'#comments dd','color',$s['post_comment_c']);296 self::prop($css,'#comments dd.me','background-color',$s['post_commentmy_bg_c']);297 self::prop($css,'#comments dd.me','color',$s['post_commentmy_c']);298 299 self::prop($css,'#prelude, #prelude a','color',$s['prelude_c']);300 301 self::prop($css,'#footer p','background-color',$s['footer_bg_c']);302 self::prop($css,'#footer p','color',$s['footer_c']);303 self::prop($css,'#footer p','font-size',$s['footer_s']);304 self::prop($css,'#footer p','font-family',self::fontDef($s['footer_f']));305 self::prop($css,'#footer p a','color',$s['footer_l_c']);215 dcThemeConfig::prop($css,'#top','height',$s['top_height']); 216 217 dcThemeConfig::prop($css,'.day-date','color',$s['date_title_c']); 218 dcThemeConfig::prop($css,'.day-date','font-family',self::fontDef($s['date_title_f'])); 219 dcThemeConfig::prop($css,'.day-date','font-size',$s['date_title_s']); 220 221 dcThemeConfig::prop($css,'a','color',$s['body_link_c']); 222 dcThemeConfig::prop($css,'a:visited','color',$s['body_link_v_c']); 223 dcThemeConfig::prop($css,'a:hover, a:focus, a:active','color',$s['body_link_f_c']); 224 225 dcThemeConfig::prop($css,'#comment-form input, #comment-form textarea','color',$s['body_link_c']); 226 dcThemeConfig::prop($css,'#comment-form input.preview','color',$s['body_link_c']); 227 dcThemeConfig::prop($css,'#comment-form input.preview:hover','background',$s['body_link_f_c']); 228 dcThemeConfig::prop($css,'#comment-form input.preview:hover','border-color',$s['body_link_f_c']); 229 dcThemeConfig::prop($css,'#comment-form input.submit','color',$s['body_link_c']); 230 dcThemeConfig::prop($css,'#comment-form input.submit:hover','background',$s['body_link_f_c']); 231 dcThemeConfig::prop($css,'#comment-form input.submit:hover','border-color',$s['body_link_f_c']); 232 233 dcThemeConfig::prop($css,'#sidebar','font-family',self::fontDef($s['sidebar_text_f'])); 234 dcThemeConfig::prop($css,'#sidebar','font-size',$s['sidebar_text_s']); 235 dcThemeConfig::prop($css,'#sidebar','color',$s['sidebar_text_c']); 236 237 dcThemeConfig::prop($css,'#sidebar h2','font-family',self::fontDef($s['sidebar_title_f'])); 238 dcThemeConfig::prop($css,'#sidebar h2','font-size',$s['sidebar_title_s']); 239 dcThemeConfig::prop($css,'#sidebar h2','color',$s['sidebar_title_c']); 240 241 dcThemeConfig::prop($css,'#sidebar h3','font-family',self::fontDef($s['sidebar_title2_f'])); 242 dcThemeConfig::prop($css,'#sidebar h3','font-size',$s['sidebar_title2_s']); 243 dcThemeConfig::prop($css,'#sidebar h3','color',$s['sidebar_title2_c']); 244 245 dcThemeConfig::prop($css,'#sidebar ul','border-top-color',$s['sidebar_line_c']); 246 dcThemeConfig::prop($css,'#sidebar li','border-bottom-color',$s['sidebar_line_c']); 247 dcThemeConfig::prop($css,'#topnav ul','border-bottom-color',$s['sidebar_line_c']); 248 249 dcThemeConfig::prop($css,'#sidebar li a','color',$s['sidebar_link_c']); 250 dcThemeConfig::prop($css,'#sidebar li a:visited','color',$s['sidebar_link_v_c']); 251 dcThemeConfig::prop($css,'#sidebar li a:hover, #sidebar li a:focus, #sidebar li a:active','color',$s['sidebar_link_f_c']); 252 dcThemeConfig::prop($css,'#search input','color',$s['sidebar_link_c']); 253 dcThemeConfig::prop($css,'#search .submit','color',$s['sidebar_link_c']); 254 dcThemeConfig::prop($css,'#search .submit:hover','background',$s['sidebar_link_f_c']); 255 dcThemeConfig::prop($css,'#search .submit:hover','border-color',$s['sidebar_link_f_c']); 256 257 dcThemeConfig::prop($css,'.post-title','color',$s['post_title_c']); 258 dcThemeConfig::prop($css,'.post-title a, .post-title a:visited','color',$s['post_title_c']); 259 dcThemeConfig::prop($css,'.post-title','font-family',self::fontDef($s['post_title_f'])); 260 dcThemeConfig::prop($css,'.post-title','font-size',$s['post_title_s']); 261 262 dcThemeConfig::prop($css,'#comments dd','background-color',$s['post_comment_bg_c']); 263 dcThemeConfig::prop($css,'#comments dd','color',$s['post_comment_c']); 264 dcThemeConfig::prop($css,'#comments dd.me','background-color',$s['post_commentmy_bg_c']); 265 dcThemeConfig::prop($css,'#comments dd.me','color',$s['post_commentmy_c']); 266 267 dcThemeConfig::prop($css,'#prelude, #prelude a','color',$s['prelude_c']); 268 269 dcThemeConfig::prop($css,'#footer p','background-color',$s['footer_bg_c']); 270 dcThemeConfig::prop($css,'#footer p','color',$s['footer_c']); 271 dcThemeConfig::prop($css,'#footer p','font-size',$s['footer_s']); 272 dcThemeConfig::prop($css,'#footer p','font-family',self::fontDef($s['footer_f'])); 273 dcThemeConfig::prop($css,'#footer p a','color',$s['footer_l_c']); 306 274 307 275 /* Images … … 343 311 } 344 312 345 protected static function prop(&$css,$selector,$prop,$value)346 {347 if ($value) {348 $css[$selector][$prop] = $value;349 }350 }351 352 protected static function backgroundImg(&$css,$selector,$value,$image)353 {354 $file = self::imagesPath().'/'.$image;355 if ($value && file_exists($file)){356 $css[$selector]['background-image'] = 'url('.self::imagesURL().'/'.$image.')';357 }358 }359 360 private static function writeCss($theme,$css)361 {362 file_put_contents(self::cssPath().'/'.$theme.'.css', $css);363 }364 365 public static function dropCss($theme)366 {367 $file = path::real(self::cssPath().'/'.$theme.'.css');368 if (is_writable(dirname($file))) {369 @unlink($file);370 }371 }372 373 public static function publicCssUrlHelper()374 {375 $theme = $GLOBALS['core']->blog->settings->system->theme;376 $url = blowupConfig::cssURL();377 $path = blowupConfig::cssPath();378 379 if (file_exists($path.'/'.$theme.'.css')) {380 return $url.'/'.$theme.'.css';381 }382 383 return null;384 }385 386 public static function imagesPath()387 {388 global $core;389 return path::real($core->blog->public_path).'/blowup-images';390 }391 392 public static function imagesURL()393 {394 global $core;395 return $core->blog->settings->system->public_url.'/blowup-images';396 }397 398 public static function canWriteImages($create=false)399 {400 global $core;401 402 $public = path::real($core->blog->public_path);403 $imgs = self::imagesPath();404 405 if (!function_exists('imagecreatetruecolor') || !function_exists('imagepng') || !function_exists('imagecreatefrompng')) {406 $core->error->add(__('At least one of the following functions is not available: '.407 'imagecreatetruecolor, imagepng & imagecreatefrompng.'));408 return false;409 }410 411 if (!is_dir($public)) {412 $core->error->add(__('The \'public\' directory does not exist.'));413 return false;414 }415 416 if (!is_dir($imgs)) {417 if (!is_writable($public)) {418 $core->error->add(sprintf(__('The \'%s\' directory cannot be modified.'),'public'));419 return false;420 }421 if ($create) {422 files::makeDir($imgs);423 }424 return true;425 }426 427 if (!is_writable($imgs)) {428 $core->error->add(sprintf(__('The \'%s\' directory cannot be modified.'),'public/blowup-images'));429 return false;430 }431 432 return true;433 }434 435 public static function uploadImage($f)436 {437 if (!self::canWriteImages(true)) {438 throw new Exception(__('Unable to create images.'));439 }440 441 $name = $f['name'];442 $type = files::getMimeType($name);443 444 if ($type != 'image/jpeg' && $type != 'image/png') {445 throw new Exception(__('Invalid file type.'));446 }447 448 $dest = self::imagesPath().'/uploaded'.($type == 'image/png' ? '.png' : '.jpg');449 450 if (@move_uploaded_file($f['tmp_name'],$dest) === false) {451 throw new Exception(__('An error occurred while writing the file.'));452 }453 454 $s = getimagesize($dest);455 if ($s[0] != 800) {456 throw new Exception(__('Uploaded image is not 800 pixels wide.'));457 }458 459 return $dest;460 }461 462 313 public static function createImages(&$config,$uploaded) 463 314 { … … 510 361 self::dropImage(basename($comment_b)); 511 362 512 $body_color = self::adjustColor($body_color);513 $prelude_color = self::adjustColor($prelude_color);514 $comment_color = self::adjustColor($comment_color);363 $body_color = dcThemeConfig::adjustColor($body_color); 364 $prelude_color = dcThemeConfig::adjustColor($prelude_color); 365 $comment_color = dcThemeConfig::adjustColor($comment_color); 515 366 516 367 if ($top_image || $body_color || $gradient != 'light' || $prelude_color || $uploaded) … … 657 508 } 658 509 659 public static function dropImage($img)660 {661 $img = path::real(self::imagesPath().'/'.$img);662 if (is_writable(dirname($img))) {663 @unlink($img);664 @unlink(dirname($img).'/.'.basename($img,'.png').'_sq.jpg');665 @unlink(dirname($img).'/.'.basename($img,'.png').'_m.jpg');666 @unlink(dirname($img).'/.'.basename($img,'.png').'_s.jpg');667 @unlink(dirname($img).'/.'.basename($img,'.png').'_sq.jpg');668 @unlink(dirname($img).'/.'.basename($img,'.png').'_t.jpg');669 }670 }671 510 } -
plugins/dcLegacyEditor/_admin.php
r2614 r2679 23 23 24 24 if ($self_ns->active) { 25 $core->addBehavior('adminPostEditor',array('dcLegacyEditorBehaviors','adminPostEditor')); 26 $core->addBehavior('adminPopupMedia',array('dcLegacyEditorBehaviors','adminPopupMedia')); 27 $core->addBehavior('adminPopupLink',array('dcLegacyEditorBehaviors','adminPopupLink')); 28 $core->addBehavior('adminPopupPosts',array('dcLegacyEditorBehaviors','adminPopupPosts')); 25 $wiki2xhtml = new wiki2xhtml(); 26 27 $core->addEditorFormater('dcLegacyEditor','xhtml',create_function('$s','return $s;')); 28 $core->addEditorFormater('dcLegacyEditor','wiki',array($wiki2xhtml,'transform')); 29 30 $core->addBehavior('adminPostEditor',array('dcLegacyEditorBehaviors','adminPostEditor')); 31 $core->addBehavior('adminPopupMedia',array('dcLegacyEditorBehaviors','adminPopupMedia')); 32 $core->addBehavior('adminPopupLink',array('dcLegacyEditorBehaviors','adminPopupLink')); 33 $core->addBehavior('adminPopupPosts',array('dcLegacyEditorBehaviors','adminPopupPosts')); 29 34 } -
plugins/dcLegacyEditor/inc/dc.legacy.editor.behaviors.php
r2614 r2681 15 15 protected static $p_url = 'index.php?pf=dcLegacyEditor'; 16 16 17 public static function adminPostEditor() { 17 public static function adminPostEditor($editor='') { 18 global $core; 19 20 if (!$core->auth->getOption('editor') || $core->auth->getOption('editor')!='dcLegacyEditor') {return;} 21 18 22 return 19 23 self::jsToolBar(). -
plugins/pages/_define.php
r2566 r2662 16 16 /* Description*/ "Serve entries as simple web pages", 17 17 /* Author */ "Olivier Meunier", 18 /* Version */ '1. 3',18 /* Version */ '1.4', 19 19 array( 20 20 'permissions' => 'contentadmin,pages', -
plugins/pages/_public.php
r2635 r2667 268 268 } 269 269 270 $res = 271 ($w->content_only ? '' : '<div class="pages'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 272 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 273 '<ul>'; 270 $res = ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : '').'<ul>'; 274 271 275 272 while ($rs->fetch()) { … … 282 279 } 283 280 284 $res .= '</ul>' .($w->content_only ? '' : '</div>');285 286 return $ res;281 $res .= '</ul>'; 282 283 return $w->renderDiv($w->content_only,'pages '.$w->class,'',$res); 287 284 } 288 285 } -
plugins/pages/_widgets.php
r2566 r2671 44 44 public static function initDefaultWidgets($w,$d) 45 45 { 46 $d[' extra']->append($w->pages);46 $d['nav']->append($w->pages); 47 47 } 48 48 } -
plugins/pages/page.php
r2614 r2666 610 610 showComments($comments,$has_action); 611 611 } else { 612 echo '<p>'.__('No comment ').'</p>';612 echo '<p>'.__('No comments').'</p>'; 613 613 } 614 614 -
plugins/simpleMenu/_define.php
r2576 r2662 16 16 /* Description*/ "Simple menu for Dotclear", 17 17 /* Author */ "Franck Paul", 18 /* Version */ '1. 1.2',18 /* Version */ '1.2', 19 19 array( 20 20 'permissions' => 'admin', -
plugins/simpleMenu/_public.php
r2605 r2667 52 52 } 53 53 54 return 55 ($w->content_only ? '' : '<div class="simple-menu'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 56 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : '').$menu. 57 ($w->content_only ? '' : '</div>'); 54 return $w->renderDiv($w->content_only,'simple-menu '.$w->class,'', 55 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : '').$menu); 58 56 } 59 57 -
plugins/tags/_admin.php
r2566 r2680 40 40 $core->addBehavior('adminPageHelpBlock', array('tagsBehaviors', 'adminPageHelpBlock')); 41 41 42 $core->addBehavior('ckeditorExtraPlugins', array('tagsBehaviors', 'ckeditorExtraPlugins')); 43 42 44 # BEHAVIORS 43 45 class tagsBehaviors 44 46 { 47 public static function ckeditorExtraPlugins(ArrayObject $extraPlugins) 48 { 49 global $core; 50 51 $extraPlugins[] = array( 52 'name' => 'dctags', 53 'button' => 'dcTags', 54 'url' => html::stripHostURL($core->blog->getQmarkURL().'pf=tags/js/ckeditor-tags-plugin.js') 55 ); 56 } 57 45 58 public static function adminPageHelpBlock($blocks) 46 59 { -
plugins/tags/_define.php
r2566 r2662 16 16 /* Description*/ "Tags for posts", 17 17 /* Author */ "Olivier Meunier", 18 /* Version */ '1. 2.1',18 /* Version */ '1.3', 19 19 array( 20 20 'permissions' => 'usage,contentadmin', -
plugins/tags/_public.php
r2607 r2667 234 234 public static function tagsWidget($w) 235 235 { 236 global $core ;236 global $core, $_ctx; 237 237 238 238 if (($w->homeonly == 1 && $core->url->type != 'default') || … … 267 267 268 268 $res = 269 ($w->content_only ? '' : '<div class="tags'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 270 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 269 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 271 270 '<ul>'; 272 271 272 if ($core->url->type == 'post' && $_ctx->posts instanceof record) { 273 $_ctx->meta = $core->meta->getMetaRecordset($_ctx->posts->post_meta,'tag'); 274 } 273 275 while ($rs->fetch()) 274 276 { 277 $class = ''; 278 if ($core->url->type == 'post' && $_ctx->posts instanceof record) { 279 while ($_ctx->meta->fetch()) { 280 if ($_ctx->meta->meta_id == $rs->meta_id) { 281 $class = ' class="tag-current"'; 282 break; 283 } 284 } 285 } 275 286 $res .= 276 '<li ><a href="'.$core->blog->url.$core->url->getURLFor('tag',rawurlencode($rs->meta_id)).'" '.287 '<li'.$class.'><a href="'.$core->blog->url.$core->url->getURLFor('tag',rawurlencode($rs->meta_id)).'" '. 277 288 'class="tag'.$rs->roundpercent.'">'. 278 289 $rs->meta_id.'</a> </li>'; … … 288 299 } 289 300 290 $res .= ($w->content_only ? '' : '</div>'); 291 292 return $res; 301 return $w->renderDiv($w->content_only,'tags '.$w->class,'',$res); 293 302 } 294 303 } -
plugins/themeEditor/_define.php
r2566 r2663 16 16 /* Description*/ "Theme Editor", 17 17 /* Author */ "Olivier Meunier", 18 /* Version */ '1. 0',18 /* Version */ '1.1', 19 19 array( 20 20 'type' => 'plugin' -
plugins/themeEditor/class.themeEditor.php
r2651 r2663 158 158 } 159 159 160 public function deletableFile($type,$f) 161 { 162 if ($type != 'tpl') { 163 // Only tpl files may be deleted 164 return false; 165 } 166 167 $files = $this->getFilesFromType($type); 168 if (isset($files[$f])) { 169 $dest = $this->getDestinationFile($type,$f); 170 if ($dest) { 171 if (file_exists($dest) && is_writable($dest)) { 172 // Is there a model (parent theme or template set) ? 173 if (isset($this->tpl_model[$f])) { 174 return true; 175 } 176 } 177 } 178 } 179 return false; 180 } 181 182 public function deleteFile($type,$f) 183 { 184 if ($type != 'tpl') { 185 // Only tpl files may be deleted 186 return; 187 } 188 189 $files = $this->getFilesFromType($type); 190 if (!isset($files[$f])) { 191 throw new Exception(__('File does not exist.')); 192 } 193 194 try 195 { 196 $dest = $this->getDestinationFile($type,$f); 197 if ($dest) { 198 // File exists and may be deleted 199 unlink($dest); 200 201 // Updating template files list 202 $this->findTemplates(); 203 } 204 } 205 catch (Exception $e) 206 { 207 throw new Exception(sprintf(__('Unable to delete file %s. Please check your theme files and folders permissions.'),$f)); 208 } 209 } 210 160 211 protected function getDestinationFile($type,$f) 161 212 { … … 235 286 $this->tpl = array_merge( 236 287 $this->getFilesInDir($this->tplset_theme), 237 $this->getFilesInDir($this->parent_theme.'/tpl'), 238 $this->getFilesInDir($this->user_theme.'/tpl') 288 $this->getFilesInDir($this->parent_theme.'/tpl') 239 289 ); 290 $this->tpl_model = $this->tpl; 291 292 $this->tpl = array_merge($this->tpl,$this->getFilesInDir($this->user_theme.'/tpl')); 240 293 241 294 # Then we look in 'default-templates' plugins directory … … 243 296 foreach ($plugins as $p) { 244 297 $this->tpl = array_merge($this->getFilesInDir($p['root'].'/default-templates'),$this->tpl); 298 $this->tpl_model = array_merge($this->getFilesInDir($p['root'].'/default-templates'),$this->tpl_model); 245 299 } 246 300 -
plugins/themeEditor/index.php
r2566 r2663 52 52 $o->writeFile($file['type'],$file['f'],$file['c']); 53 53 } 54 55 # Delete file 56 if (!empty($_POST['delete'])) 57 { 58 $o->deleteFile($file['type'],$file['f']); 59 dcPage::addSuccessNotice(__('The file has been deleted.')); 60 http::redirect($p_url.'&'.$file['type'].'='.$file['f']); 61 } 54 62 } 55 63 catch (Exception $e) … … 68 76 <?php echo dcPage::jsVar('dotclear.msg.document_saved',__("Document saved")); ?> 69 77 <?php echo dcPage::jsVar('dotclear.msg.error_occurred',__("An error occurred:")); ?> 78 <?php echo dcPage::jsVar('dotclear.msg.confirm_reset_file',__("Are you sure you want to reset this file?")); ?> 70 79 <?php echo dcPage::jsVar('dotclear.colorsyntax',$user_ui_colorsyntax); ?> 71 80 //]]> … … 122 131 echo 123 132 '<p><input type="submit" name="write" value="'.__('Save').' (s)" accesskey="s" /> '. 133 ($o->deletableFile($file['type'],$file['f']) ? '<input type="submit" name="delete" class="delete" value="'.__('Reset').'" />' : ''). 124 134 $core->formNonce(). 125 135 ($file['type'] ? form::hidden(array($file['type']),$file['f']) : ''). -
plugins/themeEditor/script.js
r2566 r2663 1 1 $(function() { 2 // Cope with saving 2 3 var msg = false; 3 4 $('#file-form input[name="write"]').click(function() { … … 31 32 return false; 32 33 }); 34 35 // Confirm for deleting current file 36 $('#file-form input[name="delete"]').click(function() { 37 return window.confirm(dotclear.msg.confirm_reset_file); 38 }); 39 33 40 }); -
plugins/widgets/_default_widgets.php
r2566 r2671 116 116 117 117 $__default_widgets['nav']->append($__widgets->search); 118 $__default_widgets['nav']->append($__widgets->navigation);119 118 $__default_widgets['nav']->append($__widgets->bestof); 120 119 $__default_widgets['nav']->append($__widgets->categories); 121 $__default_widgets[' extra']->append($__widgets->subscribe);120 $__default_widgets['custom']->append($__widgets->subscribe); 122 121 123 122 # --BEHAVIOR-- initDefaultWidgets -
plugins/widgets/_define.php
r2566 r2662 16 16 /* Description*/ "Widgets for your blog sidebars", 17 17 /* Author */ "Olivier Meunier & Dotclear Team", 18 /* Version */ '3. 1',18 /* Version */ '3.2', 19 19 array( 20 20 'permissions' => 'admin', -
plugins/widgets/_widgets_functions.php
r2653 r2668 26 26 $value = isset($GLOBALS['_search']) ? html::escapeHTML($GLOBALS['_search']) : ''; 27 27 28 return 29 ($w->content_only ? '' : '<div id="search"'.($w->class ? ' class="'.html::escapeHTML($w->class).'"' : '').'>'). 30 ($w->title ? '<h2><label for="q">'.html::escapeHTML($w->title).'</label></h2>' : ''). 31 '<form action="'.$core->blog->url.'" method="get" role="search">'. 32 '<fieldset>'. 33 '<p><input type="text" size="10" maxlength="255" id="q" name="q" value="'.$value.'" /> '. 34 '<input type="submit" class="submit" value="ok" /></p>'. 35 '</fieldset>'. 36 '</form>'. 37 ($w->content_only ? '' : '</div>'); 28 return $w->renderDiv($w->content_only,$w->class,'id="search"', 29 ($w->title ? $w->renderTitle('<label for="q">'.html::escapeHTML($w->title).'</label>') : ''). 30 '<form action="'.$core->blog->url.'" method="get" role="search">'. 31 '<fieldset>'. 32 '<p><input type="text" size="10" maxlength="255" id="q" name="q" value="'.$value.'" /> '. 33 '<input type="submit" class="submit" value="ok" /></p>'. 34 '</fieldset>'. 35 '</form>'); 38 36 } 39 37 … … 48 46 49 47 $res = 50 ($w->content_only ? '' : '<div id="topnav"'.($w->class ? ' class="'.html::escapeHTML($w->class).'"' : '').'>'). 51 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 48 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 52 49 '<ul role="navigation">'; 53 50 … … 56 53 '<li class="topnav-home">'. 57 54 '<a href="'.$core->blog->url.'">'.__('Home').'</a>'. 58 '< span> - </span></li>';55 '</li>'; 59 56 } 60 57 … … 63 60 '<a href="'.$core->blog->url.$core->url->getURLFor("archive").'">'. 64 61 __('Archives').'</a></li>'. 65 '</ul>'. 66 ($w->content_only ? '' : '</div>'); 67 68 return $res; 62 '</ul>'; 63 64 return $w->renderDiv($w->content_only,$w->class,'id="topnav"',$res); 69 65 } 70 66 … … 84 80 85 81 $res = 86 ($w->content_only ? '' : '<div class="categories'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 87 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''); 82 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''); 88 83 89 84 $ref_level = $level = $rs->level-1; … … 118 113 $res .= str_repeat('</li></ul>',-($ref_level - $level)); 119 114 } 120 $res .= ($w->content_only ? '' : '</div>'); 121 122 return $res; 115 116 return $w->renderDiv($w->content_only,'categories '.$w->class,'',$res); 123 117 } 124 118 … … 145 139 146 140 $res = 147 ($w->content_only ? '' : '<div class="selected'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 148 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 141 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 149 142 '<ul>'; 150 143 … … 157 150 } 158 151 159 $res .= '</ul>' .($w->content_only ? '' : '</div>');160 161 return $ res;152 $res .= '</ul>'; 153 154 return $w->renderDiv($w->content_only,'selected '.$w->class,'',$res); 162 155 } 163 156 … … 179 172 $langs = l10n::getISOcodes(); 180 173 $res = 181 ($w->content_only ? '' : '<div class="langs'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 182 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 174 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 183 175 '<ul>'; 184 176 … … 198 190 } 199 191 200 $res .= '</ul>' .($w->content_only ? '' : '</div>');201 202 return $ res;192 $res .= '</ul>'; 193 194 return $w->renderDiv($w->content_only,'langs '.$w->class,'',$res); 203 195 } 204 196 … … 219 211 220 212 $res = 221 ($w->content_only ? '' : '<div class="syndicate'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 222 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 213 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 223 214 '<ul>'; 224 215 … … 238 229 } 239 230 240 $res .= '</ul>' .($w->content_only ? '' : '</div>');241 242 return $ res;231 $res .= '</ul>'; 232 233 return $w->renderDiv($w->content_only,'syndicate '.$w->class,'',$res); 243 234 } 244 235 … … 268 259 269 260 $res = 270 ($w->content_only ? '' : '<div class="feed'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 271 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 261 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 272 262 '<ul>'; 273 263 … … 293 283 } 294 284 295 $res .= '</ul>' .($w->content_only ? '' : '</div>');296 297 return $ res;285 $res .= '</ul>'; 286 287 return $w->renderDiv($w->content_only,'feed '.$w->class,'',$res); 298 288 } 299 289 … … 307 297 } 308 298 309 $res = 310 ($w->content_only ? '' : '<div class="text'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 311 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 312 $w->text. 313 ($w->content_only ? '' : '</div>'); 314 315 return $res; 299 $res = ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : '').$w->text; 300 301 return $w->renderDiv($w->content_only,'text '.$w->class,'',$res); 316 302 } 317 303 … … 355 341 356 342 $res = 357 ($w->content_only ? '' : '<div class="lastposts'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 358 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 343 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 359 344 '<ul>'; 360 345 … … 368 353 } 369 354 370 $res .= '</ul>' .($w->content_only ? '' : '</div>');371 372 return $ res;355 $res .= '</ul>'; 356 357 return $w->renderDiv($w->content_only,'lastposts '.$w->class,'',$res); 373 358 } 374 359 … … 390 375 } 391 376 392 $res = ($w->content_only ? '' : '<div class="lastcomments'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 393 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 394 '<ul>'; 377 $res = ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : '').'<ul>'; 395 378 396 379 while ($rs->fetch()) … … 404 387 } 405 388 406 $res .= '</ul>' .($w->content_only ? '' : '</div>');407 408 return $ res;389 $res .= '</ul>'; 390 391 return $w->renderDiv($w->content_only,'lastcomments '.$w->class,'',$res); 409 392 } 410 393 } -
plugins/widgets/class.widgets.php
r2566 r2667 185 185 } 186 186 187 /* Widget rendering tool 188 --------------------------------------------------- */ 189 public function renderDiv($content_only,$class,$attr,$content) 190 { 191 if ($content_only) { 192 return $content; 193 } 194 $ret = '<div class="widget'.($class ? ' '.html::escapeHTML($class) : '').'"'.($attr ? ' '.$attr : '').'>'."\n"; 195 $ret .= $content."\n"; 196 $ret .= '</div>'."\n"; 197 198 return $ret; 199 } 200 201 public function renderTitle($title) 202 { 203 global $core; 204 205 if (!$title) { 206 return ''; 207 } 208 209 $wtscheme = $core->themes->moduleInfo($core->blog->settings->system->theme,'widgettitleformat'); 210 if (empty($wtscheme)) { 211 $tplset = $core->themes->moduleInfo($core->blog->settings->system->theme,'tplset'); 212 if (empty($tplset) || $tplset == DC_DEFAULT_TPLSET) { 213 // Use H2 for mustek based themes 214 $wtscheme = '<h2>%s</h2>'; 215 } else { 216 // Use H3 for currywurst based themes 217 $wtscheme = '<h3>%s</h3>'; 218 } 219 } 220 $ret = sprintf($wtscheme,$title); 221 222 return $ret; 223 } 224 225 public function renderSubtitle($title,$render=true) 226 { 227 global $core; 228 229 if (!$title && $render) { 230 return ''; 231 } 232 233 $wtscheme = $core->themes->moduleInfo($core->blog->settings->system->theme,'widgetsubtitleformat'); 234 if (empty($wtscheme)) { 235 $tplset = $core->themes->moduleInfo($core->blog->settings->system->theme,'tplset'); 236 if (empty($tplset) || $tplset == DC_DEFAULT_TPLSET) { 237 // Use H2 for mustek based themes 238 $wtscheme = '<h3>%s</h3>'; 239 } else { 240 // Use H3 for currywurst based themes 241 $wtscheme = '<h4>%s</h4>'; 242 } 243 } 244 if (!$render) { 245 return $wtscheme; 246 } 247 248 $ret = sprintf($wtscheme,$title); 249 return $ret; 250 } 251 187 252 /* Widget settings 188 253 --------------------------------------------------- */ -
themes/berlin/scss/init/_mixins-functions.scss
r2640 r2670 16 16 background-image: url($css-img-path+'/'+$file-name+'.svg'), none; 17 17 } 18 19 @mixin visually-hidden { 20 border: 0; 21 clip: rect(0 0 0 0); 22 height: 1px; 23 margin: -1px; 24 overflow: hidden; 25 padding: 0; 26 position: absolute; 27 width: 1px; 28 } -
themes/berlin/scss/modules/_off-canvas.scss
r2645 r2673 11 11 } 12 12 // Sexy glissando 13 #sidebar, #main {13 .sidebar, #main { 14 14 @include transition(.3s all linear); 15 15 } … … 60 60 position: relative; 61 61 } 62 .off-canvas #main {62 .off-canvas #main, .footer.off-canvas { 63 63 float: left; 64 64 margin-left: -1*(zen-grid-item-width(8)); 65 65 } 66 .off-canvas #sidebar {66 .off-canvas .sidebar { 67 67 position: relative; 68 68 @include zen-grid-item (11, 1, right); -
themes/berlin/scss/partials/_footer.scss
r2640 r2670 1 .footer__widgets { 2 padding: 1em; 3 background-color: $white; 4 text-align: center; 5 line-height: 2; 6 } 7 .blogcustom__title { 8 @include visually-hidden; 9 } 10 .footer__widgets .widget { 11 margin-top: 1em; 12 } 13 .footer__widgets h3 { 14 margin-bottom: 0; 15 font-size: 1em; 16 font-weight: bold; 17 } 18 .footer__widgets ul { 19 @include inline-block-list(.5em); 20 } -
themes/berlin/scss/partials/_sidebar.scss
r2640 r2672 1 #sidebar {1 .sidebar { 2 2 @include pie-clearfix; 3 3 padding-top: 2em; … … 14 14 } 15 15 } 16 #sidebar h2, #sidebar h3 { 16 .blognav__title, 17 .blogextra__title { 18 @include visually-hidden; 19 } 20 21 .blognav__widgets h3, 22 .blognav__widgets h4, 23 .blogextra__widgets h3, 24 .blogextra__widgets h4 { 17 25 font-size: 1em; 18 26 color: $white; 19 27 font-weight: bold; 20 28 } 21 #sidebar h2 { 29 .blognav__widgets h3, 30 .blogextra__widgets h3 { 22 31 text-transform: uppercase; 23 32 } 24 #sidebar h3 { 33 .blognav__widgets h4, 34 .blogextra__widgets h4 { 25 35 margin-top: 1.5em; 26 36 margin-bottom: 0; 27 37 } 28 #blognav > div, #blogextra > div{38 .blognav__widgets .widget, .blogextra__widgets .widget { 29 39 padding: 1em; 30 40 font-size: .875em; 31 41 line-height: 1.71429; 32 }33 #blognav div, #blogextra div {34 42 > ul { 35 43 @include no-bullets; 36 44 padding-left: 0; 37 line-height: 2.28571;38 45 } 39 46 } 40 #blognav, #blogextra{47 .blognav__widgets, .blogextra__widgets { 41 48 ul { 42 49 margin: 0; … … 44 51 li { 45 52 display: block; 46 padding -left: .25em;53 padding: .25em; 47 54 border-bottom: 1px solid $gray-medium; 48 55 } … … 67 74 background-color: $gray-very-dark; 68 75 } 69 #sidebar li:hover ul {76 .sidebar li:hover ul { 70 77 background-color: $gray-very-dark; 71 78 } 72 79 @media screen and(min-width: ($small-screen + .1em)) and (max-width: $large-screen) { 73 #blognav div, #blogextra div{80 .blognav__widgets .widget, .blogextra__widgets .widget { 74 81 width: 50%; 75 82 float: left; … … 77 84 } 78 85 @media screen and(min-width: ($large-screen + .1em)) and(max-width: $xlarge-screen) { 79 #blognav > div, #blogextra > div{86 .blognav__widgets .widget, .blogextra__widgets .widget { 80 87 width: 33.33%; 81 88 float: left; -
themes/berlin/style.css
r2645 r2673 644 644 .site-title { 645 645 font-size: 1.8em; } } 646 #sidebar { 646 .footer__widgets { 647 padding: 1em; 648 background-color: white; 649 text-align: center; 650 line-height: 2; } 651 652 .blogcustom__title { 653 border: 0; 654 clip: rect(0 0 0 0); 655 height: 1px; 656 margin: -1px; 657 overflow: hidden; 658 padding: 0; 659 position: absolute; 660 width: 1px; } 661 662 .footer__widgets .widget { 663 margin-top: 1em; } 664 665 .footer__widgets h3 { 666 margin-bottom: 0; 667 font-size: 1em; 668 font-weight: bold; } 669 670 .footer__widgets ul { 671 margin: 0; 672 padding: 0; 673 border: 0; 674 overflow: hidden; 675 *zoom: 1; } 676 .footer__widgets ul li { 677 list-style-image: none; 678 list-style-type: none; 679 margin-left: 0; 680 display: -moz-inline-stack; 681 display: inline-block; 682 vertical-align: middle; 683 *vertical-align: auto; 684 zoom: 1; 685 *display: inline; 686 white-space: nowrap; 687 padding-left: 0.5em; 688 padding-right: 0.5em; } 689 690 .sidebar { 647 691 *zoom: 1; 648 692 padding-top: 2em; … … 650 694 color: white; 651 695 text-shadow: #373737 0px -1px 0px; } 652 #sidebar:after {696 .sidebar:after { 653 697 content: ""; 654 698 display: table; 655 699 clear: both; } 656 #sidebar a:link, #sidebar a:visited {700 .sidebar a:link, .sidebar a:visited { 657 701 color: #f9f9f9; 658 702 border: none; } 659 #sidebar a:hover, #sidebar a:focus, #sidebar a:active,660 #sidebar li:hover, #sidebar li:focus {703 .sidebar a:hover, .sidebar a:focus, .sidebar a:active, 704 .sidebar li:hover, .sidebar li:focus { 661 705 background-color: #d52125; } 662 706 663 #sidebar h2, #sidebar h3 { 707 .blognav__title, 708 .blogextra__title { 709 border: 0; 710 clip: rect(0 0 0 0); 711 height: 1px; 712 margin: -1px; 713 overflow: hidden; 714 padding: 0; 715 position: absolute; 716 width: 1px; } 717 718 .blognav__widgets h3, 719 .blognav__widgets h4, 720 .blogextra__widgets h3, 721 .blogextra__widgets h4 { 664 722 font-size: 1em; 665 723 color: white; 666 724 font-weight: bold; } 667 725 668 #sidebar h2 { 726 .blognav__widgets h3, 727 .blogextra__widgets h3 { 669 728 text-transform: uppercase; } 670 729 671 #sidebar h3 { 730 .blognav__widgets h4, 731 .blogextra__widgets h4 { 672 732 margin-top: 1.5em; 673 733 margin-bottom: 0; } 674 734 675 #blognav > div, #blogextra > div{735 .blognav__widgets .widget, .blogextra__widgets .widget { 676 736 padding: 1em; 677 737 font-size: .875em; 678 738 line-height: 1.71429; } 679 680 #blognav div > ul, #blogextra div > ul { 681 list-style: none; 682 padding-left: 0; 683 line-height: 2.28571; } 684 #blognav div > ul li, #blogextra div > ul li { 685 list-style-image: none; 686 list-style-type: none; 687 margin-left: 0; } 688 689 #blognav ul, #blogextra ul { 739 .blognav__widgets .widget > ul, .blogextra__widgets .widget > ul { 740 list-style: none; 741 padding-left: 0; } 742 .blognav__widgets .widget > ul li, .blogextra__widgets .widget > ul li { 743 list-style-image: none; 744 list-style-type: none; 745 margin-left: 0; } 746 747 .blognav__widgets ul, .blogextra__widgets ul { 690 748 margin: 0; } 691 #blognav li, #blogextrali {749 .blognav__widgets li, .blogextra__widgets li { 692 750 display: block; 693 padding -left: .25em;751 padding: .25em; 694 752 border-bottom: 1px solid gainsboro; } 695 #blognav li ul, #blogextrali ul {753 .blognav__widgets li ul, .blogextra__widgets li ul { 696 754 margin-left: -.25em; } 697 #blognav li li, #blogextrali li {755 .blognav__widgets li li, .blogextra__widgets li li { 698 756 border-top: 1px solid gainsboro; } 699 #blognav li li:last-child, #blogextrali li:last-child {757 .blognav__widgets li li:last-child, .blogextra__widgets li li:last-child { 700 758 border-bottom: none; } 701 759 … … 710 768 background-color: #373737; } 711 769 712 #sidebar li:hover ul {770 .sidebar li:hover ul { 713 771 background-color: #373737; } 714 772 715 773 @media screen and (min-width: 30.1em) and (max-width: 60em) { 716 #blognav div, #blogextra div{774 .blognav__widgets .widget, .blogextra__widgets .widget { 717 775 width: 50%; 718 776 float: left; } } 719 777 @media screen and (min-width: 60.1em) and (max-width: 80em) { 720 #blognav > div, #blogextra > div{778 .blognav__widgets .widget, .blogextra__widgets .widget { 721 779 width: 33.33%; 722 780 float: left; } } … … 1233 1291 display: none; } 1234 1292 1235 #sidebar, #main {1293 .sidebar, #main { 1236 1294 -webkit-transition: 0.3s all linear; 1237 1295 -moz-transition: 0.3s all linear; … … 1279 1337 position: relative; } 1280 1338 1281 .off-canvas #main {1339 .off-canvas #main, .footer.off-canvas { 1282 1340 float: left; 1283 1341 margin-left: -66.6666667%; } 1284 1342 1285 .off-canvas #sidebar {1343 .off-canvas .sidebar { 1286 1344 position: relative; 1287 1345 float: right; -
themes/berlin/tpl/user_footer.html
r2640 r2673 15 15 var btn = $('<button id="offcanvas-off" type="button" role="button"><span class="visually-hidden">Hide menu</span></button>'); 16 16 $("#wrapper").addClass("off-canvas"); 17 $("#footer").addClass("off-canvas"); 17 18 $("#sidebar").prepend(btn); 18 19 btn.click(function(evt){ 19 20 $("#wrapper").removeClass("off-canvas"); 21 $("#footer").removeClass("off-canvas"); 20 22 evt.target.remove(); 21 23 }); -
themes/ductile/_config.php
r2581 r2658 78 78 ); 79 79 80 function adjustFontSize($s)81 {82 if (preg_match('/^([0-9.]+)\s*(%|pt|px|em|ex)?$/',$s,$m)) {83 if (empty($m[2])) {84 $m[2] = 'em';85 }86 return $m[1].$m[2];87 }88 89 return null;90 }91 92 80 $font_families = array( 93 81 // Theme standard … … 117 105 118 106 return isset($font_families[$c]) ? '<span style="position:absolute;top:0;left:32em;">'.$font_families[$c].'</span>' : ''; 119 }120 121 function adjustColor($c)122 {123 if ($c === '') {124 return '';125 }126 127 $c = strtoupper($c);128 129 if (preg_match('/^[A-F0-9]{3,6}$/',$c)) {130 $c = '#'.$c;131 }132 133 if (preg_match('/^#[A-F0-9]{6}$/',$c)) {134 return $c;135 }136 137 if (preg_match('/^#[A-F0-9]{3,}$/',$c)) {138 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);139 }140 141 return '';142 }143 144 function computeContrastRatio($color,$background)145 {146 // Compute contrast ratio between two colors147 148 $color = adjustColor($color);149 if (($color == '') || (strlen($color) != 7)) return 0;150 $background = adjustColor($background);151 if (($background == '') || (strlen($background) != 7)) return 0;152 153 $l1 = (0.2126 * pow(hexdec(substr($color,1,2))/255,2.2)) +154 (0.7152 * pow(hexdec(substr($color,3,2))/255,2.2)) +155 (0.0722 * pow(hexdec(substr($color,5,2))/255,2.2));156 157 $l2 = (0.2126 * pow(hexdec(substr($background,1,2))/255,2.2)) +158 (0.7152 * pow(hexdec(substr($background,3,2))/255,2.2)) +159 (0.0722 * pow(hexdec(substr($background,5,2))/255,2.2));160 161 if ($l1 > $l2) {162 $ratio = ($l1 + 0.05) / ($l2 + 0.05);163 } else {164 $ratio = ($l2 + 0.05) / ($l1 + 0.05);165 }166 return $ratio;167 }168 169 function contrastRatioLevel($ratio,$size,$bold)170 {171 if ($size == '') {172 return '';173 }174 175 // Eval font size in em (assume base font size in pixels equal to 16)176 if (preg_match('/^([0-9.]+)\s*(%|pt|px|em|ex)?$/',$size,$m)) {177 if (empty($m[2])) {178 $m[2] = 'em';179 }180 } else {181 return '';182 }183 switch ($m[2]) {184 case '%':185 $s = (float) $m[1] / 100;186 break;187 case 'pt':188 $s = (float) $m[1] / 12;189 break;190 case 'px':191 $s = (float) $m[1] / 16;192 break;193 case 'em':194 $s = (float) $m[1];195 break;196 case 'ex':197 $s = (float) $m[1] / 2;198 break;199 default:200 return '';201 }202 203 $large = ((($s > 1.5) && ($bold == false)) || (($s > 1.2) && ($bold == true)));204 205 // Check ratio206 if ($ratio > 7) {207 return 'AAA';208 } elseif (($ratio > 4.5) && $large) {209 return 'AAA';210 } elseif ($ratio > 4.5) {211 return 'AA';212 } elseif (($ratio > 3) && $large) {213 return 'AA';214 }215 return '';216 }217 218 function contrastRatio($color,$background,$size='',$bold=false)219 {220 if (($color != '') && ($background != '')) {221 $ratio = computeContrastRatio($color,$background);222 $level = contrastRatioLevel($ratio,$size,$bold);223 return224 '<span style="position:absolute;top:0;left:23em;">'.225 sprintf(__('ratio %.1f'),$ratio).226 ($level != '' ? ' '.sprintf(__('(%s)'),$level) : '').227 '</span>';228 }229 return '';230 107 } 231 108 … … 398 275 399 276 $ductile_user['blog_title_w'] = (integer) !empty($_POST['blog_title_w']); 400 $ductile_user['blog_title_s'] = adjustFontSize($_POST['blog_title_s']);401 $ductile_user['blog_title_c'] = adjustColor($_POST['blog_title_c']);277 $ductile_user['blog_title_s'] = dcThemeConfig::adjustFontSize($_POST['blog_title_s']); 278 $ductile_user['blog_title_c'] = dcThemeConfig::adjustColor($_POST['blog_title_c']); 402 279 403 280 $ductile_user['post_title_w'] = (integer) !empty($_POST['post_title_w']); 404 $ductile_user['post_title_s'] = adjustFontSize($_POST['post_title_s']);405 $ductile_user['post_title_c'] = adjustColor($_POST['post_title_c']);281 $ductile_user['post_title_s'] = dcThemeConfig::adjustFontSize($_POST['post_title_s']); 282 $ductile_user['post_title_c'] = dcThemeConfig::adjustColor($_POST['post_title_c']); 406 283 407 284 $ductile_user['post_link_w'] = (integer) !empty($_POST['post_link_w']); 408 $ductile_user['post_link_v_c'] = adjustColor($_POST['post_link_v_c']);409 $ductile_user['post_link_f_c'] = adjustColor($_POST['post_link_f_c']);410 411 $ductile_user['post_simple_title_c'] = adjustColor($_POST['post_simple_title_c']);285 $ductile_user['post_link_v_c'] = dcThemeConfig::adjustColor($_POST['post_link_v_c']); 286 $ductile_user['post_link_f_c'] = dcThemeConfig::adjustColor($_POST['post_link_f_c']); 287 288 $ductile_user['post_simple_title_c'] = dcThemeConfig::adjustColor($_POST['post_simple_title_c']); 412 289 413 290 $ductile_user['blog_title_w_m'] = (integer) !empty($_POST['blog_title_w_m']); 414 $ductile_user['blog_title_s_m'] = adjustFontSize($_POST['blog_title_s_m']);415 $ductile_user['blog_title_c_m'] = adjustColor($_POST['blog_title_c_m']);291 $ductile_user['blog_title_s_m'] = dcThemeConfig::adjustFontSize($_POST['blog_title_s_m']); 292 $ductile_user['blog_title_c_m'] = dcThemeConfig::adjustColor($_POST['blog_title_c_m']); 416 293 417 294 $ductile_user['post_title_w_m'] = (integer) !empty($_POST['post_title_w_m']); 418 $ductile_user['post_title_s_m'] = adjustFontSize($_POST['post_title_s_m']);419 $ductile_user['post_title_c_m'] = adjustColor($_POST['post_title_c_m']);295 $ductile_user['post_title_s_m'] = dcThemeConfig::adjustFontSize($_POST['post_title_s_m']); 296 $ductile_user['post_title_c_m'] = dcThemeConfig::adjustColor($_POST['post_title_c_m']); 420 297 } 421 298 … … 583 460 '<p class="field picker"><label for="blog_title_c">'.__('Color:').'</label> '. 584 461 form::field('blog_title_c',7,7,$ductile_user['blog_title_c'],'colorpicker'). 585 contrastRatio($ductile_user['blog_title_c'],'#ffffff',462 dcThemeConfig::contrastRatio($ductile_user['blog_title_c'],'#ffffff', 586 463 (!empty($ductile_user['blog_title_s']) ? $ductile_user['blog_title_s'] : '2em'), 587 464 $ductile_user['blog_title_w']). … … 600 477 '<p class="field picker"><label for="post_title_c">'.__('Color:').'</label> '. 601 478 form::field('post_title_c',7,7,$ductile_user['post_title_c'],'colorpicker'). 602 contrastRatio($ductile_user['post_title_c'],'#ffffff',479 dcThemeConfig::contrastRatio($ductile_user['post_title_c'],'#ffffff', 603 480 (!empty($ductile_user['post_title_s']) ? $ductile_user['post_title_s'] : '2.5em'), 604 481 $ductile_user['post_title_w']). … … 612 489 '<p class="field picker"><label for="post_simple_title_c">'.__('Color:').'</label> '. 613 490 form::field('post_simple_title_c',7,7,$ductile_user['post_simple_title_c'],'colorpicker'). 614 contrastRatio($ductile_user['post_simple_title_c'],'#ffffff',491 dcThemeConfig::contrastRatio($ductile_user['post_simple_title_c'],'#ffffff', 615 492 '1.1em', // H5 minimum size 616 493 false). … … 623 500 '<p class="field picker"><label for="post_link_v_c">'.__('Normal and visited links color:').'</label> '. 624 501 form::field('post_link_v_c',7,7,$ductile_user['post_link_v_c'],'colorpicker'). 625 contrastRatio($ductile_user['post_link_v_c'],'#ffffff',502 dcThemeConfig::contrastRatio($ductile_user['post_link_v_c'],'#ffffff', 626 503 '1em', 627 504 $ductile_user['post_link_w']). … … 630 507 '<p class="field picker"><label for="post_link_f_c">'.__('Active, hover and focus links color:').'</label> '. 631 508 form::field('post_link_f_c',7,7,$ductile_user['post_link_f_c'],'colorpicker'). 632 contrastRatio($ductile_user['post_link_f_c'],'#ebebee',509 dcThemeConfig::contrastRatio($ductile_user['post_link_f_c'],'#ebebee', 633 510 '1em', 634 511 $ductile_user['post_link_w']). … … 649 526 '<p class="field picker"><label for="blog_title_c_m">'.__('Color:').'</label> '. 650 527 form::field('blog_title_c_m',7,7,$ductile_user['blog_title_c_m'],'colorpicker'). 651 contrastRatio($ductile_user['blog_title_c_m'],'#d7d7dc',528 dcThemeConfig::contrastRatio($ductile_user['blog_title_c_m'],'#d7d7dc', 652 529 (!empty($ductile_user['blog_title_s_m']) ? $ductile_user['blog_title_s_m'] : '1.8em'), 653 530 $ductile_user['blog_title_w_m']). … … 666 543 '<p class="field picker"><label for="post_title_c_m">'.__('Color:').'</label> '. 667 544 form::field('post_title_c_m',7,7,$ductile_user['post_title_c_m'],'colorpicker'). 668 contrastRatio($ductile_user['post_title_c_m'],'#ffffff',545 dcThemeConfig::contrastRatio($ductile_user['post_title_c_m'],'#ffffff', 669 546 (!empty($ductile_user['post_title_s_m']) ? $ductile_user['post_title_s_m'] : '1.5em'), 670 547 $ductile_user['post_title_w_m']). -
themes/ductile/_public.php
r2581 r2658 314 314 # Main font 315 315 $selectors = 'body, .supranav li a span, #comments.me, a.comment-number'; 316 self::prop($css,$selectors,'font-family',$s['body_webfont_family']);316 dcThemeConfig::prop($css,$selectors,'font-family',$s['body_webfont_family']); 317 317 } 318 318 } … … 332 332 # Secondary font 333 333 $selectors = '#blogdesc, .supranav, #content-info, #subcategories, #comments-feed, #sidebar h2, #sidebar h3, #footer'; 334 self::prop($css,$selectors,'font-family',$s['alternate_webfont_family']);334 dcThemeConfig::prop($css,$selectors,'font-family',$s['alternate_webfont_family']); 335 335 } 336 336 } … … 370 370 # Blog description 371 371 $selectors = '#blogdesc'; 372 if (isset($s['subtitle_hidden'])) self::prop($css,$selectors,'display',($s['subtitle_hidden'] ? 'none' : null));372 if (isset($s['subtitle_hidden'])) dcThemeConfig::prop($css,$selectors,'display',($s['subtitle_hidden'] ? 'none' : null)); 373 373 374 374 # Main font 375 375 $selectors = 'body, .supranav li a span, #comments.me, a.comment-number'; 376 if (isset($s['body_font'])) self::prop($css,$selectors,'font-family',self::fontDef($s['body_font']));376 if (isset($s['body_font'])) dcThemeConfig::prop($css,$selectors,'font-family',self::fontDef($s['body_font'])); 377 377 378 378 # Secondary font 379 379 $selectors = '#blogdesc, .supranav, #content-info, #subcategories, #comments-feed, #sidebar h2, #sidebar h3, #footer'; 380 if (isset($s['alternate_font'])) self::prop($css,$selectors,'font-family',self::fontDef($s['alternate_font']));380 if (isset($s['alternate_font'])) dcThemeConfig::prop($css,$selectors,'font-family',self::fontDef($s['alternate_font'])); 381 381 382 382 # Inside posts links font weight 383 383 $selectors = '.post-excerpt a, .post-content a'; 384 if (isset($s['post_link_w'])) self::prop($css,$selectors,'font-weight',($s['post_link_w'] ? 'bold' : 'normal'));384 if (isset($s['post_link_w'])) dcThemeConfig::prop($css,$selectors,'font-weight',($s['post_link_w'] ? 'bold' : 'normal')); 385 385 386 386 # Inside posts links colors (normal, visited) 387 387 $selectors = '.post-excerpt a:link, .post-excerpt a:visited, .post-content a:link, .post-content a:visited'; 388 if (isset($s['post_link_v_c'])) self::prop($css,$selectors,'color',$s['post_link_v_c']);388 if (isset($s['post_link_v_c'])) dcThemeConfig::prop($css,$selectors,'color',$s['post_link_v_c']); 389 389 390 390 # Inside posts links colors (hover, active, focus) 391 391 $selectors = '.post-excerpt a:hover, .post-excerpt a:active, .post-excerpt a:focus, .post-content a:hover, .post-content a:active, .post-content a:focus'; 392 if (isset($s['post_link_f_c'])) self::prop($css,$selectors,'color',$s['post_link_f_c']);392 if (isset($s['post_link_f_c'])) dcThemeConfig::prop($css,$selectors,'color',$s['post_link_f_c']); 393 393 394 394 # Style directives … … 407 407 # Blog title font weight 408 408 $selectors = 'h1, h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus'; 409 if (isset($s['blog_title_w'])) self::prop($css_large,$selectors,'font-weight',($s['blog_title_w'] ? 'bold' : 'normal'));409 if (isset($s['blog_title_w'])) dcThemeConfig::prop($css_large,$selectors,'font-weight',($s['blog_title_w'] ? 'bold' : 'normal')); 410 410 411 411 # Blog title font size 412 412 $selectors = 'h1'; 413 if (isset($s['blog_title_s'])) self::prop($css_large,$selectors,'font-size',$s['blog_title_s']);413 if (isset($s['blog_title_s'])) dcThemeConfig::prop($css_large,$selectors,'font-size',$s['blog_title_s']); 414 414 415 415 # Blog title color 416 416 $selectors = 'h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus'; 417 if (isset($s['blog_title_c'])) self::prop($css_large,$selectors,'color',$s['blog_title_c']);417 if (isset($s['blog_title_c'])) dcThemeConfig::prop($css_large,$selectors,'color',$s['blog_title_c']); 418 418 419 419 # Post title font weight 420 420 $selectors = 'h2.post-title, h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus'; 421 if (isset($s['post_title_w'])) self::prop($css_large,$selectors,'font-weight',($s['post_title_w'] ? 'bold' : 'normal'));421 if (isset($s['post_title_w'])) dcThemeConfig::prop($css_large,$selectors,'font-weight',($s['post_title_w'] ? 'bold' : 'normal')); 422 422 423 423 # Post title font size 424 424 $selectors = 'h2.post-title'; 425 if (isset($s['post_title_s'])) self::prop($css_large,$selectors,'font-size',$s['post_title_s']);425 if (isset($s['post_title_s'])) dcThemeConfig::prop($css_large,$selectors,'font-size',$s['post_title_s']); 426 426 427 427 # Post title color 428 428 $selectors = 'h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus'; 429 if (isset($s['post_title_c'])) self::prop($css_large,$selectors,'color',$s['post_title_c']);429 if (isset($s['post_title_c'])) dcThemeConfig::prop($css_large,$selectors,'color',$s['post_title_c']); 430 430 431 431 # Simple title color (title without link) 432 432 $selectors = '#content-info h2, .post-title, .post h3, .post h4, .post h5, .post h6, .arch-block h3'; 433 if (isset($s['post_simple_title_c'])) self::prop($css_large,$selectors,'color',$s['post_simple_title_c']);433 if (isset($s['post_simple_title_c'])) dcThemeConfig::prop($css_large,$selectors,'color',$s['post_simple_title_c']); 434 434 435 435 # Style directives for large screens … … 451 451 # Blog title font weight 452 452 $selectors = 'h1, h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus'; 453 if (isset($s['blog_title_w_m'])) self::prop($css_small,$selectors,'font-weight',($s['blog_title_w_m'] ? 'bold' : 'normal'));453 if (isset($s['blog_title_w_m'])) dcThemeConfig::prop($css_small,$selectors,'font-weight',($s['blog_title_w_m'] ? 'bold' : 'normal')); 454 454 455 455 # Blog title font size 456 456 $selectors = 'h1'; 457 if (isset($s['blog_title_s_m'])) self::prop($css_small,$selectors,'font-size',$s['blog_title_s_m']);457 if (isset($s['blog_title_s_m'])) dcThemeConfig::prop($css_small,$selectors,'font-size',$s['blog_title_s_m']); 458 458 459 459 # Blog title color 460 460 $selectors = 'h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus'; 461 if (isset($s['blog_title_c_m'])) self::prop($css_small,$selectors,'color',$s['blog_title_c_m']);461 if (isset($s['blog_title_c_m'])) dcThemeConfig::prop($css_small,$selectors,'color',$s['blog_title_c_m']); 462 462 463 463 # Post title font weight 464 464 $selectors = 'h2.post-title, h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus'; 465 if (isset($s['post_title_w_m'])) self::prop($css_small,$selectors,'font-weight',($s['post_title_w_m'] ? 'bold' : 'normal'));465 if (isset($s['post_title_w_m'])) dcThemeConfig::prop($css_small,$selectors,'font-weight',($s['post_title_w_m'] ? 'bold' : 'normal')); 466 466 467 467 # Post title font size 468 468 $selectors = 'h2.post-title'; 469 if (isset($s['post_title_s_m'])) self::prop($css_small,$selectors,'font-size',$s['post_title_s_m']);469 if (isset($s['post_title_s_m'])) dcThemeConfig::prop($css_small,$selectors,'font-size',$s['post_title_s_m']); 470 470 471 471 # Post title color 472 472 $selectors = 'h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus'; 473 if (isset($s['post_title_c_m'])) self::prop($css_small,$selectors,'color',$s['post_title_c_m']);473 if (isset($s['post_title_c_m'])) dcThemeConfig::prop($css_small,$selectors,'color',$s['post_title_c_m']); 474 474 475 475 # Style directives for small screens … … 515 515 return isset(self::$fonts[$c]) ? self::$fonts[$c] : null; 516 516 } 517 518 protected static function prop(&$css,$selector,$prop,$value)519 {520 if ($value) {521 $css[$selector][$prop] = $value;522 }523 }524 517 }
Note: See TracChangeset
for help on using the changeset viewer.