Dotclear

source: plugins/yafr/_widgets.php @ 2027

Revision 2027, 1.6 KB checked in by Osku, 13 years ago (diff)

First commit of YAFR (feed reader)

Line 
1<?php
2# -- BEGIN LICENSE BLOCK ----------------------------------
3#
4# This file is part of yafr, a plugin for Dotclear 2.
5#
6# Copyright (c) 2010 Osku and contributors
7#
8# Licensed under the GPL version 2.0 license.
9# A copy of this license is available in LICENSE file or at
10# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11#
12# -- END LICENSE BLOCK ------------------------------------
13$core->addBehavior('initWidgets',array('yafrWidgets','initWidgets'));
14
15class yafrWidgets
16{
17     public static function initWidgets($w)
18     {
19          global $core;
20
21          $w->create('feed',__('Feed reader'),array('publicyafr','Widget'));
22          $w->feed->setting('title',__('Title:'),__('Feed reader'));
23          $w->feed->setting('url', __('Feed URL:'),'');
24          $w->feed->setting('showtitle',__('Display feed main title'),0,'check');   
25          $w->feed->setting('showdesc',__('Display feed description'),0,'check');   
26          $w->feed->setting('f_limit',__('Entries limit:'),5);
27          $w->feed->setting('t_limit',__('Entry title length limit:'),40);
28          $w->feed->setting('fe_limit',__('Entry content length limit:'),80);
29          $w->feed->setting('cleancontent',__('Remove HTML content (warning!)'),1,'check');   
30          $w->feed->setting('dateformat',
31               __('Date format (leave empty to use default blog format):'),
32               $core->blog->settings->date_format.','.$core->blog->settings->time_format);
33          $w->feed->setting('stringformat',
34               __('String format (%1$s = date | %2$s = title | %3$s = author | %4$s = content | %5$s = URL | %6$s = description):'),
35               '<a href="%5$s" title="%4$s(%3$s)">%2$s<br/>%1$s</a>');
36          $w->feed->setting('CSS', __('Supplementary CSS Class:'),'');
37          $w->feed->setting('homeonly',
38               __('Home page only'),0,'check');
39     }
40}
41?>
Note: See TracBrowser for help on using the repository browser.

Sites map