Compare commits
2 Commits
fa8cb9c291
...
3dd3389c25
Author | SHA1 | Date |
---|---|---|
Jean-Christian Paul Denis | 3dd3389c25 | |
Jean-Christian Paul Denis | d7c50d8656 |
49
CHANGELOG.md
49
CHANGELOG.md
|
@ -1,50 +1,71 @@
|
|||
2.2 - 2023.05.13
|
||||
* require Dotclear 2.26
|
||||
bloganniv 2.3 - 2023.08.06
|
||||
===========================================================
|
||||
* Require Dotclear 2.27
|
||||
* Require PHP 7.4+
|
||||
* Upgrade to Dotclear 2.27
|
||||
* Move third party repository
|
||||
* Use Dotclear style for changelog
|
||||
|
||||
bloganniv 2.2 - 2023.05.13
|
||||
===========================================================
|
||||
* Require Dotclear 2.26
|
||||
* release for Dotclear 2.26 stable
|
||||
|
||||
2.1 - 2023.04.24
|
||||
bloganniv 2.1 - 2023.04.24
|
||||
===========================================================
|
||||
* require Dotclear 2.26
|
||||
* fix nullsafe warnings
|
||||
* remove magic
|
||||
|
||||
2.0 - 2023.04.11
|
||||
bloganniv 2.0 - 2023.04.11
|
||||
===========================================================
|
||||
* require Dotclear 2.26
|
||||
* use namespace
|
||||
|
||||
1.6 - 2022.12.16
|
||||
bloganniv 1.6 - 2022.12.16
|
||||
===========================================================
|
||||
* update to dotclear 2.24
|
||||
* fix phpstan errors
|
||||
|
||||
1.5.1 - 2015.04.22 - Pierre Van Glabeke
|
||||
bloganniv 1.5.1 - 2015.04.22 - Pierre Van Glabeke
|
||||
===========================================================
|
||||
* nommage widget
|
||||
* modifs localisation
|
||||
|
||||
1.5 - Pierre Van Glabeke
|
||||
bloganniv 1.5 - Pierre Van Glabeke
|
||||
===========================================================
|
||||
* compatibilité dc2.7
|
||||
|
||||
1.4.1 - Pierre Van Glabeke
|
||||
bloganniv 1.4.1 - Pierre Van Glabeke
|
||||
===========================================================
|
||||
* Ajustements settings
|
||||
* Fin de ligne unix
|
||||
* complément define.php
|
||||
|
||||
1.4 - Pierre Van Glabeke
|
||||
bloganniv 1.4 - Pierre Van Glabeke
|
||||
===========================================================
|
||||
* Modifs affichage pour le widget (remplacement paragraphe par une liste)
|
||||
|
||||
1.3.1
|
||||
bloganniv 1.3.1
|
||||
===========================================================
|
||||
* Ajout choix affichage page pour le widget (content only + css)
|
||||
|
||||
1.3
|
||||
bloganniv 1.3
|
||||
===========================================================
|
||||
* Ajout choix affichage page pour le widget
|
||||
* Correction de traduction
|
||||
|
||||
1.2
|
||||
bloganniv 1.2
|
||||
===========================================================
|
||||
* Ajout du piochage automatique de la date du blog si non saisie dans le widget
|
||||
* Ajout @ devant la fonction checkdate pour eviter un warning
|
||||
|
||||
1.1
|
||||
bloganniv 1.1
|
||||
===========================================================
|
||||
* Compatibilité dc2.2
|
||||
* Localisation
|
||||
* Intégration corrections proposées sur http://www.myouaibe.com/index.php/post/2007/08/23/Plugin-BlogAnniv-pour-DOTCLEAR-2
|
||||
|
||||
1.0
|
||||
bloganniv 1.0
|
||||
===========================================================
|
||||
* Création
|
|
@ -3,7 +3,7 @@
|
|||
[![Release](https://img.shields.io/github/v/release/JcDenis/bloganniv)](https://github.com/JcDenis/bloganniv/releases)
|
||||
[![Date](https://img.shields.io/github/release-date/JcDenis/bloganniv)](https://github.com/JcDenis/bloganniv/releases)
|
||||
[![Issues](https://img.shields.io/github/issues/JcDenis/bloganniv)](https://github.com/JcDenis/bloganniv/issues)
|
||||
[![Dotclear](https://img.shields.io/badge/dotclear-v2.26-blue.svg)](https://fr.dotclear.org/download)
|
||||
[![Dotclear](https://img.shields.io/badge/dotclear-v2.27-blue.svg)](https://fr.dotclear.org/download)
|
||||
[![Dotaddict](https://img.shields.io/badge/dotaddict-official-green.svg)](https://plugins.dotaddict.org/dc2/details/bloganniv)
|
||||
[![License](https://img.shields.io/github/license/JcDenis/bloganniv)](https://github.com/JcDenis/bloganniv/blob/master/LICENSE)
|
||||
|
||||
|
@ -22,7 +22,7 @@ It adds widget showing:
|
|||
_bloganniv_ requires:
|
||||
|
||||
* permissions to manage widgets
|
||||
* Dotclear 2.26
|
||||
* Dotclear 2.27
|
||||
|
||||
## USAGE
|
||||
|
||||
|
@ -34,8 +34,8 @@ Add and configure "Blog anniv" from widgets manager.
|
|||
## LINKS
|
||||
|
||||
* License : [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html)
|
||||
* Source & contribution : [GitHub Page](https://github.com/JcDenis/bloganniv)
|
||||
* Packages & details : [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/bloganniv)
|
||||
* Source & contribution : [Gitea Page](https://git.dotclear.watch/JcDenis/bloganniv) or [GitHub Page](https://github.com/JcDenis/bloganniv)
|
||||
* Packages & details : [Gitea Page](https://git.dotclear.watch/JcDenis/bloganniv/releases) or [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/bloganniv)
|
||||
|
||||
## CONTRIBUTORS
|
||||
|
||||
|
|
12
_define.php
12
_define.php
|
@ -10,7 +10,7 @@
|
|||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
if (!defined('DC_RC_PATH') || is_null(dcCore::app()->auth)) {
|
||||
if (!defined('DC_RC_PATH')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -18,15 +18,15 @@ $this->registerModule(
|
|||
'Blog Anniv',
|
||||
'Counting the number of days before and after a particular date',
|
||||
'Fran6t, Pierre Van Glabeke and Contributors',
|
||||
'2.2',
|
||||
'2.3',
|
||||
[
|
||||
'requires' => [['core', '2.26']],
|
||||
'requires' => [['core', '2.27']],
|
||||
'permissions' => dcCore::app()->auth->makePermissions([
|
||||
dcCore::app()->auth::PERMISSION_ADMIN,
|
||||
]),
|
||||
'type' => 'plugin',
|
||||
'support' => 'https://github.com/JcDenis/' . basename(__DIR__),
|
||||
'details' => 'https://plugins.dotaddict.org/dc2/details/' . basename(__DIR__),
|
||||
'repository' => 'https://raw.githubusercontent.com/JcDenis/' . basename(__DIR__) . '/master/dcstore.xml',
|
||||
'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues',
|
||||
'details' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/src/branch/master/README.md',
|
||||
'repository' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/raw/branch/master/dcstore.xml',
|
||||
]
|
||||
);
|
||||
|
|
10
dcstore.xml
10
dcstore.xml
|
@ -2,12 +2,12 @@
|
|||
<modules xmlns:da="http://dotaddict.org/da/">
|
||||
<module id="bloganniv">
|
||||
<name>Blog Anniv</name>
|
||||
<version>2.2</version>
|
||||
<version>2.3</version>
|
||||
<author>Fran6t, Pierre Van Glabeke and Contributors</author>
|
||||
<desc>Counting the number of days before and after a particular date</desc>
|
||||
<file>https://github.com/JcDenis/bloganniv/releases/download/v2.2/plugin-bloganniv.zip</file>
|
||||
<da:dcmin>2.26</da:dcmin>
|
||||
<da:details>https://plugins.dotaddict.org/dc2/details/bloganniv</da:details>
|
||||
<da:support>https://github.com/JcDenis/bloganniv</da:support>
|
||||
<file>https://gitea.dotclear.watch/JcDenis/bloganniv/releases/download/v2.3/plugin-bloganniv.zip</file>
|
||||
<da:dcmin>2.27</da:dcmin>
|
||||
<da:details>https://git.dotclear.watch/JcDenis/bloganniv/src/branch/master/README.md</da:details>
|
||||
<da:support>https://git.dotclear.watch/JcDenis/bloganniv/issues</da:support>
|
||||
</module>
|
||||
</modules>
|
||||
|
|
|
@ -15,20 +15,18 @@ declare(strict_types=1);
|
|||
namespace Dotclear\Plugin\bloganniv;
|
||||
|
||||
use dcCore;
|
||||
use dcNsProcess;
|
||||
use Dotclear\Core\Process;
|
||||
|
||||
class Backend extends dcNsProcess
|
||||
class Backend extends Process
|
||||
{
|
||||
public static function init(): bool
|
||||
{
|
||||
static::$init = defined('DC_CONTEXT_ADMIN');
|
||||
|
||||
return static::$init;
|
||||
return self::status(My::checkContext(My::BACKEND));
|
||||
}
|
||||
|
||||
public static function process(): bool
|
||||
{
|
||||
if (!static::$init) {
|
||||
if (!self::status()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,20 +15,18 @@ declare(strict_types=1);
|
|||
namespace Dotclear\Plugin\bloganniv;
|
||||
|
||||
use dcCore;
|
||||
use dcNsProcess;
|
||||
use Dotclear\Core\Process;
|
||||
|
||||
class Frontend extends dcNsProcess
|
||||
class Frontend extends Process
|
||||
{
|
||||
public static function init(): bool
|
||||
{
|
||||
static::$init = defined('DC_RC_PATH');
|
||||
|
||||
return static::$init;
|
||||
return self::status(My::checkContext(My::FRONTEND));
|
||||
}
|
||||
|
||||
public static function process(): bool
|
||||
{
|
||||
if (!static::$init) {
|
||||
if (!self::status()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
29
src/My.php
29
src/My.php
|
@ -14,36 +14,11 @@ declare(strict_types=1);
|
|||
|
||||
namespace Dotclear\Plugin\bloganniv;
|
||||
|
||||
use dcCore;
|
||||
use Dotclear\Module\MyPlugin;
|
||||
|
||||
/**
|
||||
* This module definitions.
|
||||
*/
|
||||
class My
|
||||
class My extends MyPlugin
|
||||
{
|
||||
/**
|
||||
* This module id.
|
||||
*/
|
||||
public static function id(): string
|
||||
{
|
||||
return basename(dirname(__DIR__));
|
||||
}
|
||||
|
||||
/**
|
||||
* This module name.
|
||||
*/
|
||||
public static function name(): string
|
||||
{
|
||||
$name = dcCore::app()->plugins->moduleInfo(self::id(), 'name');
|
||||
|
||||
return __(is_string($name) ? $name : self::id());
|
||||
}
|
||||
|
||||
/**
|
||||
* This module path.
|
||||
*/
|
||||
public static function path(): string
|
||||
{
|
||||
return dirname(__DIR__);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue