Dotclear

Changeset 429:a715f4c32191


Ignore:
Timestamp:
06/28/11 07:49:29 (14 years ago)
Author:
Franck <carnet.franck.paul@…>
Branch:
themes
Message:

Remplacement de l'affichage des stickers via une balise template (tplStickers) par le traitement d'un behaviour publicInsideFooter. Permet de rendre le template _footer.html indépendant de la présence des stickers.

Location:
themes/ductile
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • themes/ductile/_public.php

    r421 r429  
    1515# Behaviors 
    1616$core->addBehavior('publicHeadContent',array('tplDuctileTheme','publicHeadContent')); 
    17  
    18 # Template items 
    19 $core->tpl->addValue('Stickers',array('tplDuctileTheme','showStickers')); 
     17$core->addBehavior('publicInsideFooter',array('tplDuctileTheme','publicInsideFooter')); 
    2018 
    2119class tplDuctileTheme 
    2220{ 
    23      public static function showStickers($attr) 
     21     public static function publicInsideFooter($core) 
    2422     { 
    2523          $res = ''; 
    2624          $default = false; 
    27           $img_url = $GLOBALS['core']->blog->settings->system->themes_url.'/'.$GLOBALS['core']->blog->settings->system->theme.'/img/'; 
    28  
    29           $s = $GLOBALS['core']->blog->settings->themes->get($GLOBALS['core']->blog->settings->system->theme.'_stickers'); 
     25          $img_url = $core->blog->settings->system->themes_url.'/'.$core->blog->settings->system->theme.'/img/'; 
     26 
     27          $s = $core->blog->settings->themes->get($core->blog->settings->system->theme.'_stickers'); 
    3028 
    3129          if ($s === null) { 
     
    5048 
    5149          if ($default || $res == '') { 
    52                $res = self::setSticker(1,true,__('Feed'),$GLOBALS['core']->blog->url.$GLOBALS['core']->url->getBase('feed').'/atom',$img_url.'sticker-feed.png'); 
     50               $res = self::setSticker(1,true,__('Feed'),$core->blog->url.$core->url->getBase('feed').'/atom',$img_url.'sticker-feed.png'); 
    5351          } 
    5452 
    5553          if ($res != '') { 
    5654               $res = '<ul id="stickers">'."\n".$res.'</ul>'."\n"; 
    57                return $res; 
     55               echo $res; 
    5856          } 
    5957     } 
  • themes/ductile/tpl/_footer.html

    r425 r429  
    11<div id="footer"> 
    2      {{tpl:Stickers}} 
     2     {{tpl:SysBehavior behavior="publicInsideFooter"}} 
    33 
    44     <p>{{tpl:SysPoweredBy}}</p> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map