diff --git a/README.md b/README.md new file mode 100644 index 0000000..4dfcbdf --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Countdown + +Le plugin propose un widget qui affiche un compte à rebours vers une date à venir ou un chronomètre vers une date passée. + +Documentation + +L'affichage dynamique utilise le plugin jQuery Countdown (http://keith-wood.name/countdown.html) qui propose une syntaxe riche pour le formatage (http://keith-wood.name/countdownRef.html#format) et l'affichage (http://keith-wood.name/countdownRef.html#layout). \ No newline at end of file diff --git a/_define.php b/_define.php index 4eb4f76..d5b5535 100644 --- a/_define.php +++ b/_define.php @@ -22,16 +22,17 @@ if (!defined('DC_RC_PATH')) {return;} $this->registerModule( - /* Name */ "CountDown", - /* Description*/ "Countdown and stopwatch", - /* Author */ "Moe (http://gniark.net/), Pierre Van Glabeke", - /* Version */ '1.6', - /* Properties */ - array( - 'permissions' => 'admin', - 'type' => 'plugin', - 'dc_min' => '2.24', - 'support' => 'http://lab.dotclear.org/wiki/plugin/countdown', - 'details' => 'http://plugins.dotaddict.org/dc2/details/countdown' - ) -); \ No newline at end of file + 'CountDown', + 'Countdown and stopwatch', + 'Moe (http://gniark.net/), Pierre Van Glabeke', + '2.0.0', + [ + 'requires' => [['core', '2.24']], + 'permissions' => dcCore::app()->auth->makePermissions([ + dcAuth::PERMISSION_ADMIN, + ]), + 'type' => 'plugin', + 'support' => 'https://forum.dotclear.org/viewforum.php?id=16', + 'details' => 'http://plugins.dotaddict.org/dc2/details/countdown' + ] +); diff --git a/_widget.php b/_widget.php index 0d54b0a..812f12f 100644 --- a/_widget.php +++ b/_widget.php @@ -223,12 +223,12 @@ class CountDownBehaviors else { # dynamic display with Countdown for jQuery - if (!is_numeric($GLOBALS['_ctx']->countdown)) + if (!is_numeric(dcCore::app()->ctx->countdown)) { - $GLOBALS['_ctx']->countdown = 0; + dcCore::app()->ctx->countdown = 0; } - $id = $GLOBALS['_ctx']->countdown; - $GLOBALS['_ctx']->countdown += 1; + $id = dcCore::app()->ctx->countdown; + dcCore::app()->ctx->countdown += 1; $script = ''; diff --git a/changelog b/changelog index b9084d6..9759c2c 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,4 @@ -v1.6 - 20-12-2022 - Pierre Van Glabeke +v1.6 - 28-12-2022 - Pierre Van Glabeke * màj partielle dc2.24 v1.5 - 29-07-2016 - Pierre Van Glabeke