Revision 1110,
881 bytes
checked in by philippe, 14 years ago
(diff) |
New plugin All Blogs List created
|
Line | |
---|
1 | <?php |
---|
2 | if (!defined('DC_RC_PATH')) { return; } |
---|
3 | |
---|
4 | l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/public'); |
---|
5 | |
---|
6 | $core->addBehavior('initWidgets', array('allBlogsBehavior', 'initWidgets')); |
---|
7 | |
---|
8 | class allBlogsBehavior |
---|
9 | { |
---|
10 | public static function initWidgets(&$w) { |
---|
11 | global $core; |
---|
12 | $w->create('allBlogs',__('All Blogs'),array('publicAllBLogs','allBlogs')); |
---|
13 | $w->allBlogs->setting('title',__('Title:'),__('All Blogs')); |
---|
14 | $w->allBlogs->setting('homeonly',__('Home page only'),1,'check'); |
---|
15 | $w->allBlogs->setting('combo',__('Display list in combo box'),0,'check'); |
---|
16 | $w->allBlogs->setting('excluded',__('Excluded blogs:'),'','text'); |
---|
17 | $rs = $core->getBlogs(); |
---|
18 | if (!$rs->isEmpty()) { |
---|
19 | while ($rs->fetch()) { |
---|
20 | if($rs->nb_post > 0) { |
---|
21 | $w->allBlogs->setting($rs->blog_id,html::escapeHTML($rs->blog_name), |
---|
22 | false, 'check'); |
---|
23 | } |
---|
24 | } |
---|
25 | } |
---|
26 | } |
---|
27 | } |
---|
28 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.