Dotclear

Changeset 3150


Ignore:
Timestamp:
08/01/13 11:56:09 (10 years ago)
Author:
brol
Message:

version 1.3

Location:
plugins/shortArchives
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • plugins/shortArchives/_admin.php

    r2565 r3150  
    1313if (!defined('DC_CONTEXT_ADMIN')) {return;} 
    1414 
     15$core->addBehavior('adminDashboardFavs',array('shortArchivesfavBehaviors','dashboardFavs')); 
     16 
     17class shortArchivesfavBehaviors 
     18{ 
     19    public static function dashboardFavs($core,$favs) 
     20    { 
     21        $favs['shortArchives'] = new ArrayObject(array( 
     22            'shortArchives', 
     23            __('shortArchives'), 
     24            'plugin.php?p=shortArchives', 
     25            'index.php?pf=shortArchives/icon.png', 
     26            'index.php?pf=shortArchives/icon-big.png', 
     27            'usage,contentadmin', 
     28            null, 
     29            null)); 
     30    } 
     31} 
     32 
    1533require dirname(__FILE__).'/_widgets.php'; 
    1634?> 
  • plugins/shortArchives/_define.php

    r2565 r3150  
    1616     /* Name */                   "shortArchives", 
    1717     /* Description*/         "Display complete archives of your blog displayed in an accordion", 
    18      /* Author */             "annso", 
    19      /* Version */            '1.1', 
     18     /* Author */             "annso, Pierre Van Glabeke", 
     19     /* Version */            '1.3', 
    2020     /* Permissions */        'usage,contentadmin' 
    2121); 
  • plugins/shortArchives/_public.php

    r2565 r3150  
    2121{ 
    2222 
    23      public static function publicHeadContent(&$core) 
     23     public static function publicHeadContent($core) 
    2424     { 
    2525          $url = $core->blog->getQmarkURL().'pf='.basename(dirname(__FILE__)); 
     
    3333class tplShortArchives 
    3434{ 
    35      public static function shortArchivesWidgets(&$w) 
     35     public static function shortArchivesWidgets($w) 
    3636     { 
    3737          global $core; 
    3838 
    39           if ($w->homeonly && $core->url->type != 'default') { 
     39          if (($w->homeonly == 1 && $core->url->type != 'default') || 
     40               ($w->homeonly == 2 && $core->url->type == 'default')) { 
    4041               return; 
    4142          } 
     
    7475        return $res; 
    7576     } 
     77      
    7678} 
    7779?> 
  • plugins/shortArchives/_widgets.php

    r2565 r3150  
    1010# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
    1111# -- END LICENSE BLOCK ------------------------------------ 
     12if (!defined('DC_RC_PATH')) { return; } 
    1213 
    1314$core->addBehavior('initWidgets',array('shortArchivesWidgets','initWidgets')); 
     
    1516class shortArchivesWidgets 
    1617{ 
    17      public static function initWidgets(&$w) 
     18     public static function initWidgets($w) 
    1819     { 
    1920          $w->create('shortArchives',__('Short Archives'), array('tplShortArchives','shortArchivesWidgets')); 
    2021          $w->shortArchives->setting('title',__('Title:'),('Archives')); 
    2122          $w->shortArchives->setting('postcount',__('With entries counts'),1,'check'); 
    22           $w->shortArchives->setting('homeonly',__('Home page only'),0,'check'); 
     23          $w->shortArchives->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          ); 
    2330     } 
    2431} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map