addBehavior('initWidgets',array('shortArchivesWidgets','initWidgets')); class shortArchivesWidgets { public static function initWidgets($w) { $w->create('shortArchives',__('Short Archives'), array('tplShortArchives','shortArchivesWidgets'), null, __('Blog Archive List an accordion menu, sorted by year')); $w->shortArchives->setting('title',__('Title:'),__('Archives')); $w->shortArchives->setting('postcount',__('With entries counts'),1,'check'); $w->shortArchives->setting('allarchivesslinktitle',__('Link to all archives:'),__('All archives')); $w->shortArchives->setting('homeonly',__('Display on:'),0,'combo', array( __('All pages') => 0, __('Home page only') => 1, __('Except on home page') => 2 ) ); $w->shortArchives->setting('content_only',__('Content only'),0,'check'); $w->shortArchives->setting('class',__('CSS class:'),''); $w->shortArchives->setting('offline',__('Offline'),0,'check'); } }