Dotclear

Changeset 2778:fe7e025273c4


Ignore:
Timestamp:
11/13/14 15:24:23 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add "offline" option on widgets, closes #1945

Files:
13 edited

Legend:

Unmodified
Added
Removed
  • locales/fr/plugins.po

    r2773 r2778  
    19861986msgstr "Glisser les widgets ici pour les retirer du volet." 
    19871987 
     1988msgid "Offline" 
     1989msgstr "Hors ligne" 
     1990 
    19881991msgid "From theme:" 
    19891992msgstr "Du thème :" 
  • plugins/blogroll/_public.php

    r2667 r2778  
    140140          global $core; 
    141141 
     142          if ($w->offline) 
     143               return; 
     144 
    142145          if (($w->homeonly == 1 && $core->url->type != 'default') || 
    143146               ($w->homeonly == 2 && $core->url->type == 'default')) { 
  • plugins/blogroll/_widgets.php

    r2566 r2778  
    4343          $w->links->setting('content_only',__('Content only'),0,'check'); 
    4444          $w->links->setting('class',__('CSS class:'),''); 
     45          $w->links->setting('offline',__('Offline'),0,'check'); 
    4546     } 
    4647 
  • plugins/pages/_public.php

    r2771 r2778  
    243243          global $core, $_ctx; 
    244244 
     245          if ($w->offline) 
     246               return; 
     247 
    245248          if (($w->homeonly == 1 && $core->url->type != 'default') || 
    246249               ($w->homeonly == 2 && $core->url->type == 'default')) { 
  • plugins/pages/_widgets.php

    r2671 r2778  
    4040          $w->pages->setting('content_only',__('Content only'),0,'check'); 
    4141          $w->pages->setting('class',__('CSS class:'),''); 
     42          $w->pages->setting('offline',__('Offline'),0,'check'); 
    4243     } 
    4344 
  • plugins/simpleMenu/_public.php

    r2773 r2778  
    4848 
    4949          if (!(boolean) $core->blog->settings->system->simpleMenu_active) 
     50               return; 
     51 
     52          if ($w->offline) 
    5053               return; 
    5154 
  • plugins/simpleMenu/_widgets.php

    r2566 r2778  
    2929          $w->simplemenu->setting('content_only',__('Content only'),0,'check'); 
    3030          $w->simplemenu->setting('class',__('CSS class:'),''); 
     31          $w->simplemenu->setting('offline',__('Offline'),0,'check'); 
    3132     } 
    3233} 
  • plugins/tags/_public.php

    r2667 r2778  
    236236          global $core, $_ctx; 
    237237 
     238          if ($w->offline) 
     239               return; 
     240 
    238241          if (($w->homeonly == 1 && $core->url->type != 'default') || 
    239242               ($w->homeonly == 2 && $core->url->type == 'default')) { 
  • plugins/tags/_widgets.php

    r2566 r2778  
    3838          $w->tags->setting('content_only',__('Content only'),0,'check'); 
    3939          $w->tags->setting('class',__('CSS class:'),''); 
     40          $w->tags->setting('offline',__('Offline'),0,'check'); 
    4041     } 
    4142 
  • plugins/widgets/_default_widgets.php

    r2671 r2778  
    2424$__widgets->search->setting('content_only',__('Content only'),0,'check'); 
    2525$__widgets->search->setting('class',__('CSS class:'),''); 
     26$__widgets->search->setting('offline',__('Offline'),0,'check'); 
    2627 
    2728$__widgets->create('navigation',__('Navigation links'),array('defaultWidgets','navigation'),null,'List of navigation links'); 
     
    3132$__widgets->navigation->setting('content_only',__('Content only'),0,'check'); 
    3233$__widgets->navigation->setting('class',__('CSS class:'),''); 
     34$__widgets->navigation->setting('offline',__('Offline'),0,'check'); 
    3335 
    3436$__widgets->create('bestof',__('Selected entries'),array('defaultWidgets','bestof'),null,'List of selected entries'); 
     
    3941$__widgets->bestof->setting('content_only',__('Content only'),0,'check'); 
    4042$__widgets->bestof->setting('class',__('CSS class:'),''); 
     43$__widgets->bestof->setting('offline',__('Offline'),0,'check'); 
    4144 
    4245$__widgets->create('langs',__('Blog languages'),array('defaultWidgets','langs'),null,'List of available languages'); 
     
    4649$__widgets->langs->setting('content_only',__('Content only'),0,'check'); 
    4750$__widgets->langs->setting('class',__('CSS class:'),''); 
     51$__widgets->langs->setting('offline',__('Offline'),0,'check'); 
    4852 
    4953$__widgets->create('categories',__('List of categories'),array('defaultWidgets','categories'),null,'List of categories'); 
     
    5660$__widgets->categories->setting('content_only',__('Content only'),0,'check'); 
    5761$__widgets->categories->setting('class',__('CSS class:'),''); 
     62$__widgets->categories->setting('offline',__('Offline'),0,'check'); 
    5863 
    5964$__widgets->create('subscribe',__('Subscribe links'),array('defaultWidgets','subscribe'),null,'Feed subscription links (RSS or Atom)'); 
     
    6469$__widgets->subscribe->setting('content_only',__('Content only'),0,'check'); 
    6570$__widgets->subscribe->setting('class',__('CSS class:'),''); 
     71$__widgets->subscribe->setting('offline',__('Offline'),0,'check'); 
    6672 
    6773$__widgets->create('feed',__('Feed reader'),array('defaultWidgets','feed'),null,'List of last entries from feed (RSS or Atom)'); 
     
    7379$__widgets->feed->setting('content_only',__('Content only'),0,'check'); 
    7480$__widgets->feed->setting('class',__('CSS class:'),''); 
     81$__widgets->feed->setting('offline',__('Offline'),0,'check'); 
    7582 
    7683$__widgets->create('text',__('Text'),array('defaultWidgets','text'),null,'Simple text'); 
     
    8188$__widgets->text->setting('content_only',__('Content only'),0,'check'); 
    8289$__widgets->text->setting('class',__('CSS class:'),''); 
     90$__widgets->text->setting('offline',__('Offline'),0,'check'); 
    8391 
    8492$__widgets->create('lastposts',__('Last entries'),array('defaultWidgets','lastposts'),null,'List of last entries published'); 
     
    99107$__widgets->lastposts->setting('content_only',__('Content only'),0,'check'); 
    100108$__widgets->lastposts->setting('class',__('CSS class:'),''); 
     109$__widgets->lastposts->setting('offline',__('Offline'),0,'check'); 
    101110 
    102111$__widgets->create('lastcomments',__('Last comments'),array('defaultWidgets','lastcomments'),null,'List of last comments published'); 
     
    107116$__widgets->lastcomments->setting('content_only',__('Content only'),0,'check'); 
    108117$__widgets->lastcomments->setting('class',__('CSS class:'),''); 
     118$__widgets->lastcomments->setting('offline',__('Offline'),0,'check'); 
    109119 
    110120# --BEHAVIOR-- initWidgets 
  • plugins/widgets/_define.php

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

    r2668 r2778  
    1919          global $core; 
    2020 
     21          if ($w->offline) 
     22               return; 
     23 
    2124          if (($w->homeonly == 1 && $core->url->type != 'default') || 
    2225               ($w->homeonly == 2 && $core->url->type == 'default')) { 
     
    4043          global $core; 
    4144 
     45          if ($w->offline) 
     46               return; 
     47 
    4248          if (($w->homeonly == 1 && $core->url->type != 'default') || 
    4349               ($w->homeonly == 2 && $core->url->type == 'default')) { 
     
    6975          global $core, $_ctx; 
    7076 
     77          if ($w->offline) 
     78               return; 
     79 
    7180          if (($w->homeonly == 1 && $core->url->type != 'default') || 
    7281               ($w->homeonly == 2 && $core->url->type == 'default')) { 
     
    120129     { 
    121130          global $core, $_ctx; 
     131 
     132          if ($w->offline) 
     133               return; 
    122134 
    123135          if (($w->homeonly == 1 && $core->url->type != 'default') || 
     
    158170     { 
    159171          global $core, $_ctx; 
     172 
     173          if ($w->offline) 
     174               return; 
    160175 
    161176          if (($w->homeonly == 1 && $core->url->type != 'default' && $core->url->type != 'lang') || 
     
    199214          global $core; 
    200215 
     216          if ($w->offline) 
     217               return; 
     218 
    201219          if (($w->homeonly == 1 && $core->url->type != 'default') || 
    202220               ($w->homeonly == 2 && $core->url->type == 'default')) { 
     
    236254     public static function feed($w) 
    237255     { 
     256          global $core; 
     257 
    238258          if (!$w->url) { 
    239259               return; 
    240260          } 
    241261 
    242           global $core; 
     262          if ($w->offline) 
     263               return; 
    243264 
    244265          if (($w->homeonly == 1 && $core->url->type != 'default') || 
     
    292313          global $core; 
    293314 
     315          if ($w->offline) 
     316               return; 
     317 
    294318          if (($w->homeonly == 1 && $core->url->type != 'default') || 
    295319               ($w->homeonly == 2 && $core->url->type == 'default')) { 
     
    305329     { 
    306330          global $core, $_ctx; 
     331 
     332          if ($w->offline) 
     333               return; 
    307334 
    308335          if (($w->homeonly == 1 && $core->url->type != 'default') || 
     
    362389          global $core; 
    363390 
     391          if ($w->offline) 
     392               return; 
     393 
    364394          if (($w->homeonly == 1 && $core->url->type != 'default') || 
    365395               ($w->homeonly == 2 && $core->url->type == 'default')) { 
  • plugins/widgets/index.php

    r2702 r2778  
    368368          $altUp = $i == 0 ? ' alt=""' : ' alt="'.__('Up the widget').'"'; 
    369369          $altDown = $i == count($widgets->elements())-1 ? ' alt=""' : ' alt="'.__('Down the widget').'"'; 
    370            
     370 
    371371          $iname = 'w['.$pr.']['.$i.']'; 
    372372 
Note: See TracChangeset for help on using the changeset viewer.

Sites map