Compare commits

..

2 Commits

Author SHA1 Message Date
Jean-Christian Paul Denis ce1fe633ca
cosmetic (callable) 2023-10-19 20:40:17 +02:00
Jean-Christian Paul Denis e0b138ae60
oups 2023-10-14 19:22:50 +02:00
8 changed files with 15 additions and 18 deletions

View File

@ -1,3 +1,9 @@
lastBlogUpdate 2023.10.19
===========================================================
* Require Dotclear 2.28
* Require PHP 8.1
* Code review (callable)
lastBlogUpdate 2023.10.11 lastBlogUpdate 2023.10.11
=========================================================== ===========================================================
* Require Dotclear 2.28 * Require Dotclear 2.28

View File

@ -1,7 +1,7 @@
# README # README
[![Release](https://img.shields.io/badge/release-2023.10.11-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/lastBlogUpdate/releases) [![Release](https://img.shields.io/badge/release-2023.10.19-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/lastBlogUpdate/releases)
![Date](https://img.shields.io/badge/date-2023.10.11-c44d58.svg) ![Date](https://img.shields.io/badge/date-2023.10.19-c44d58.svg)
[![Dotclear](https://img.shields.io/badge/dotclear-v2.28-137bbb.svg)](https://fr.dotclear.org/download) [![Dotclear](https://img.shields.io/badge/dotclear-v2.28-137bbb.svg)](https://fr.dotclear.org/download)
[![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/lastBlogUpdate) [![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/lastBlogUpdate)
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/lastBlogUpdate/src/branch/master/LICENSE) [![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/lastBlogUpdate/src/branch/master/LICENSE)
@ -14,9 +14,9 @@ _lastBlogUpdate_ is a plugin for the open-source web publishing software called
## REQUIREMENTS ## REQUIREMENTS
* permissions to manage widgets
* Dotclear 2.28 * Dotclear 2.28
* PHP 8.1+ * PHP 8.1+
* Dotclear permissions to manage widgets
## USAGE ## USAGE

View File

@ -9,14 +9,13 @@
* Show the dates of last updates of your blog in a widget. * Show the dates of last updates of your blog in a widget.
* *
* @author Jean-Christian Denis * @author Jean-Christian Denis
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/ */
$this->registerModule( $this->registerModule(
'Last blog update', 'Last blog update',
'Show the dates of last updates of your blog in a widget', 'Show the dates of last updates of your blog in a widget',
'Jean-Christian Denis, Pierre Van Glabeke', 'Jean-Christian Denis, Pierre Van Glabeke',
'2023.10.11', '2023.10.19',
[ [
'requires' => [['core', '2.28']], 'requires' => [['core', '2.28']],
'permissions' => 'My', 'permissions' => 'My',

View File

@ -2,10 +2,10 @@
<modules xmlns:da="http://dotaddict.org/da/"> <modules xmlns:da="http://dotaddict.org/da/">
<module id="lastBlogUpdate"> <module id="lastBlogUpdate">
<name>Last blog update</name> <name>Last blog update</name>
<version>2023.10.11</version> <version>2023.10.19</version>
<author>Jean-Christian Denis, Pierre Van Glabeke</author> <author>Jean-Christian Denis, Pierre Van Glabeke</author>
<desc>Show the dates of last updates of your blog in a widget</desc> <desc>Show the dates of last updates of your blog in a widget</desc>
<file>https://github.com/JcDenis/lastBlogUpdate/releases/download/v2023.10.11/plugin-lastBlogUpdate.zip</file> <file>https://git.dotclear.watch/JcDenis/lastBlogUpdate/releases/download/v2023.10.19/plugin-lastBlogUpdate.zip</file>
<da:dcmin>2.28</da:dcmin> <da:dcmin>2.28</da:dcmin>
<da:details>https://git.dotclear.watch/JcDenis/lastBlogUpdate/src/branch/master/README.md</da:details> <da:details>https://git.dotclear.watch/JcDenis/lastBlogUpdate/src/branch/master/README.md</da:details>
<da:support>https://git.dotclear.watch/JcDenis/lastBlogUpdate/issues</da:support> <da:support>https://git.dotclear.watch/JcDenis/lastBlogUpdate/issues</da:support>

View File

@ -12,7 +12,6 @@ use Dotclear\Core\Process;
* @ingroup lastBlogUpdate * @ingroup lastBlogUpdate
* *
* @author Jean-Christian Denis * @author Jean-Christian Denis
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/ */
class Backend extends Process class Backend extends Process
@ -28,9 +27,7 @@ class Backend extends Process
return false; return false;
} }
App::behavior()->addBehaviors([ App::behavior()->addBehavior('initWidgets', Widgets::initWidgets(...));
'initWidgets' => [Widgets::class, 'initWidgets'],
]);
return true; return true;
} }

View File

@ -12,7 +12,6 @@ use Dotclear\Core\Process;
* @ingroup lastBlogUpdate * @ingroup lastBlogUpdate
* *
* @author Jean-Christian Denis * @author Jean-Christian Denis
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/ */
class Frontend extends Process class Frontend extends Process
@ -28,9 +27,7 @@ class Frontend extends Process
return false; return false;
} }
App::behavior()->addBehaviors([ App::behavior()->addBehavior('initWidgets', Widgets::initWidgets(...));
'initWidgets' => [Widgets::class, 'initWidgets'],
]);
return true; return true;
} }

View File

@ -11,7 +11,6 @@ use Dotclear\Module\MyPlugin;
* @ingroup lastBlogUpdate * @ingroup lastBlogUpdate
* *
* @author Jean-Christian Denis * @author Jean-Christian Denis
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/ */
class My extends MyPlugin class My extends MyPlugin

View File

@ -16,7 +16,6 @@ use Dotclear\Plugin\widgets\WidgetsElement;
* @ingroup lastBlogUpdate * @ingroup lastBlogUpdate
* *
* @author Jean-Christian Denis * @author Jean-Christian Denis
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/ */
class Widgets class Widgets
@ -27,7 +26,7 @@ class Widgets
->create( ->create(
'lastblogupdate', 'lastblogupdate',
__('Last blog update'), __('Last blog update'),
[self::class, 'parseWidget'], self::parseWidget(...),
null, null,
'Show the dates of last updates of your blog in a widget' 'Show the dates of last updates of your blog in a widget'
) )