clean up code

This commit is contained in:
Jean-Christian Paul Denis 2021-09-02 23:22:11 +02:00
parent babe02dc68
commit 7c4dfabc5c
8 changed files with 64 additions and 66 deletions

View File

@ -1,31 +1,32 @@
topWriter x.x - xxxx.xx.xx 0.8.1 - dev
* literal rank of writer depending of num of com - [ ] literal rank of writer depending of num of com
- [x] clean up code
topWriter 0.8 - 2021.08.27 0.8 - 2021.08.27
- clean up (PSR2, short array, ...) - clean up (PSR2, short array, ...)
- update widget class - update widget class
- fix translations - fix translations
- update license - update license
topWriter 0.7 - 25-04-2015 - Pierre Van Glabeke 0.7 - 25-04-2015 - Pierre Van Glabeke
- Modification url support - Modification url support
topWriter 0.6 - 23-01-2015 - Pierre Van Glabeke 0.6 - 23-01-2015 - Pierre Van Glabeke
- Modifications locales pour widget - Modifications locales pour widget
topWriter 0.5 - 19-01-2015 - Pierre Van Glabeke 0.5 - 19-01-2015 - Pierre Van Glabeke
- Compatibilité dc2.7 - Compatibilité dc2.7
topWriter 0.4 - 2013-11-12 0.4 - 2013-11-12
- Switch to Dotclear 2.6 - Switch to Dotclear 2.6
- Add widget options - Add widget options
- Use plural forms - Use plural forms
topWriter 0.3 - 2010-10-06 0.3 - 2010-10-06
- Switched to DC 2.2 - Switched to DC 2.2
- Fixed list order (thanks to Atv') - Fixed list order (thanks to Atv')
topWriter 0.2 - 2009-08-10 0.2 - 2009-08-10
- Fixed php 5.3 compatibility - Fixed php 5.3 compatibility
- Fixed PostGreSQL compatibility - Fixed PostGreSQL compatibility
- Added option to exclude post authors from comment list - Added option to exclude post authors from comment list

View File

@ -9,14 +9,14 @@ Show most active contributor on a widget.
## REQUIREMENTS ## REQUIREMENTS
topWriter requires: _topWriter_ requires:
* permissions to manage widgets * permissions to manage widgets
* Dotclear 2.6 * Dotclear 2.19
## USAGE ## USAGE
First install topWriter, manualy from a zip package or from First install _topWriter_, manualy from a zip package or from
Dotaddict repository. (See Dotclear's documentation to know how do this) Dotaddict repository. (See Dotclear's documentation to know how do this)
Add and configure "Top writer" from widgets manager. Add and configure "Top writer" from widgets manager.
@ -31,4 +31,4 @@ There are two widget: entries and comments.
## CONTRIBUTORS ## CONTRIBUTORS
* Jean-Chirstian Denis * Jean-Chirstian Denis
* Pierre Van Glabeke * Pierre Van Glabeke

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief topWriter, a plugin for Dotclear 2
# This file is part of topWriter, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis, Pierre Van Glabeke
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_CONTEXT_ADMIN')) { if (!defined('DC_CONTEXT_ADMIN')) {
return null; return null;

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief topWriter, a plugin for Dotclear 2
# This file is part of topWriter, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis, Pierre Van Glabeke
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_RC_PATH')) { if (!defined('DC_RC_PATH')) {
return null; return null;
@ -21,9 +21,9 @@ $this->registerModule(
'Jean-Christian Denis, Pierre Van Glabeke', 'Jean-Christian Denis, Pierre Van Glabeke',
'0.8.1', '0.8.1',
[ [
'requires' => [['core', '2.19']],
'permissions' => 'admin', 'permissions' => 'admin',
'type' => 'plugin', 'type' => 'plugin',
'dc_min' => '2.19',
'support' => 'http://forum.dotclear.org/viewtopic.php?pid=333002#p333002', 'support' => 'http://forum.dotclear.org/viewtopic.php?pid=333002#p333002',
'details' => 'http://plugins.dotaddict.org/dc2/details/topWriter', 'details' => 'http://plugins.dotaddict.org/dc2/details/topWriter',
'repository' => 'https://raw.githubusercontent.com/JcDenis/topWriter/master/dcstore.xml' 'repository' => 'https://raw.githubusercontent.com/JcDenis/topWriter/master/dcstore.xml'

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief topWriter, a plugin for Dotclear 2
# This file is part of topWriter, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis, Pierre Van Glabeke
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_RC_PATH')) { if (!defined('DC_RC_PATH')) {
return null; return null;

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief topWriter, a plugin for Dotclear 2
# This file is part of topWriter, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis, Pierre Van Glabeke
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_RC_PATH')) { if (!defined('DC_RC_PATH')) {
return null; return null;
@ -221,7 +221,7 @@ class topWriterWidget
sprintf('<ul>%s</ul>', $content) sprintf('<ul>%s</ul>', $content)
); );
} }
public static function topPost($w) public static function topPost($w)
{ {
global $core; global $core;

View File

@ -1,13 +1,11 @@
<modules xmlns:da="http://dotaddict.org/da/"> <modules xmlns:da="http://dotaddict.org/da/">
<module id="topWriter"> <module id="topWriter">
<name>topWriter</name> <name>topWriter</name>
<version>0.8</version> <version>0.8.1</version>
<author>Jean-Christian Denis, Pierre Van Glabeke</author> <author>Jean-Christian Denis, Pierre Van Glabeke</author>
<desc>Ranking of the most prolific writers and/or commentators</desc> <desc>Ranking of the most prolific writers and/or commentators</desc>
<file>https://github.com/JcDenis/topWriter/releases/download/v0.8/plugin-topWriter.zip</file> <file>https://github.com/JcDenis/topWriter/releases/download/v0.8.1/plugin-topWriter.zip</file>
<da:dcmin>2.19</da:dcmin>
<da:details>http://plugins.dotaddict.org/dc2/details/topWriter</da:details> <da:details>http://plugins.dotaddict.org/dc2/details/topWriter</da:details>
<da:section></da:section>
<da:support>http://forum.dotclear.org/viewtopic.php?pid=333002#p333002</da:support> <da:support>http://forum.dotclear.org/viewtopic.php?pid=333002#p333002</da:support>
</module> </module>
</modules> </modules>

View File

@ -71,5 +71,4 @@ $GLOBALS['__l10n']['%s entries'] = '%s billets';
$GLOBALS['__l10n']['un comment'] = 'un commentaire'; $GLOBALS['__l10n']['un comment'] = 'un commentaire';
$GLOBALS['__l10n']['%s comments'] = '%s commentaires'; $GLOBALS['__l10n']['%s comments'] = '%s commentaires';