clean up and add dcstore.xml

This commit is contained in:
Jean-Christian Paul Denis 2021-09-02 22:53:22 +02:00
parent 9158a6c9dd
commit 00aea1f0ce
8 changed files with 81 additions and 67 deletions

View File

@ -1,23 +1,27 @@
2021.08.21.1 - dev
- fix widget empty context
- clean up again...
2021.08.21 2021.08.21
* update license - update license
* fix query - fix query
* move to PSR-2 coding style and short array - move to PSR-2 coding style and short array
* move config to widget - move config to widget
* move template to widget - move template to widget
* use default template for search - use default template for search
* use custom template for 404 - use custom template for 404
* fix public translation - fix public translation
2013.10.28 2013.10.28
* Switch to Dotclear 2.6 - Switch to Dotclear 2.6
* Add french help - Add french help
2013.07.12 2013.07.12
* Enhanced template for search page - Enhanced template for search page
2013.06.30 2013.06.30
* Fixed 404 template - Fixed 404 template
* Added options to disabled public filters - Added options to disabled public filters
0.1 20100909 0.1 20100909
* First lab release - First lab release

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief saba, a plugin for Dotclear 2
# This file is part of saba, 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 and Contributors
# 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; return;

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief saba, a plugin for Dotclear 2
# This file is part of saba, 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 and Contributors
# 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,10 +21,11 @@ $this->registerModule(
'Jean-Christian Denis and Contributors', 'Jean-Christian Denis and Contributors',
'2021.08.21.1', '2021.08.21.1',
[ [
'requires' => [['core', '2.19']],
'permissions' => 'admin', 'permissions' => 'admin',
'type' => 'plugin', 'type' => 'plugin',
'dc_min' => '2.19',
'support' => 'https://github.com/JcDenis/saba', 'support' => 'https://github.com/JcDenis/saba',
'details' => 'https://plugins.dotaddict.org/dc2/details/saba' 'details' => 'https://plugins.dotaddict.org/dc2/details/saba',
'repository' => 'https://raw.githubusercontent.com/JcDenis/saba/master/dcstore.xml'
] ]
); );

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief saba, a plugin for Dotclear 2
# This file is part of saba, 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 and Contributors
# 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;
@ -123,7 +123,7 @@ class pubSaba
# options # options
if (!empty($get['q_opt'])) { if (!empty($get['q_opt'])) {
if (in_array('selected', $get['q_opt'])) { if (in_array('selected', $get['q_opt'])) {
$options['q_opt'][] = 'selected'; $options['q_opt'][] = 'selected';
$params['post_selected'] = 1; $params['post_selected'] = 1;
@ -174,7 +174,7 @@ class pubSaba
$age = explode(',', $get['q_age']); $age = explode(',', $get['q_age']);
$ts = time(); $ts = time();
$options['q_age'] = $get['q_age']; $options['q_age'] = $get['q_age'];
if ($age[0]) { if ($age[0]) {
$params['sql'] .= "AND P.post_dt < '" . $params['sql'] .= "AND P.post_dt < '" .
dt::str('%Y-%m-%d %H:%m:%S', $ts - $age[0]) . "' "; dt::str('%Y-%m-%d %H:%m:%S', $ts - $age[0]) . "' ";

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief saba, a plugin for Dotclear 2
# This file is part of saba, 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 and Contributors
# 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;
@ -80,7 +80,7 @@ class sabaWidget
public static function getWidget($w) public static function getWidget($w)
{ {
global $core, $_ctx; global $core, $_ctx;
$core->blog->settings->addNamespace('saba'); $core->blog->settings->addNamespace('saba');
if (!$core->blog->settings->saba->active) { if (!$core->blog->settings->saba->active) {

11
dcstore.xml Normal file
View File

@ -0,0 +1,11 @@
<modules xmlns:da="http://dotaddict.org/da/">
<module id="saba">
<name>saba</name>
<version>2021.08.21.1</version>
<author>Jean-Christian Denis and Contributors</author>
<desc>Search across blog archive</desc>
<file>https://github.com/JcDenis/saba/releases/download/v2021.08.21.1/plugin-saba.zip</file>
<da:details>https://plugins.dotaddict.org/dc2/details/saba</da:details>
<da:support>https://github.com/JcDenis/saba</da:support>
</module>
</modules>

View File

@ -53,5 +53,4 @@ $GLOBALS['__l10n']['Disable filter on order'] = 'Désactiver le filtre d\'ordre'
$GLOBALS['__l10n']['Disable filter on age'] = 'Désactiver le filtre de date'; $GLOBALS['__l10n']['Disable filter on age'] = 'Désactiver le filtre de date';
#default-templates/saba_404_dotty.html:22 #default-templates/saba_404_dotty.html:22
$GLOBALS['__l10n']['Suggested items:'] = 'Articles suggérés :'; $GLOBALS['__l10n']['Suggested items:'] = 'Articles suggérés :';

View File

@ -78,5 +78,4 @@ $GLOBALS['__l10n']['Filter by type'] = 'Filtrer par type';
$GLOBALS['__l10n']['Filter by category'] = 'Filter par catégorie'; $GLOBALS['__l10n']['Filter by category'] = 'Filter par catégorie';
#_widgets.php:213 #_widgets.php:213
$GLOBALS['__l10n']['Filter by author'] = 'Filtrer par auteur'; $GLOBALS['__l10n']['Filter by author'] = 'Filtrer par auteur';