Dotclear

Changeset 2662:87748fd865ef for plugins


Ignore:
Timestamp:
02/14/14 14:49:43 (11 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

New rendering method (renderTitle) for widget title, fixes #1827

Location:
plugins
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • plugins/blogroll/_define.php

    r2566 r2662  
    1616     /* Description*/         "Manage your blogroll", 
    1717     /* Author */             "Olivier Meunier", 
    18      /* Version */            '1.3.1', 
     18     /* Version */            '1.4', 
    1919     array( 
    2020          'permissions' =>    'blogroll', 
  • plugins/blogroll/_public.php

    r2566 r2662  
    153153          return 
    154154          ($w->content_only ? '' : '<div class="links'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 
    155           ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 
     155          ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 
    156156          $links. 
    157157          ($w->content_only ? '' : '</div>'); 
  • plugins/pages/_define.php

    r2566 r2662  
    1616     /* Description*/    "Serve entries as simple web pages", 
    1717     /* Author */        "Olivier Meunier", 
    18      /* Version */       '1.3', 
     18     /* Version */       '1.4', 
    1919     array( 
    2020          'permissions' =>    'contentadmin,pages', 
  • plugins/pages/_public.php

    r2635 r2662  
    270270          $res = 
    271271          ($w->content_only ? '' : '<div class="pages'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 
    272           ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 
     272          ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 
    273273          '<ul>'; 
    274274 
  • plugins/simpleMenu/_define.php

    r2576 r2662  
    1616     /* Description*/         "Simple menu for Dotclear", 
    1717     /* Author */             "Franck Paul", 
    18      /* Version */            '1.1.2', 
     18     /* Version */            '1.2', 
    1919     array( 
    2020          'permissions' =>    'admin', 
  • plugins/simpleMenu/_public.php

    r2605 r2662  
    5454          return 
    5555               ($w->content_only ? '' : '<div class="simple-menu'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 
    56                ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : '').$menu. 
     56               ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : '').$menu. 
    5757               ($w->content_only ? '' : '</div>'); 
    5858     } 
  • plugins/tags/_define.php

    r2566 r2662  
    1616     /* Description*/         "Tags for posts", 
    1717     /* Author */             "Olivier Meunier", 
    18      /* Version */            '1.2.1', 
     18     /* Version */            '1.3', 
    1919     array( 
    2020          'permissions' =>    'usage,contentadmin', 
  • plugins/tags/_public.php

    r2661 r2662  
    268268          $res = 
    269269          ($w->content_only ? '' : '<div class="tags'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 
    270           ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 
     270          ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 
    271271          '<ul>'; 
    272272 
  • plugins/widgets/_define.php

    r2566 r2662  
    1616     /* Description*/         "Widgets for your blog sidebars", 
    1717     /* Author */             "Olivier Meunier & Dotclear Team", 
    18      /* Version */            '3.1', 
     18     /* Version */            '3.2', 
    1919     array( 
    2020          'permissions' =>    'admin', 
  • plugins/widgets/_widgets_functions.php

    r2653 r2662  
    2828          return 
    2929          ($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>') : ''). 
    3131          '<form action="'.$core->blog->url.'" method="get" role="search">'. 
    3232          '<fieldset>'. 
     
    4949          $res = 
    5050          ($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)) : ''). 
    5252          '<ul role="navigation">'; 
    5353 
     
    8585          $res = 
    8686          ($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)) : ''); 
    8888 
    8989          $ref_level = $level = $rs->level-1; 
     
    146146          $res = 
    147147          ($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)) : ''). 
    149149          '<ul>'; 
    150150 
     
    180180          $res = 
    181181          ($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)) : ''). 
    183183          '<ul>'; 
    184184 
     
    220220          $res = 
    221221          ($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)) : ''). 
    223223          '<ul>'; 
    224224 
     
    269269          $res = 
    270270          ($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)) : ''). 
    272272          '<ul>'; 
    273273 
     
    309309          $res = 
    310310          ($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)) : ''). 
    312312          $w->text. 
    313313          ($w->content_only ? '' : '</div>'); 
     
    356356          $res = 
    357357          ($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)) : ''). 
    359359          '<ul>'; 
    360360 
     
    391391 
    392392          $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)) : ''). 
    394394          '<ul>'; 
    395395 
  • plugins/widgets/class.widgets.php

    r2566 r2662  
    185185     } 
    186186 
     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 
    187213     /* Widget settings 
    188214     --------------------------------------------------- */ 
Note: See TracChangeset for help on using the changeset viewer.

Sites map