[ Index ]
 

Code source de Dotclear 2.0-beta6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/plugins/widgets/ -> _default_widgets.php (source)

   1  <?php
   2  # ***** BEGIN LICENSE BLOCK *****
   3  # This file is part of DotClear.
   4  # Copyright (c) 2005 Olivier Meunier and contributors. All rights
   5  # reserved.
   6  #
   7  # DotClear is free software; you can redistribute it and/or modify
   8  # it under the terms of the GNU General Public License as published by
   9  # the Free Software Foundation; either version 2 of the License, or
  10  # (at your option) any later version.
  11  # 
  12  # DotClear is distributed in the hope that it will be useful,
  13  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15  # GNU General Public License for more details.
  16  # 
  17  # You should have received a copy of the GNU General Public License
  18  # along with DotClear; if not, write to the Free Software
  19  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  20  #
  21  # ***** END LICENSE BLOCK *****
  22  
  23  require dirname(__FILE__).'/class.widgets.php';
  24  
  25  # Available widgets
  26  global $__widgets;
  27  $__widgets = new dcWidgets;
  28  
  29  $__widgets->create('search',__('Search engine'),array('defaultWidgets','search'));
  30  $__widgets->search->setting('title',__('Title:'),__('Search'));
  31  
  32  $__widgets->create('navigation',__('Navigation links'),array('defaultWidgets','navigation'));
  33  
  34  $__widgets->create('bestof',__('Selected entries'),array('defaultWidgets','bestof'));
  35  $__widgets->bestof->setting('title',__('Title:'),__('Best of me'));
  36  $__widgets->bestof->setting('homeonly',__('Home page only'),1,'check');
  37  
  38  $__widgets->create('langs',__('Blog languages'),array('defaultWidgets','langs'));
  39  $__widgets->langs->setting('title',__('Title:'),__('Languages'));
  40  $__widgets->langs->setting('homeonly',__('Home page only'),1,'check');
  41  
  42  $__widgets->create('categories',__('Categories list'),array('defaultWidgets','categories'));
  43  $__widgets->categories->setting('title',__('Title:'),__('Categories'));
  44  $__widgets->categories->setting('postcount',__('With entries counts'),0,'check');
  45  
  46  $__widgets->create('subscribe',__('Subscribe links'),array('defaultWidgets','subscribe'));
  47  $__widgets->subscribe->setting('title',__('Title:'),__('Subscribe'));
  48  $__widgets->subscribe->setting('type',__('Feeds type:'),'rss2','combo',array('RSS' => 'rss2','Atom' => 'atom'));
  49  
  50  $__widgets->create('feed',__('Feed reader'),array('defaultWidgets','feed'));
  51  $__widgets->feed->setting('title',__('Title:'),__('Somewhere else'));
  52  $__widgets->feed->setting('url',__('Feed URL:'),'');
  53  $__widgets->feed->setting('limit',__('Entries limit:'),10);
  54  $__widgets->feed->setting('homeonly',__('Home page only'),1,'check');
  55  
  56  $__widgets->create('text',__('Text'),array('defaultWidgets','text'));
  57  $__widgets->text->setting('title',__('Title:'),'');
  58  $__widgets->text->setting('text',__('Text:'),'','textarea');
  59  $__widgets->text->setting('homeonly',__('Home page only'),0,'check');
  60  
  61  $__widgets->create('lastposts',__('Last entries'),array('defaultWidgets','lastposts'));
  62  $__widgets->lastposts->setting('title',__('Title:'),__('Last entries'));
  63  $__widgets->lastposts->setting('limit',__('Entries limit:'),10);
  64  $__widgets->lastposts->setting('homeonly',__('Home page only'),1,'check');
  65  
  66  $__widgets->create('lastcomments',__('Last comments'),array('defaultWidgets','lastcomments'));
  67  $__widgets->lastcomments->setting('title',__('Title:'),__('Last comments'));
  68  $__widgets->lastcomments->setting('limit',__('Comments limit:'),10);
  69  $__widgets->lastcomments->setting('homeonly',__('Home page only'),1,'check');
  70  
  71  # --BEHAVIOR-- initWidgets
  72  $core->callBehavior('initWidgets',$__widgets);
  73  
  74  # Default widgets
  75  global $__default_widgets;
  76  $__default_widgets = array('nav'=> new dcWidgets(), 'extra'=> new dcWidgets());
  77  
  78  $__default_widgets['nav']->append($__widgets->search);
  79  $__default_widgets['nav']->append($__widgets->navigation);
  80  $__default_widgets['nav']->append($__widgets->bestof);
  81  $__default_widgets['nav']->append($__widgets->categories);
  82  $__default_widgets['extra']->append($__widgets->subscribe);
  83  
  84  # --BEHAVIOR-- initDefaultWidgets
  85  $core->callBehavior('initDefaultWidgets',$__widgets,$__default_widgets);
  86  ?>


Généré le : Fri Feb 23 22:16:06 2007 par Balluche grâce à PHPXref 0.7