Dotclear


Ignore:
Timestamp:
01/05/15 16:41:03 (9 years ago)
Author:
brol
Message:

v1.7 cf changelog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/multiToc/trunk/_widgets.php

    r3039 r3315  
    2121          $w->create('multiToc',__('Table of content'),array('multiTocWidgets','widget')); 
    2222          $w->multiToc->setting('title',__('Title:'),__('Table of content')); 
    23           $w->multiToc->setting('homeonly',__('Home page only'),true,'check'); 
     23          $w->multiToc->setting('homeonly',__('Display on:'),0,'combo', 
     24               array( 
     25                    __('All pages') => 0, 
     26                    __('Home page only') => 1, 
     27                    __('Except on home page') => 2 
     28                    ) 
     29          ); 
     30          $w->multiToc->setting('content_only',__('Content only'),0,'check'); 
     31          $w->multiToc->setting('class',__('CSS class:'),''); 
     32          $w->multiToc->setting('offline',__('Offline'),0,'check'); 
    2433     } 
    2534      
     
    2837          global $core; 
    2938           
    30           if ($w->homeonly && $core->url->type != 'default') { 
     39          if ($w->offline) 
     40          return; 
     41 
     42          if (($w->homeonly == 1 && $core->url->type != 'default') || 
     43               ($w->homeonly == 2 && $core->url->type == 'default')) { 
    3144               return; 
    3245          } 
     
    3447          $amask = '<a href="%1$s">%2$s</a>'; 
    3548          $limask = '<li class="%1$s">%2$s</li>'; 
    36            
    37           $title = (strlen($w->title) > 0) ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''; 
    3849           
    3950          $res = ''; 
     
    5566           
    5667          if (!empty($res)) { 
    57                $res =  
    58                '<div id="info-blog">'. 
    59                $title. 
    60                '<ul>'.$res.'</ul>'. 
    61                '</div>'; 
     68    $res = 
     69          ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 
     70          '<ul>'.$res.'</ul>'; 
     71 
     72          return $w->renderDiv($w->content_only,'info-blog '.$w->class,'',$res); 
     73 
    6274          } 
    6375           
    64           return $res; 
    6576     } 
    6677} 
    67  
    68 ?> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map