prepare to DC 2.24

This commit is contained in:
Jean-Christian Paul Denis 2022-11-17 22:41:04 +01:00
parent 41f6c20e6f
commit 94f7e4da7e
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
7 changed files with 156 additions and 315 deletions

View File

@ -10,23 +10,22 @@
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_CONTEXT_ADMIN')) {
return;
}
# settings namespace
$core->blog->settings->addNamespace('saba');
dcCore::app()->blog->settings->addNamespace('saba');
# widget
require_once dirname(__FILE__) . '/_widgets.php';
require_once __DIR__ . '/_widgets.php';
# behaviors
$core->addBehavior(
'adminBlogPreferencesForm',
dcCore::app()->addBehavior(
'adminBlogPreferencesFormV2',
['adminSaba', 'adminBlogPreferencesForm']
);
$core->addBehavior(
dcCore::app()->addBehavior(
'adminBeforeBlogSettingsUpdate',
['adminSaba', 'adminBeforeBlogSettingsUpdate']
);
@ -34,19 +33,19 @@ $core->addBehavior(
# add settings to admin blog pref page
class adminSaba
{
public static function adminBlogPreferencesForm($core, $blog_settings)
public static function adminBlogPreferencesForm($blog_settings)
{
echo
'<div class="fieldset">' .
'<h4 id="saba_params">' . __('Search Across Blog Archive') . '</h4>' .
'<p><label class="classic">' .
form::checkbox('saba_active', '1', (boolean) $blog_settings->saba->active) .
form::checkbox('saba_active', '1', (bool) $blog_settings->saba->active) .
__('Enable advanced search on this blog') . '</label></p>' .
'<p><label class="classic">' .
form::checkbox('saba_error', '1', (boolean) $blog_settings->saba->error) .
form::checkbox('saba_error', '1', (bool) $blog_settings->saba->error) .
__('Enable suggestion for page 404') . '</label></p>' .
'<p class="form-note">' .
__("This suggests visitors some posts on page 404.") .
__('This suggests visitors some posts on page 404.') .
'</p>' .
'</div>';
}

View File

@ -10,7 +10,6 @@
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_RC_PATH')) {
return null;
}
@ -19,13 +18,13 @@ $this->registerModule(
'saba',
'Search across blog archive',
'Jean-Christian Denis and Contributors',
'2021.09.10',
'2022.11.12',
[
'requires' => [['core', '2.19']],
'permissions' => 'admin',
'type' => 'plugin',
'support' => 'https://github.com/JcDenis/saba',
'details' => 'https://plugins.dotaddict.org/dc2/details/saba',
'repository' => 'https://raw.githubusercontent.com/JcDenis/saba/master/dcstore.xml'
'requires' => [['core', '2.24']],
'permissions' => dcAuth::PERMISSION_ADMIN,
'type' => 'plugin',
'support' => 'https://github.com/JcDenis/saba',
'details' => 'https://plugins.dotaddict.org/dc2/details/saba',
'repository' => 'https://raw.githubusercontent.com/JcDenis/saba/master/dcstore.xml',
]
);

View File

@ -10,47 +10,46 @@
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_RC_PATH')) {
return null;
}
# setting
$core->blog->settings->addNamespace('saba');
dcCore::app()->blog->settings->addNamespace('saba');
if (!$core->blog->settings->saba->active) {
if (!dcCore::app()->blog->settings->saba->active) {
return null;
}
# translation
l10n::set(dirname(__FILE__) . '/locales/' . $_lang . '/public');
l10n::set(__DIR__ . '/locales/' . dcCore::app()->lang . '/public');
# widget
require_once dirname(__FILE__) . '/_widgets.php';
require_once __DIR__ . '/_widgets.php';
# template path
$core->tpl->setPath(
$core->tpl->getPath(),
dirname(__FILE__) . '/default-templates/'
dcCore::app()->tpl->setPath(
dcCore::app()->tpl->getPath(),
__DIR__ . '/default-templates/'
);
# behavior
$core->addBehavior(
dcCore::app()->addBehavior(
'templateCustomSortByAlias',
['pubSaba', 'templateCustomSortByAlias']
);
$core->addBehavior(
dcCore::app()->addBehavior(
'urlHandlerBeforeGetData',
['pubSaba', 'urlHandlerBeforeGetData']
);
$core->addBehavior(
dcCore::app()->addBehavior(
'coreBlogBeforeGetPosts',
['pubSaba', 'coreBlogBeforeGetPosts']
);
# url
if ($core->blog->settings->saba->error) {
$core->url->registerError(['urlSaba', 'error']);
if (dcCore::app()->blog->settings->saba->error) {
dcCore::app()->url->registerError(['urlSaba', 'error']);
}
class pubSaba
@ -58,54 +57,52 @@ class pubSaba
public static function templateCustomSortByAlias($alias)
{
$alias['post'] = [
'title' => 'post_title',
'selected' => 'post_selected',
'author' => 'user_id',
'date' => 'post_dt',
'update' => 'post_upddt',
'id' => 'post_id',
'comment' => 'nb_comment',
'trackback' => 'nb_trackback'
'title' => 'post_title',
'selected' => 'post_selected',
'author' => 'user_id',
'date' => 'post_dt',
'update' => 'post_upddt',
'id' => 'post_id',
'comment' => 'nb_comment',
'trackback' => 'nb_trackback',
];
}
public static function urlHandlerBeforeGetData($_ctx)
{
global $core;
$options = tplSaba::getSabaDefaultPostsOptions();
if (!empty($_GET['q']) && 1 < strlen($_GET['q'])) {
# search string
$params = new ArrayObject(['search' => rawurldecode($_GET['q'])]);
$options = self::getPostsParams($params);
$options = self::getPostsParams($params);
$options['q'] = rawurldecode($_GET['q']);
# count
$GLOBALS['_search'] = rawurldecode($_GET['q']);
if ($GLOBALS['_search']) {
$GLOBALS['_search_count'] = $core->blog->getPosts($params, true)->f(0);
dcCore::app()->public->search = rawurldecode($_GET['q']);
if (dcCore::app()->public->search) {
dcCore::app()->public->search_count = dcCore::app()->blog->getPosts($params, true)->f(0);
}
# pagintaion
$_page_number = !isset($GLOBALS['_page_number']) ? 1 : $GLOBALS['_page_number'];
$params['limit'] = $_ctx->nb_entry_per_page;
$_page_number = dcCore::app()->public->getPageNumber();
if ($_page_number < 1) {
$_page_number = 1;
}
$params['limit'] = dcCore::app()->ctx->nb_entry_per_page;
$params['limit'] = [(($_page_number - 1) * $params['limit']), $params['limit']];
# get posts
$_ctx->post_params = $params;
$_ctx->posts = $core->blog->getPosts($params);
dcCore::app()->ctx->post_params = $params;
dcCore::app()->ctx->posts = dcCore::app()->blog->getPosts($params);
unset($params);
}
$_ctx->saba_options = $options;
dcCore::app()->ctx->saba_options = $options;
}
public static function getPostsParams($params)
{
global $core;
if (!isset($params['sql'])) {
$params['sql'] = '';
}
@ -118,35 +115,34 @@ class pubSaba
parse_str($qs, $get);
# search string
$options = tplSaba::getSabaDefaultPostsOptions();
$options = tplSaba::getSabaDefaultPostsOptions();
$options['q'] = $params['search'];
# options
if (!empty($get['q_opt'])) {
if (in_array('selected', $get['q_opt'])) {
$options['q_opt'][] = 'selected';
$options['q_opt'][] = 'selected';
$params['post_selected'] = 1;
}
if (in_array('comment', $get['q_opt'])) {
$options['q_opt'][] = 'comment';
$params['sql'] = "AND nb_comment > 0 ";
$params['sql'] = 'AND nb_comment > 0 ';
}
if (in_array('trackback', $get['q_opt'])) {
$options['q_opt'][] = 'trackback';
$params['sql'] = "AND nb_trackback > 0";
$params['sql'] = 'AND nb_trackback > 0';
}
}
# categories
if (!empty($get['q_cat'])) {
$cats = array();
foreach($get['q_cat'] as $v) {
$v = abs((integer) $v);
$cats = [];
foreach ($get['q_cat'] as $v) {
$v = abs((int) $v);
if (!$v) {
continue;
}
$cats[] = "C.cat_id = '" . $v . "'";
$cats[] = "C.cat_id = '" . $v . "'";
$options['q_cat'][] = $v;
}
if (!empty($cats)) {
@ -156,12 +152,12 @@ class pubSaba
# post types
if (!empty($get['q_type'])) {
$types = $core->getPostTypes();
foreach($get['q_type'] as $v) {
$types = dcCore::app()->getPostTypes();
foreach ($get['q_type'] as $v) {
if (!$types[$v]) {
continue;
}
$options['q_type'][] = $v;
$options['q_type'][] = $v;
$params['post_type'][] = $v;
}
} else {
@ -171,8 +167,8 @@ class pubSaba
# age
$ages = tplSaba::getSabaFormAges();
if (!empty($get['q_age']) && in_array($get['q_age'], $ages)) {
$age = explode(',', $get['q_age']);
$ts = time();
$age = explode(',', $get['q_age']);
$ts = time();
$options['q_age'] = $get['q_age'];
if ($age[0]) {
@ -187,9 +183,9 @@ class pubSaba
# user
if (!empty($get['q_user'])) {
$users = array();
foreach($get['q_user'] as $v) {
$users[] = "U.user_id = '" . $core->con->escape($v) . "'";
$users = [];
foreach ($get['q_user'] as $v) {
$users[] = "U.user_id = '" . dcCore::app()->con->escape($v) . "'";
$options['q_user'][] = $v;
}
if (!empty($users)) {
@ -201,25 +197,23 @@ class pubSaba
$sort = 'desc';
if (!empty($get['q_rev'])) {
$options['q_rev'] = '1';
$sort = 'asc';
$sort = 'asc';
}
$orders = tplSaba::getSabaFormOrders();
if (!empty($get['q_order']) && in_array($get['q_order'], $orders)) {
$options['q_order'] = $get['q_order'];
$params['order'] = $core->tpl->getSortByStr(
['sortby' => $get['q_order'], 'order' => $sort],
$params['order'] = dcCore::app()->tpl->getSortByStr(
new ArrayObject(['sortby' => $get['q_order'], 'order' => $sort]),
'post'
); //?! post_type
}
return $options;
}
# Ajouter la condition "ou" à la recherche
public static function coreBlogBeforeGetPosts($p)
{
global $core;
if (empty($p['search'])) {
return;
}
@ -227,19 +221,19 @@ class pubSaba
self::getPostsParams($p);
$OR = [];
foreach(explode(',', $p['search']) as $sentence) {
$AND = [];
foreach (explode(',', $p['search']) as $sentence) {
$AND = [];
$words = text::splitWords($sentence);
foreach($words as $word) {
$AND[] = "post_words LIKE '%" . $core->con->escape($word) . "%'";
foreach ($words as $word) {
$AND[] = "post_words LIKE '%" . dcCore::app()->con->escape($word) . "%'";
}
if (!empty($AND)) {
$OR[] = " (" . implode (' AND ', $AND) . ") ";
$OR[] = ' (' . implode(' AND ', $AND) . ') ';
}
}
if (!empty($OR)) {
$p['search'] = '';
$p['sql'] .= "AND (" . implode (' OR ', $OR) . ") ";
$p['sql'] .= 'AND (' . implode(' OR ', $OR) . ') ';
}
}
}
@ -248,8 +242,6 @@ class urlSaba extends dcUrlHandlers
{
public static function error($args, $type, $e)
{
global $core, $_ctx;
if ($e->getCode() == 404) {
$q = explode('/', $args);
if (empty($q)) {
@ -257,7 +249,7 @@ class urlSaba extends dcUrlHandlers
}
# Clean URI
$_GET['q'] = implode('%20', $q);
$_GET['q'] = implode('%20', $q);
$_SERVER['QUERY_STRING'] = '';
# Claim comes from 404
@ -276,68 +268,68 @@ class tplSaba
public static function getSabaDefaultPostsOptions()
{
return [
'q'=> '',
'q_opt' => [],
'q_cat' => [],
'q_age' => '0,0',
'q_user'=> [],
'q_order'=> 'date',
'q_rev' => '0',
'q_type'=> []
'q' => '',
'q_opt' => [],
'q_cat' => [],
'q_age' => '0,0',
'q_user' => [],
'q_order' => 'date',
'q_rev' => '0',
'q_type' => [],
];
}
public static function getSabaFormOptions()
{
return [
__('Selected entry') => 'selected',
__('With comments') => 'comment',
__('With trackbacks') => 'trackback'
__('Selected entry') => 'selected',
__('With comments') => 'comment',
__('With trackbacks') => 'trackback',
];
}
public static function getSabaFormOrders()
{
return [
__('Title') => 'title',
__('Selected entry') => 'selected',
__('Author') => 'author',
__('Date') => 'date',
__('Update') => 'update',
__('Comments count') => 'comment',
__('Trackbacks count') => 'trackback'
__('Title') => 'title',
__('Selected entry') => 'selected',
__('Author') => 'author',
__('Date') => 'date',
__('Update') => 'update',
__('Comments count') => 'comment',
__('Trackbacks count') => 'trackback',
];
}
public static function getSabaFormAges()
{
return [
__('All') => '0,0',
__('Less than a month') => '0,2592000',
__('From 1 to 6 month') => '2592000,15552000',
__('All') => '0,0',
__('Less than a month') => '0,2592000',
__('From 1 to 6 month') => '2592000,15552000',
__('From 6 to 12 month') => '15552000,31536000',
__('More than a year') => '31536000,0'
__('More than a year') => '31536000,0',
];
}
public static function getSabaFormTypes()
{
$know = [
'post' => __('Entry'),
'page' => __('Page'),
'post' => __('Entry'),
'page' => __('Page'),
'pollsfactory' => __('Poll'),
'eventhandler' => __('Event')
'eventhandler' => __('Event'),
];
// todo: add behavior for unknow types
$rs = [];
$types = $GLOBALS['core']->getPostTypes();
$rs = [];
$types = dcCore::app()->getPostTypes();
foreach($types as $k => $v) {
foreach ($types as $k => $v) {
if (!$v['public_url']) {
continue;
}
$rs[isset($know[$k]) ? $know[$k] : __($k)] = $k;
$rs[$know[$k] ?? __($k)] = $k;
}
return $rs;

View File

@ -10,24 +10,21 @@
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_RC_PATH')) {
return null;
}
$core->addBehavior('initWidgets', ['sabaWidget', 'setWidget']);
dcCore::app()->addBehavior('initWidgets', ['sabaWidget', 'setWidget']);
class sabaWidget
{
public static function setWidget($w)
{
global $core;
$w
->create(
'saba',
__('Advanced search'),
array('sabaWidget', 'getWidget'),
['sabaWidget', 'getWidget'],
null,
__('Add more search options on public side')
)
@ -79,15 +76,13 @@ class sabaWidget
public static function getWidget($w)
{
global $core, $_ctx;
dcCore::app()->blog->settings->addNamespace('saba');
$core->blog->settings->addNamespace('saba');
if (!$core->blog->settings->saba->active) {
if (!dcCore::app()->blog->settings->saba->active) {
return;
}
if (!$core->blog->settings->saba->error && $core->url->type == '404') {
if (!dcCore::app()->blog->settings->saba->error && dcCore::app()->url->type == '404') {
return;
}
@ -95,12 +90,11 @@ class sabaWidget
return;
}
$q = $_ctx->saba_otpion ?? '';
$q = dcCore::app()->ctx->saba_otpion ?? '';
# title and search
$res =
($w->title ? $w->renderTitle('<label for="q">' . html::escapeHTML($w->title) . '</label>') : '') .
'<form action="' . $core->blog->url . '" method="get" role="search">' .
$res = ($w->title ? $w->renderTitle('<label for="q">' . html::escapeHTML($w->title) . '</label>') : '') .
'<form action="' . dcCore::app()->blog->url . '" method="get" role="search">' .
'<p><input type="text" size="10" maxlength="255" id="q" name="q" value="' .
html::escapeHTML($q) . '" ' .
($w->placeholder ? 'placeholder="' . html::escapeHTML($w->placeholder) . '"' : '') .
@ -108,22 +102,20 @@ class sabaWidget
'<input type="submit" class="submit" value="ok" title="' . __('Search') . '" /></p>' ;
# advenced search only on search page
if ($core->url->type == 'search') {
if (dcCore::app()->url->type == 'search') {
# order
if (!$w->saba_filter_orders) {
$ct = '';
foreach(tplSaba::getSabaFormOrders() as $k => $v) {
$ct .=
'<li><label><input name="q_order" type="radio" value="' .
foreach (tplSaba::getSabaFormOrders() as $k => $v) {
$ct .= '<li><label><input name="q_order" type="radio" value="' .
$v . '" ' .
($v == $_ctx->saba_options['q_order'] ? 'checked="checked" ' : '') .
($v == dcCore::app()->ctx->saba_options['q_order'] ? 'checked="checked" ' : '') .
'/> ' . html::escapeHTML($k) . '</label></li>';
}
if (!empty($ct)) {
$ct .= '<li><label><input name="q_rev" type="checkbox" value="1" ' .
(!empty($_ctx->saba_options['q_rev']) ? 'checked="checked" ' : '') .
(!empty(dcCore::app()->ctx->saba_options['q_rev']) ? 'checked="checked" ' : '') .
'/> ' . __('Reverse order') . '</label></li>';
$res .= $w->renderTitle(__('Filter order')) . sprintf('<ul>%s</ul>', $ct);
}
@ -134,14 +126,13 @@ class sabaWidget
$ct = '';
$rm = explode(',', $w->saba_remove_options);
foreach(tplSaba::getSabaFormOptions() as $k => $v) {
foreach (tplSaba::getSabaFormOptions() as $k => $v) {
if (in_array($v, $rm)) {
continue;
}
$ct .=
'<li><label><input name="q_opt[]" type="checkbox" value="' .
$ct .= '<li><label><input name="q_opt[]" type="checkbox" value="' .
$v . '" ' .
(in_array($v, $_ctx->saba_options['q_opt']) ? 'checked="checked" ' : '') .
(in_array($v, dcCore::app()->ctx->saba_options['q_opt']) ? 'checked="checked" ' : '') .
'/> ' . html::escapeHTML($k) . '</label></li>';
}
if (!empty($ct)) {
@ -153,11 +144,10 @@ class sabaWidget
if (!$w->saba_filter_ages) {
$ct = '';
foreach(tplSaba::getSabaFormAges() as $k => $v) {
$ct .=
'<li><label><input name="q_age" type="radio" value="' .
foreach (tplSaba::getSabaFormAges() as $k => $v) {
$ct .= '<li><label><input name="q_age" type="radio" value="' .
$v . '" ' .
($v == $_ctx->saba_options['q_age'] ? 'checked="checked" ' : '') .
($v == dcCore::app()->ctx->saba_options['q_age'] ? 'checked="checked" ' : '') .
'/> ' . html::escapeHTML($k) . '</label></li>';
}
if (!empty($ct)) {
@ -170,14 +160,13 @@ class sabaWidget
$ct = '';
$rm = explode(',', $w->saba_remove_types);
foreach(tplSaba::getSabaFormTypes() as $k => $v) {
foreach (tplSaba::getSabaFormTypes() as $k => $v) {
if (in_array($v, $rm)) {
continue;
}
$ct .=
'<li><label><input name="q_type[]" type="checkbox" value="' .
$ct .= '<li><label><input name="q_type[]" type="checkbox" value="' .
$v . '" ' .
(in_array($v, $_ctx->saba_options['q_type']) ? 'checked="checked" ' : '') .
(in_array($v, dcCore::app()->ctx->saba_options['q_type']) ? 'checked="checked" ' : '') .
'/> ' . html::escapeHTML($k) . '</label></li>';
}
if (!empty($ct)) {
@ -189,16 +178,15 @@ class sabaWidget
if (!$w->saba_filter_categories) {
$ct = '';
$rm = explode(',', $w->saba_remove_categories);
$rs = $core->blog->getCategories();
$rs = dcCore::app()->blog->getCategories();
while ($rs->fetch()) {
if (in_array($rs->cat_id, $rm) || in_array($rs->cat_url, $rm)) {
continue;
continue;
}
$ct .=
'<li><label><input name="q_cat[]" type="checkbox" value="' .
$ct .= '<li><label><input name="q_cat[]" type="checkbox" value="' .
$rs->cat_id . '" ' .
(in_array($rs->cat_id, $_ctx->saba_options['q_cat']) ? 'checked="checked" ' : '') .
(in_array($rs->cat_id, dcCore::app()->ctx->saba_options['q_cat']) ? 'checked="checked" ' : '') .
'/> ' . html::escapeHTML($rs->cat_title) . '</label></li>';
}
if (!empty($ct)) {
@ -210,16 +198,15 @@ class sabaWidget
if (!$w->saba_filter_authors) {
$ct = '';
$rm = explode(',', $w->saba_remove_authors);
$rs = $core->blog->getPostsUsers();
$rs = dcCore::app()->blog->getPostsUsers();
while ($rs->fetch()) {
if (in_array($rs->user_id, $rm)) {
continue;
continue;
}
$ct .=
'<li><label><input name="q_user[]" type="checkbox" value="' .
$ct .= '<li><label><input name="q_user[]" type="checkbox" value="' .
$rs->user_id . '" ' .
(in_array($rs->user_id, $_ctx->saba_options['q_user']) ? 'checked="checked" ' : '') .
(in_array($rs->user_id, dcCore::app()->ctx->saba_options['q_user']) ? 'checked="checked" ' : '') .
'/> ' . html::escapeHTML(dcUtils::getUserCN($rs->user_id, $rs->user_name, $rs->user_firstname, $rs->user_displayname)) . '</label></li>';
}
if (!empty($ct)) {

View File

@ -1,56 +0,0 @@
<?php
// Language: Français
// Module: saba - 2021.08.21
// Date: 2021-08-22 23:22:12
// Translated with dcTranslater - 2021.08.18
#_admin.php:38
$GLOBALS['__l10n']['Search Across Blog Archive'] = 'Rechercher dans les archives';
#_admin.php:41
$GLOBALS['__l10n']['Enable advanced search on this blog'] = 'Activer la recherche avancée sur ce blog';
#_admin.php:44
$GLOBALS['__l10n']['Enable suggestion for page 404'] = 'Activer la suggestion sur la page 404';
#_admin.php:46
$GLOBALS['__l10n']['This suggests visitors some posts on page 404.'] = 'Ceci suggère au visiteurs des billets sur la page 404.';
#_widgets.php:18
$GLOBALS['__l10n']['Advanced search'] = 'Recherche avancée';
#_widgets.php:21
$GLOBALS['__l10n']['Add more search options on public side'] = 'Ajoute plus d\'options de recherche';
#_widgets.php:26
$GLOBALS['__l10n']['Disable filter on post types'] = 'Désactiver le filtre de type de billets';
#_widgets.php:30
$GLOBALS['__l10n']['Hidden types:'] = 'Billets cachés :';
#_widgets.php:33
$GLOBALS['__l10n']['Disable filter on post options'] = 'Désactiver le filtre des options de billet';
#_widgets.php:37
$GLOBALS['__l10n']['Hidden options:'] = 'Options cachées :';
#_widgets.php:40
$GLOBALS['__l10n']['Disable filter on categories'] = 'Désactiver le filtre de catégories';
#_widgets.php:44
$GLOBALS['__l10n']['Hidden categories:'] = 'Catégories cachées';
#_widgets.php:47
$GLOBALS['__l10n']['Disable filter on authors'] = 'Désactiver le filtre d\'auteurs';
#_widgets.php:51
$GLOBALS['__l10n']['Hidden authors:'] = 'Auteurs cachés';
#_widgets.php:54
$GLOBALS['__l10n']['Disable filter on order'] = 'Désactiver le filtre d\'ordre';
#_widgets.php:60
$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 :';

View File

@ -1,81 +0,0 @@
<?php
// Language: Français
// Module: saba - 2021.08.21
// Date: 2021-08-22 23:22:12
// Translated with dcTranslater - 2021.08.18
#_public.php:293
#_public.php:303
$GLOBALS['__l10n']['Selected entry'] = 'Billet sélectionné';
#_public.php:294
$GLOBALS['__l10n']['With comments'] = 'Avec commentaires';
#_public.php:295
$GLOBALS['__l10n']['With trackbacks'] = 'Avec rétroliens';
#_public.php:302
$GLOBALS['__l10n']['Title'] = 'Titre';
#_public.php:304
$GLOBALS['__l10n']['Author'] = 'Auteur·rice';
#_public.php:305
$GLOBALS['__l10n']['Date'] = 'Date';
#_public.php:306
$GLOBALS['__l10n']['Update'] = 'Mise à jour';
#_public.php:307
$GLOBALS['__l10n']['Comments count'] = 'Nombre de commentaires';
#_public.php:308
$GLOBALS['__l10n']['Trackbacks count'] = 'Nombre de rétroliens';
#_public.php:315
$GLOBALS['__l10n']['All'] = 'Tous';
#_public.php:316
$GLOBALS['__l10n']['Less than a month'] = 'Moins d\'un mois';
#_public.php:317
$GLOBALS['__l10n']['From 1 to 6 month'] = 'De 1 à 6 mois';
#_public.php:318
$GLOBALS['__l10n']['From 6 to 12 month'] = 'De 6 à 12 mois';
#_public.php:319
$GLOBALS['__l10n']['More than a year'] = 'Plus d\'un an';
#_public.php:326
$GLOBALS['__l10n']['Entry'] = 'Publication';
#_public.php:327
$GLOBALS['__l10n']['Page'] = 'Page';
#_public.php:328
$GLOBALS['__l10n']['Poll'] = 'Sondage';
#_public.php:329
$GLOBALS['__l10n']['Event'] = 'Événement';
#_widgets.php:114
$GLOBALS['__l10n']['Reverse order'] = 'Inverser l\'ordre';
#_widgets.php:115
$GLOBALS['__l10n']['Filter order'] = 'Options de tri';
#_widgets.php:135
$GLOBALS['__l10n']['Filter options'] = 'Options du filtre';
#_widgets.php:151
$GLOBALS['__l10n']['Filter by age'] = 'Filtrer par date';
#_widgets.php:171
$GLOBALS['__l10n']['Filter by type'] = 'Filtrer par type';
#_widgets.php:192
$GLOBALS['__l10n']['Filter by category'] = 'Filter par catégorie';
#_widgets.php:213
$GLOBALS['__l10n']['Filter by author'] = 'Filtrer par auteur';

View File

@ -1,4 +1,5 @@
<?php
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of saba, a plugin for Dotclear 2.
@ -16,5 +17,5 @@ if (!defined('DC_RC_PATH')) {
}
if (!empty($_REQUEST['module']) && $_REQUEST['module'] == 'saba') {
$__resources['help']['core_plugins_conf'] = dirname(__FILE__) . '/help/help.html';
dcCore::app()->resources['help']['core_plugins_conf'] = __DIR__ . '/help/help.html';
}