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
* update license
* fix query
* move to PSR-2 coding style and short array
* move config to widget
* move template to widget
* use default template for search
* use custom template for 404
* fix public translation
- update license
- fix query
- move to PSR-2 coding style and short array
- move config to widget
- move template to widget
- use default template for search
- use custom template for 404
- fix public translation
2013.10.28
* Switch to Dotclear 2.6
* Add french help
- Switch to Dotclear 2.6
- Add french help
2013.07.12
* Enhanced template for search page
- Enhanced template for search page
2013.06.30
* Fixed 404 template
* Added options to disabled public filters
- Fixed 404 template
- Added options to disabled public filters
0.1 20100909
* First lab release
- First lab release

View File

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

View File

@ -1,15 +1,15 @@
<?php
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of saba, a plugin for Dotclear 2.
#
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors
#
# Licensed under the GPL version 2.0 license.
# A copy of this license is available in LICENSE file or at
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK ------------------------------------
/**
* @brief saba, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis and Contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_RC_PATH')) {
return null;
@ -21,10 +21,11 @@ $this->registerModule(
'Jean-Christian Denis and Contributors',
'2021.08.21.1',
[
'requires' => [['core', '2.19']],
'permissions' => 'admin',
'type' => 'plugin',
'dc_min' => '2.19',
'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
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of saba, a plugin for Dotclear 2.
#
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors
#
# Licensed under the GPL version 2.0 license.
# A copy of this license is available in LICENSE file or at
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK ------------------------------------
/**
* @brief saba, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis and Contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_RC_PATH')) {
return null;
@ -123,7 +123,7 @@ class pubSaba
# options
if (!empty($get['q_opt'])) {
if (in_array('selected', $get['q_opt'])) {
$options['q_opt'][] = 'selected';
$params['post_selected'] = 1;
@ -174,7 +174,7 @@ class pubSaba
$age = explode(',', $get['q_age']);
$ts = time();
$options['q_age'] = $get['q_age'];
if ($age[0]) {
$params['sql'] .= "AND P.post_dt < '" .
dt::str('%Y-%m-%d %H:%m:%S', $ts - $age[0]) . "' ";

View File

@ -1,15 +1,15 @@
<?php
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of saba, a plugin for Dotclear 2.
#
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors
#
# Licensed under the GPL version 2.0 license.
# A copy of this license is available in LICENSE file or at
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK ------------------------------------
/**
* @brief saba, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis and Contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_RC_PATH')) {
return null;
@ -80,7 +80,7 @@ class sabaWidget
public static function getWidget($w)
{
global $core, $_ctx;
$core->blog->settings->addNamespace('saba');
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';
#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';
#_widgets.php:213
$GLOBALS['__l10n']['Filter by author'] = 'Filtrer par auteur';
$GLOBALS['__l10n']['Filter by author'] = 'Filtrer par auteur';