lastBlogUpdate/_widgets.php

112 lines
2.6 KiB
PHP
Raw Normal View History

2015-04-22 21:44:23 +00:00
<?php
2021-09-02 19:25:11 +00:00
/**
* @brief lastBlogUpdate, a plugin for Dotclear 2
2022-11-15 21:39:21 +00:00
*
2021-09-02 19:25:11 +00:00
* @package Dotclear
* @subpackage Plugin
2022-11-15 21:39:21 +00:00
*
2021-09-02 19:25:11 +00:00
* @author Jean-Christian Denis, Pierre Van Glabeke
2022-11-15 21:39:21 +00:00
*
2021-09-02 19:25:11 +00:00
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
2015-04-22 21:44:23 +00:00
if (!defined('DC_RC_PATH')) {
2021-08-27 19:29:07 +00:00
return null;
2015-04-22 21:44:23 +00:00
}
2022-11-15 21:39:21 +00:00
dcCore::app()->addBehavior('initWidgets', 'lastBlogUpdateWidgetAdmin');
2015-04-22 21:44:23 +00:00
function lastBlogUpdateWidgetAdmin($w)
{
2021-08-27 19:29:07 +00:00
$w
->create(
2022-11-15 21:39:21 +00:00
'lastblogupdate',
__('LastBlogUpdate: dates of lastest updates'),
'lastBlogUpdateWidgetPublic',
null,
'Show the dates of last updates of your blog in a widget'
)
2021-08-27 19:29:07 +00:00
->addTitle(__('Dates of lastest updates'))
->setting(
'blog_show',
__('Show blog update'),
1,
'check'
)
->setting(
'blog_title',
__('Title for blog update:'),
__('Blog:'),
'text'
)
->setting(
'blog_text',
__('Text for blog update:'),
__('%Y-%m-%d %H:%M'),
'text'
)
->setting(
'post_show',
__('Show entry update'),
1,
'check'
)
->setting(
'post_title',
__('Title for entries update:'),
__('Entries:'),
'text'
)
->setting(
'post_text',
__('Text for entries update:'),
__('%Y-%m-%d %H:%M'),
'text'
)
->setting(
'comment_show',
__('Show comment update'),
1,
'check'
)
->setting(
'comment_title',
__('Title for comments update:'),
__('Comments:'),
'text'
)
->setting(
'comment_text',
__('Text for comments update:'),
__('%Y-%m-%d %H:%M'),
'text'
)
->setting(
'media_show',
__('Show media update'),
1,
'check'
)
->setting(
'media_title',
__('Title for media update:'),
__('Medias:'),
'text'
)
->setting(
'media_text',
__('Text for media update:'),
__('%Y-%m-%d %H:%M'),
'text'
);
2015-04-22 21:44:23 +00:00
2021-08-27 19:29:07 +00:00
# --BEHAVIOR-- lastBlogUpdateWidgetInit
2022-11-15 21:39:21 +00:00
dcCore::app()->callBehavior('lastBlogUpdateWidgetInit', $w);
2015-04-22 21:44:23 +00:00
2021-08-27 19:29:07 +00:00
$w->lastblogupdate
->addHomeOnly()
->addContentOnly()
->addClass()
->addOffline();
2022-11-15 21:39:21 +00:00
}