Dotclear

Changeset 3152


Ignore:
Timestamp:
08/01/13 14:22:00 (10 years ago)
Author:
brol
Message:

version 1.8.2, intégration homepage only, css, content only

Location:
plugins/dcom
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcom/_define.php

    r3151 r3152  
    2020     /* Description*/    'Last comments with more options', 
    2121     /* Author */        'Oleksandr Syenchuk', 
    22      /* Version */       '0.8.1-dsls', 
     22     /* Version */       '0.8.2', 
    2323     /* Permissions */   'admin' 
    2424); 
  • plugins/dcom/_public.php

    r3151 r3152  
    2424     { 
    2525          global $core; 
    26            
    27           if ($w->homeonly && $core->url->type != 'default') { 
     26 
     27          if (($w->homeonly == 1 && $core->url->type != 'default') || 
     28               ($w->homeonly == 2 && $core->url->type == 'default')) { 
    2829               return; 
    2930          } 
     
    3839           
    3940          commonDcom::adjustDefaults($p); 
    40            
    41           $res = '<div class="lastcomments">'. 
     41 
     42    $res = ($w->content_only ? '' : '<div class="lastcomments'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 
    4243               ($p['title'] ? '<h2>'.html::escapeHTML($p['title']).'</h2>' : ''). 
    4344               self::show($p). 
    44                '</div>'; 
     45               ($w->content_only ? '' : '</div>'); 
    4546           
    4647          return $res; 
  • plugins/dcom/_widgets.php

    r3151 r3152  
    4141               __('String format (%1$s = date; %2$s = title; %3$s = author; %4$s = content of the comment; %5$s = comment URL):'), 
    4242               $p['stringformat']); 
    43           $w->lastcomments->setting('homeonly', 
    44                __('Home page only'),$p['homeonly'],'check'); 
     43          $w->lastcomments->setting('homeonly',__('Display on:'),0,'combo', 
     44               array( 
     45                    __('All pages') => 0, 
     46                    __('Home page only') => 1, 
     47                    __('Except on home page') => 2 
     48                    ) 
     49          ); 
     50    $w->lastcomments->setting('content_only',__('Content only'),0,'check'); 
     51    $w->lastcomments->setting('class',__('CSS class:'),''); 
    4552     } 
    4653} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map