1 | <?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ |
---|
2 | /***************************************************************\ |
---|
3 | * This is 'Dcom', a plugin for Dotclear 2 * |
---|
4 | * * |
---|
5 | * Copyright (c) 2007-2008 * |
---|
6 | * Oleksandr Syenchuk, Jean-François Michaud and contributors.* |
---|
7 | * * |
---|
8 | * This is an open source software, distributed under the GNU * |
---|
9 | * General Public License (version 2) terms and conditions. * |
---|
10 | * * |
---|
11 | * You should have received a copy of the GNU General Public * |
---|
12 | * License along 'Dcom' (see COPYING.txt); * |
---|
13 | * if not, write to the Free Software Foundation, Inc., * |
---|
14 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * |
---|
15 | \***************************************************************/ |
---|
16 | if (!defined('DC_CONTEXT_ADMIN')) { return; } |
---|
17 | |
---|
18 | $core->addBehavior('initWidgets',array('adminDcom','initWidget')); |
---|
19 | |
---|
20 | class adminDcom |
---|
21 | { |
---|
22 | public static function initWidget(&$w) |
---|
23 | { |
---|
24 | global $core; |
---|
25 | |
---|
26 | commonDcom::adjustDefaults($p); |
---|
27 | |
---|
28 | $w->create('lastcomments',__('Last comments'), |
---|
29 | array('publicDcom','showWidget')); |
---|
30 | $w->lastcomments->setting('title', |
---|
31 | __('Title:'),$p['title']); |
---|
32 | $w->lastcomments->setting('c_limit', |
---|
33 | __('Comments limit:'),$p['c_limit']); |
---|
34 | $w->lastcomments->setting('t_limit', |
---|
35 | __('Title lenght limit:'),$p['t_limit']); |
---|
36 | $w->lastcomments->setting('co_limit', |
---|
37 | __('Comment lenght limit:'),$p['co_limit']); |
---|
38 | $w->lastcomments->setting('dateformat', |
---|
39 | __('Date format (leave empty to use default blog format):'),$p['dateformat']); |
---|
40 | $w->lastcomments->setting('stringformat', |
---|
41 | __('String format (%1$s = date; %2$s = title; %3$s = author; %4$s = content of the comment; %5$s = comment URL):'), |
---|
42 | $p['stringformat']); |
---|
43 | $w->lastcomments->setting('homeonly', |
---|
44 | __('Home page only'),$p['homeonly'],'check'); |
---|
45 | } |
---|
46 | } |
---|
47 | ?> |
---|