Changeset 2662:87748fd865ef for plugins/widgets
- Timestamp:
- 02/14/14 14:49:43 (12 years ago)
- Branch:
- default
- Location:
- plugins/widgets
- Files:
-
- 3 edited
-
_define.php (modified) (1 diff)
-
_widgets_functions.php (modified) (10 diffs)
-
class.widgets.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
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 r2662 28 28 return 29 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>': '').30 ($w->title ? $w->renderTitle('<label for="q">'.html::escapeHTML($w->title).'</label>') : ''). 31 31 '<form action="'.$core->blog->url.'" method="get" role="search">'. 32 32 '<fieldset>'. … … 49 49 $res = 50 50 ($w->content_only ? '' : '<div id="topnav"'.($w->class ? ' class="'.html::escapeHTML($w->class).'"' : '').'>'). 51 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>': '').51 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 52 52 '<ul role="navigation">'; 53 53 … … 85 85 $res = 86 86 ($w->content_only ? '' : '<div class="categories'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 87 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>': '');87 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''); 88 88 89 89 $ref_level = $level = $rs->level-1; … … 146 146 $res = 147 147 ($w->content_only ? '' : '<div class="selected'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 148 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>': '').148 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 149 149 '<ul>'; 150 150 … … 180 180 $res = 181 181 ($w->content_only ? '' : '<div class="langs'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 182 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>': '').182 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 183 183 '<ul>'; 184 184 … … 220 220 $res = 221 221 ($w->content_only ? '' : '<div class="syndicate'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 222 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>': '').222 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 223 223 '<ul>'; 224 224 … … 269 269 $res = 270 270 ($w->content_only ? '' : '<div class="feed'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 271 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>': '').271 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 272 272 '<ul>'; 273 273 … … 309 309 $res = 310 310 ($w->content_only ? '' : '<div class="text'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 311 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>': '').311 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 312 312 $w->text. 313 313 ($w->content_only ? '' : '</div>'); … … 356 356 $res = 357 357 ($w->content_only ? '' : '<div class="lastposts'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 358 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>': '').358 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 359 359 '<ul>'; 360 360 … … 391 391 392 392 $res = ($w->content_only ? '' : '<div class="lastcomments'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 393 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>': '').393 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 394 394 '<ul>'; 395 395 -
plugins/widgets/class.widgets.php
r2566 r2662 185 185 } 186 186 187 /* Widget rendering tool 188 --------------------------------------------------- */ 189 public function renderTitle($title) 190 { 191 global $core; 192 193 if (!$title) { 194 return ''; 195 } 196 197 $wtscheme = $core->themes->moduleInfo($core->blog->settings->system->theme,'widgettitleformat'); 198 if (empty($wtscheme)) { 199 $tplset = $core->themes->moduleInfo($core->blog->settings->system->theme,'tplset'); 200 if (empty($tplset) || $tplset == DC_DEFAULT_TPLSET) { 201 // Use H2 for mustek based themes 202 $wtscheme = '<h2>%s</h2>'; 203 } else { 204 // Use H3 for currywurst based themes 205 $wtscheme = '<h3>%s</h3>'; 206 } 207 } 208 $ret = sprintf($wtscheme,$title); 209 210 return $ret; 211 } 212 187 213 /* Widget settings 188 214 --------------------------------------------------- */
Note: See TracChangeset
for help on using the changeset viewer.
