Changeset 3150
- Timestamp:
- 08/01/13 11:56:09 (10 years ago)
- Location:
- plugins/shortArchives
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/shortArchives/_admin.php
r2565 r3150 13 13 if (!defined('DC_CONTEXT_ADMIN')) {return;} 14 14 15 $core->addBehavior('adminDashboardFavs',array('shortArchivesfavBehaviors','dashboardFavs')); 16 17 class 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 15 33 require dirname(__FILE__).'/_widgets.php'; 16 34 ?> -
plugins/shortArchives/_define.php
r2565 r3150 16 16 /* Name */ "shortArchives", 17 17 /* 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', 20 20 /* Permissions */ 'usage,contentadmin' 21 21 ); -
plugins/shortArchives/_public.php
r2565 r3150 21 21 { 22 22 23 public static function publicHeadContent( &$core)23 public static function publicHeadContent($core) 24 24 { 25 25 $url = $core->blog->getQmarkURL().'pf='.basename(dirname(__FILE__)); … … 33 33 class tplShortArchives 34 34 { 35 public static function shortArchivesWidgets( &$w)35 public static function shortArchivesWidgets($w) 36 36 { 37 37 global $core; 38 38 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')) { 40 41 return; 41 42 } … … 74 75 return $res; 75 76 } 77 76 78 } 77 79 ?> -
plugins/shortArchives/_widgets.php
r2565 r3150 10 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 if (!defined('DC_RC_PATH')) { return; } 12 13 13 14 $core->addBehavior('initWidgets',array('shortArchivesWidgets','initWidgets')); … … 15 16 class shortArchivesWidgets 16 17 { 17 public static function initWidgets( &$w)18 public static function initWidgets($w) 18 19 { 19 20 $w->create('shortArchives',__('Short Archives'), array('tplShortArchives','shortArchivesWidgets')); 20 21 $w->shortArchives->setting('title',__('Title:'),('Archives')); 21 22 $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 ); 23 30 } 24 31 }
Note: See TracChangeset
for help on using the changeset viewer.