release 1.6 for dotclear 2.24

master
Jean-Christian Paul Denis 2022-12-14 23:35:40 +01:00
parent 266817b030
commit b4df311f19
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
13 changed files with 566 additions and 568 deletions

View File

@ -1,37 +1,38 @@
v1.5 - 16-09-2021 Pierre Van Glabeke 1.6 - 2022.12.14
* Update to dotclear 2.24
1.5 - 2021.09.16 Pierre Van Glabeke
* champs rallongés * champs rallongés
v1.4 - 15-09-2021 - Pierre Van Glabeke 1.4 - 2021.09.15 - Pierre Van Glabeke
* correction bug affichage dc2.19 * correction bug affichage dc2.19
* dc2.19 requis * dc2.19 requis
v1.3 - 21-01-2018 - Pierre Van Glabeke 1.3 - 2018.01.21 - Pierre Van Glabeke
* modif setting * modif setting
* modif index * modif index
* modif localisation * modif localisation
v1.2 - 12-06-2016 - Pierre Van Glabeke 1.2 - 2.16.06.12 - Pierre Van Glabeke
* ajout code sécu resources.php * ajout code sécu resources.php
* modif intitulé dans admin * modif intitulé dans admin
v1.1 - 05-03-2015 - Pierre Van Glabeke 1.1 - 2.15.03.05 - Pierre Van Glabeke
* compatibilité dc2.7 * compatibilité dc2.7
* cosmétique dc2.6 * cosmétique dc2.6
* localisation * localisation
* aide intégrée * aide intégrée
* version effectuée depuis la v1.0.1 présente sur DA * version effectuée depuis la v1.0.1 présente sur DA
2010-07-15 Gaetan Guillard <gaetan@bistroduweb.com> 0.x - 2010.07.15 Gaetan Guillard <gaetan@bistroduweb.com>
* v1.0.1 - Corrections for compatibility with Dotclear 2.2 * v1.0.1 - Corrections for compatibility with Dotclear 2.2
2008-10-18 Oleksandr Syenchuk <sacha@xn--phnix-csa.net> 0.x - 2008.10.18 Oleksandr Syenchuk <sacha@xn--phnix-csa.net>
* v2008.10 - Removed theme parameter from URL * v2008.10 - Removed theme parameter from URL
0.x - 2008.08.21 Oleksandr Syenchuk <sacha@xn--phnix-csa.net>
2008-08-21 Oleksandr Syenchuk <sacha@xn--phnix-csa.net>
* Excluded themes can not be selected by user. * Excluded themes can not be selected by user.
0.x - 2008.04.21 Oleksandr Syenchuk <sacha@xn--phnix-csa.net>
2008-04-21 Oleksandr Syenchuk <sacha@xn--phnix-csa.net>
* Dotclear r1790 compatibility, see * Dotclear r1790 compatibility, see
http://dev.dotclear.net/2.0/changeset/1790 http://dev.dotclear.net/2.0/changeset/1790

23
LICENSE
View File

@ -1,12 +1,12 @@
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 2, June 1991 Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/> Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
Preamble Preamble
The licenses for most software are designed to take away your The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public freedom to share and change it. By contrast, the GNU General Public
@ -56,7 +56,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and The precise terms and conditions for copying, distribution and
modification follow. modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains 0. This License applies to any program or other work which contains
@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally. of promoting the sharing and reuse of software generally.
NO WARRANTY NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES. POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it possible use to the public, the best way to achieve this is to make it
@ -290,8 +290,8 @@ to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found. the "copyright" line and a pointer to where the full notice is found.
{description} <one line to give the program's name and a brief idea of what it does.>
Copyright (C) {year} {fullname} Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -329,7 +329,7 @@ necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker. `Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989 <signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice Ty Coon, President of Vice
This General Public License does not permit incorporating your program into This General Public License does not permit incorporating your program into
@ -337,4 +337,3 @@ proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. Public License instead of this License.

View File

@ -1,2 +1,47 @@
# Arlequin # README
Permettre aux visiteurs de choisir un thème
[![Release](https://img.shields.io/github/v/release/JcDenis/arlequin)](https://github.com/JcDenis/arlequin/releases)
[![Date](https://img.shields.io/github/release-date/JcDenis/arlequin)](https://github.com/JcDenis/arlequin/releases)
[![Issues](https://img.shields.io/github/issues/JcDenis/arlequin)](https://github.com/JcDenis/arlequin/issues)
[![Dotclear](https://img.shields.io/badge/dotclear-v2.24-blue.svg)](https://fr.dotclear.org/download)
[![Dotaddict](https://img.shields.io/badge/dotaddict-official-green.svg)](https://plugins.dotaddict.org/dc2/details/arlequin)
[![License](https://img.shields.io/github/license/JcDenis/arlequin)](https://github.com/JcDenis/arlequin/blob/master/LICENSE)
## WHAT IS ARLEQUIN ?
_arlequin_ is a plugin for the open-source
web publishing software called Dotclear.
It allows visitors to select a theme on your blog.
## REQUIREMENTS
_arlequin_ requires:
* content admin permissions to manage theme and public menu
* Dotclear 2.24
## USAGE
First install _arlequin_, manualy from a zip package or from
Dotaddict repository. (See Dotclear's documentation to know how do this)
You can manage _arlequin_ from blog admin sidebar menu
''Arlequin'' on sidebar or you can add dashboard icon,
you should also add widget to allow visitor to select a theme.
## LINKS
* License : [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html)
* Source & contribution : [GitHub Page](https://github.com/JcDenis/arlequin)
* Packages & details : [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/arlequin)
* Discuss and help : [Dotclear Forum](http://forum.dotclear.org/viewtopic.php?id=48345)
## CONTRIBUTORS
* Oleksandr Syenchuk (author)
* Gaetan Guillard
* Pierre Van Glabeke
* Jean-Christian Denis
You are welcome to contribute to this code.

View File

@ -1,36 +1,44 @@
<?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ <?php
/***************************************************************\ /**
* This is 'Arlequin', a plugin for Dotclear 2 * * @brief arlequin, a plugin for Dotclear 2
* * *
* Copyright (c) 2007,2015 * * @package Dotclear
* Oleksandr Syenchuk and contributors. * * @subpackage Plugin
* * *
* This is an open source software, distributed under the GNU * * @author Oleksandr Syenchuk, Pierre Van Glabeke and contributors
* General Public License (version 2) terms and conditions. * *
* * * @copyright Jean-Crhistian Denis
* You should have received a copy of the GNU General Public * * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
* License along with 'Arlequin' (see COPYING.txt); * */
* if not, write to the Free Software Foundation, Inc., * if (!defined('DC_CONTEXT_ADMIN')) {
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * return;
\***************************************************************/ }
if (!defined('DC_CONTEXT_ADMIN')) { return; }
$_menu['Blog']->addItem(__('Arlequin'),'plugin.php?p=arlequin', require __DIR__ . '/_widgets.php';
'index.php?pf=arlequin/icon.png',
preg_match('/plugin.php\?p=arlequin(&.*)?$/',$_SERVER['REQUEST_URI']),
$core->auth->check('contentadmin',$core->blog->id));
require dirname(__FILE__).'/_widgets.php'; // Admin sidebar menu
dcCore::app()->menu[dcAdmin::MENU_BLOG]->addItem(
__('Arlequin'),
dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__)),
dcPage::getPF(basename(__DIR__) . '/icon.png'),
preg_match(
'/' . preg_quote(dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__))) . '(&.*)?$/',
$_SERVER['REQUEST_URI']
),
dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([
dcAuth::PERMISSION_CONTENT_ADMIN,
]), dcCore::app()->blog->id)
);
$core->addBehavior('adminDashboardFavorites','arlequinDashboardFavorites'); // Admin dashbaord favorite
dcCore::app()->addBehavior('adminDashboardFavoritesV2', function ($favs) {
function arlequinDashboardFavorites($core,$favs) $favs->register(basename(__DIR__), [
{ 'title' => __('Arlequin'),
$favs->register('arlequin', array( 'url' => dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__)),
'title' => __('Arlequin'), 'small-icon' => dcPage::getPF(basename(__DIR__) . '/icon.png'),
'url' => 'plugin.php?p=arlequin', 'large-icon' => dcPage::getPF(basename(__DIR__) . '/icon-big.png'),
'small-icon' => 'index.php?pf=arlequin/icon.png', 'permissions' => dcCore::app()->auth->makePermissions([
'large-icon' => 'index.php?pf=arlequin/icon-big.png', dcAuth::PERMISSION_CONTENT_ADMIN,
'permissions' => 'usage,contentadmin' ]),
)); ]);
} });

View File

@ -1,30 +1,32 @@
<?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ <?php
/***************************************************************\ /**
* This is 'Arlequin', a plugin for Dotclear 2 * * @brief arlequin, a plugin for Dotclear 2
* * *
* Copyright (c) 2007,2015 * * @package Dotclear
* Oleksandr Syenchuk and contributors. * * @subpackage Plugin
* * *
* This is an open source software, distributed under the GNU * * @author Oleksandr Syenchuk, Pierre Van Glabeke and contributors
* General Public License (version 2) terms and conditions. * *
* * * @copyright Jean-Crhistian Denis
* You should have received a copy of the GNU General Public * * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
* License along with 'Arlequin' (see COPYING.txt); * */
* if not, write to the Free Software Foundation, Inc., * if (!defined('DC_RC_PATH')) {
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * return;
\***************************************************************/ }
if (!defined('DC_RC_PATH')) { return; }
$this->registerModule( $this->registerModule(
'Arlequin', 'Arlequin',
'Allows visitors choose a theme', 'Allows visitors choose a theme',
'Oleksandr Syenchuk, Pierre Van Glabeke', 'Oleksandr Syenchuk, Pierre Van Glabeke and contributors',
'1.5', '1.6',
[ [
'requires' => [['core', '2.19']], 'requires' => [['core', '2.24']],
'permissions' => 'contentadmin', 'permissions' => dcCore::app()->auth->makePermissions([
'type' => 'plugin', dcAuth::PERMISSION_CONTENT_ADMIN,
'support' => 'http://forum.dotclear.org/viewtopic.php?id=48345', ]),
'details' => 'http://plugins.dotaddict.org/dc2/details/arlequin' 'type' => 'plugin',
'support' => 'http://forum.dotclear.org/viewtopic.php?id=48345',
'details' => 'https://plugins.dotaddict.org/dc2/details/' . basename(__DIR__),
'repository' => 'https://raw.githubusercontent.com/JcDenis/' . basename(__DIR__) . '/master/dcstore.xml',
] ]
); );

View File

@ -1,185 +1,174 @@
<?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ <?php
/***************************************************************\ /**
* This is 'Arlequin', a plugin for Dotclear 2 * * @brief arlequin, a plugin for Dotclear 2
* * *
* Copyright (c) 2007,2015 * * @package Dotclear
* Oleksandr Syenchuk and contributors. * * @subpackage Plugin
* * *
* This is an open source software, distributed under the GNU * * @author Oleksandr Syenchuk, Pierre Van Glabeke and contributors
* General Public License (version 2) terms and conditions. * *
* * * @copyright Jean-Crhistian Denis
* You should have received a copy of the GNU General Public * * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
* License along with 'Arlequin' (see COPYING.txt); * */
* if not, write to the Free Software Foundation, Inc., * if (!defined('DC_RC_PATH')) {
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * return;
\***************************************************************/ }
if (!defined('DC_RC_PATH')) { return; }
require dirname(__FILE__).'/_widgets.php'; require __DIR__ . '/_widgets.php';
/** @doc publicArlequinEngine::init();
Arlequin public interface dcCore::app()->addBehavior('publicBeforeDocumentV2', ['publicArlequinEngine','adjustCache']);
*/ dcCore::app()->tpl->addValue('themesList', ['publicArlequinInterface','template']);
publicArlequinEngine::trigger($core->blog);
$core->addBehavior('publicBeforeDocument',array('publicArlequinEngine','adjustCache'));
$core->tpl->addValue('themesList',array('publicArlequinInterface','template'));
class publicArlequinEngine class publicArlequinEngine
{ {
public static $cookie_theme; public static $cookie_theme;
public static $cookie_upddt; public static $cookie_upddt;
public static function trigger($blog) public static function init()
{ {
$cname = base_convert($blog->uid,16,36); $cname = base_convert(dcCore::app()->blog->uid, 16, 36);
self::$cookie_theme = 'dc_theme_'.$cname; self::$cookie_theme = 'dc_theme_' . $cname;
self::$cookie_upddt = 'dc_user_upddt_'.$cname; self::$cookie_upddt = 'dc_user_upddt_' . $cname;
if (!empty($_REQUEST['theme'])) { if (!empty($_REQUEST['theme'])) {
# Set cookie for 365 days # Set cookie for 365 days
setcookie(self::$cookie_theme,$_REQUEST['theme'],time()+31536000,'/'); setcookie(self::$cookie_theme, $_REQUEST['theme'], time() + 31536000, '/');
setcookie(self::$cookie_upddt,time(),time()+31536000,'/'); setcookie(self::$cookie_upddt, (string) time(), time() + 31536000, '/');
# Redirect if needed # Redirect if needed
if (isset($_GET['theme'])) { if (isset($_GET['theme'])) {
$p = '/(\?|&)theme(=.*)?$/'; $p = '/(\?|&)theme(=.*)?$/';
http::redirect(preg_replace($p,'',http::getSelfURI())); http::redirect(preg_replace($p, '', http::getSelfURI()));
} }
# Switch theme # Switch theme
self::switchTheme($blog,$_REQUEST['theme']); self::switchTheme($_REQUEST['theme']);
} } elseif (!empty($_COOKIE[self::$cookie_theme])) {
elseif (!empty($_COOKIE[self::$cookie_theme])) { self::switchTheme($_COOKIE[self::$cookie_theme]);
self::switchTheme($blog,$_COOKIE[self::$cookie_theme]); }
} }
}
public static function adjustCache()
public static function adjustCache($core) {
{ if (!empty($_COOKIE[self::$cookie_upddt])) {
if (!empty($_COOKIE[self::$cookie_upddt])) { dcCore::app()->cache['mod_ts'][] = (int) $_COOKIE[self::$cookie_upddt];
$GLOBALS['mod_ts'][] = (integer) $_COOKIE[self::$cookie_upddt]; }
} }
}
public static function switchTheme($theme)
public static function switchTheme($blog,$theme) {
{ if (dcCore::app()->blog->settings->arlequinMulti->mt_exclude) {
if ($blog->settings->arlequinMulti->mt_exclude) { if (in_array($theme, explode('/', dcCore::app()->blog->settings->arlequinMulti->mt_exclude))) {
if (in_array($theme,explode('/',$blog->settings->arlequinMulti->mt_exclude))) { return;
return; }
} }
}
dcCore::app()->public->theme = dcCore::app()->blog->settings->system->theme = $theme;
$GLOBALS['__theme'] = $blog->settings->system->theme = $theme; }
}
} }
class publicArlequinInterface class publicArlequinInterface
{ {
public static function arlequinWidget($w) public static function arlequinWidget($w)
{ {
return self::getHTML($w); return self::getHTML($w);
} }
public static function template($attr)
{
return '<?php echo publicArlequinInterface::getHTML(); ?>';
}
public static function getHTML($w=false)
{
global $core;
if ($w->offline) public static function template($attr)
return; {
return '<?php echo publicArlequinInterface::getHTML(); ?>';
$cfg = @unserialize($core->blog->settings->arlequinMulti->get('mt_cfg')); }
if (($w->homeonly == 1 && $core->url->type != 'default') || public static function getHTML($w = false)
($w->homeonly == 2 && $core->url->type == 'default')) { {
return; if ($w->offline) {
} return;
}
if ($cfg === false ||
($names = self::getNames()) === false) {
return;
}
# Current page URL and the associated query string. Note : the URL for
# the switcher ($s_url) is different to the URL for an item ($e_url)
$s_url = $e_url = http::getSelfURI();
# If theme setting is already present in URL, we will replace its value
$replace = preg_match('/(\\?|&)theme\\=[^&]*/',$e_url);
# URI extension to send theme setting by query string
if ($replace) {
$ext = '';
}
elseif (strpos($e_url,'?') === false) {
$ext = '?theme=';
}
else {
$ext = (substr($e_url,-1) == '?' ? '' : '&amp;').'theme=';
}
$res = '';
foreach ($names as $k=>$v)
{
if ($k == $GLOBALS['__theme']) {
$format = $cfg['a_html'];
} else {
$format = $cfg['e_html'];
}
if ($replace) {
$e_url = preg_replace(
'/(\\?|&)(theme\\=)([^&]*)/',
'$1${2}'.addcslashes($k,'$\\'),
$e_url);
$val = '';
}
else {
$val = html::escapeHTML(rawurlencode($k));
}
$res .= sprintf($format,
$e_url,$ext,$val,
html::escapeHTML($v['name']),
html::escapeHTML($v['desc']),
html::escapeHTML($k));
}
# Nothing to display
if (!trim($res)) {
return;
}
$res = sprintf($cfg['s_html'],$s_url,$res); if (!$w->checkHomeOnly(dcCore::app()->url->type)) {
return;
if ($w) { }
$res = $cfg = @unserialize(dcCore::app()->blog->settings->arlequinMulti->get('mt_cfg'));
($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). if ($cfg === false || ($names = self::getNames()) === false) {
$res; return;
}
return $w->renderDiv($w->content_only,'arlequin '.$w->class,'',$res); # Current page URL and the associated query string. Note : the URL for
} # the switcher ($s_url) is different to the URL for an item ($e_url)
$s_url = $e_url = http::getSelfURI();
return $res;
} # If theme setting is already present in URL, we will replace its value
$replace = preg_match('/(\\?|&)theme\\=[^&]*/', $e_url);
public static function getNames()
{ # URI extension to send theme setting by query string
global $core; if ($replace) {
$ext = '';
$mt_exclude = $core->blog->settings->arlequinMulti->mt_exclude; } elseif (strpos($e_url, '?') === false) {
$exclude = array(); $ext = '?theme=';
if (!empty($mt_exclude)) { } else {
$exclude = array_flip(explode('/',$core->blog->settings->arlequinMulti->mt_exclude)); $ext = (substr($e_url, -1) == '?' ? '' : '&amp;') . 'theme=';
} }
$names = array_diff_key($core->themes->getModules(),$exclude); $res = '';
foreach ($names as $k => $v) {
return empty($names) ? false : $names; if ($k == dcCore::app()->public->theme) {
} $format = $cfg['a_html'];
} } else {
$format = $cfg['e_html'];
}
if ($replace) {
$e_url = preg_replace(
'/(\\?|&)(theme\\=)([^&]*)/',
'$1${2}' . addcslashes($k, '$\\'),
$e_url
);
$val = '';
} else {
$val = html::escapeHTML(rawurlencode($k));
}
$res .= sprintf(
$format,
$e_url,
$ext,
$val,
html::escapeHTML($v['name']),
html::escapeHTML($v['desc']),
html::escapeHTML($k)
);
}
# Nothing to display
if (!trim($res)) {
return;
}
$res = sprintf($cfg['s_html'], $s_url, $res);
if ($w) {
return $w->renderDiv(
$w->content_only,
'arlequin ' . $w->class,
'',
($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : '') . $res
);
}
return $res;
}
public static function getNames()
{
$mt_exclude = dcCore::app()->blog->settings->arlequinMulti->mt_exclude;
$exclude = [];
if (!empty($mt_exclude)) {
$exclude = array_flip(explode('/', dcCore::app()->blog->settings->arlequinMulti->mt_exclude));
}
$names = array_diff_key(dcCore::app()->themes->getModules(), $exclude);
return empty($names) ? false : $names;
}
}

View File

@ -1,73 +1,66 @@
<?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ <?php
/***************************************************************\ /**
* This is 'Arlequin', a plugin for Dotclear 2 * * @brief arlequin, a plugin for Dotclear 2
* * *
* Copyright (c) 2007-2015 * * @package Dotclear
* Oleksandr Syenchuk and contributors. * * @subpackage Plugin
* * *
* This is an open source software, distributed under the GNU * * @author Oleksandr Syenchuk, Pierre Van Glabeke and contributors
* General Public License (version 2) terms and conditions. * *
* * * @copyright Jean-Crhistian Denis
* You should have received a copy of the GNU General Public * * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
* License along with 'Arlequin' (see COPYING.txt); * */
* if not, write to the Free Software Foundation, Inc., * if (!defined('DC_RC_PATH')) {
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * return;
\***************************************************************/ }
if (!defined('DC_RC_PATH')) { return; }
$core->addBehavior('initWidgets',array('adminArlequin','initWidgets')); dcCore::app()->addBehavior('initWidgets', ['adminArlequin','initWidgets']);
class adminArlequin class adminArlequin
{ {
public static function initWidgets($w) public static $initialized = false;
{
$w->create('arlequin',__('Arlequin'),array('publicArlequinInterface','arlequinWidget'), public static function initWidgets($w)
null, {
__('Theme switcher')); $w->create(
$w->arlequin->setting('title',__('Title:'),__('Choose a theme')); 'arlequin',
$w->arlequin->setting('homeonly',__('Display on:'),0,'combo', __('Arlequin'),
array( ['publicArlequinInterface','arlequinWidget'],
__('All pages') => 0, null,
__('Home page only') => 1, __('Theme switcher')
__('Except on home page') => 2 )
) ->addTitle(__('Choose a theme'))
); ->addHomeOnly()
$w->arlequin->setting('content_only',__('Content only'),0,'check'); ->addContentOnly()
$w->arlequin->setting('class',__('CSS class:'),''); ->addClass()
$w->arlequin->setting('offline',__('Offline'),0,'check'); ->addOffline();
} }
public static function getDefaults() public static function getDefaults()
{ {
return array( return [
'e_html'=>'<li><a href="%1$s%2$s%3$s">%4$s</a></li>', 'e_html' => '<li><a href="%1$s%2$s%3$s">%4$s</a></li>',
'a_html'=>'<li><strong>%4$s</strong></li>', 'a_html' => '<li><strong>%4$s</strong></li>',
's_html'=>'<ul>%2$s</ul>'); 's_html' => '<ul>%2$s</ul>',
} ];
}
public static function loadSettings($settings,&$initialized)
{ public static function loadSettings($settings)
global $core; {
self::$initialized = false;
$initialized = false; $mt_cfg = @unserialize($settings->arlequinMulti->get('mt_cfg'));
$mt_cfg = @unserialize($settings->arlequinMulti->get('mt_cfg')); $mt_exclude = $settings->arlequinMulti->get('mt_exclude');
$mt_exclude = $settings->arlequinMulti->get('mt_exclude');
// Paramètres corrompus ou inexistants
// Paramètres corrompus ou inexistants if ($mt_cfg === false || $mt_exclude === null || !(isset($mt_cfg['e_html']) && isset($mt_cfg['a_html']) && isset($mt_cfg['s_html']))) {
if ($mt_cfg === false || $mt_cfg = adminArlequin::getDefaults();
$mt_exclude === null || $settings->addNamespace('arlequinMulti');
!(isset($mt_cfg['e_html']) && $settings->arlequinMulti->put('mt_cfg', serialize($mt_cfg), 'string', 'Arlequin configuration');
isset($mt_cfg['a_html']) && $settings->arlequinMulti->put('mt_exclude', 'customCSS', 'string', 'Excluded themes');
isset($mt_cfg['s_html']))) self::$initialized = true;
{ dcCore::app()->blog->triggerBlog();
$mt_cfg = adminArlequin::getDefaults(); }
$settings->addNameSpace('arlequinMulti');
$settings->arlequinMulti->put('mt_cfg',serialize($mt_cfg),'string','Arlequin configuration'); return [$mt_cfg,$mt_exclude];
$settings->arlequinMulti->put('mt_exclude','customCSS','string','Excluded themes'); }
$initialized = true; }
$core->blog->triggerBlog();
}
return array($mt_cfg,$mt_exclude);
}
}

13
dcstore.xml 100644
View File

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<modules xmlns:da="http://dotaddict.org/da/">
<module id="arlequin">
<name>Arlequin</name>
<version>1.6</version>
<author>Oleksandr Syenchuk, Pierre Van Glabeke and contributors</author>
<desc>Allows visitors choose a theme</desc>
<file>https://github.com/JcDenis/arlequin/releases/download/v1.6/plugin-arlequin.zip</file>
<da:dcmin>2.24</da:dcmin>
<da:details>https://plugins.dotaddict.org/dc2/details/arlequin</da:details>
<da:support>http://forum.dotclear.org/viewtopic.php?id=48345</da:support>
</module>
</modules>

View File

@ -1,49 +1,48 @@
<?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ <?php
/***************************************************************\ /**
* This is 'Arlequin', a plugin for Dotclear 2 * * @brief arlequin, a plugin for Dotclear 2
* * *
* Copyright (c) 2007,2015 * * @package Dotclear
* Oleksandr Syenchuk and contributors. * * @subpackage Plugin
* * *
* This is an open source software, distributed under the GNU * * @author Oleksandr Syenchuk, Pierre Van Glabeke and contributors
* General Public License (version 2) terms and conditions. * *
* * * @copyright Jean-Crhistian Denis
* You should have received a copy of the GNU General Public * * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
* License along with 'Arlequin' (see COPYING.txt); * */
* if not, write to the Free Software Foundation, Inc., * if (!defined('DC_CONTEXT_ADMIN')) {
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * return;
\***************************************************************/ }
$mt_models = array(); $mt_models = [];
/** Syntaxe pour ajouter vos propres modèles prédéfinis : /* Syntaxe pour ajouter vos propres modèles prédéfinis :
$mt_models[] = array( $mt_models[] = array(
'name'=>__('Model name'), // Nom du modèle prédéfini, éventuellement 'name'=>__('Model name'), // Nom du modèle prédéfini, éventuellement
// traduit dans un fichier de langue // traduit dans un fichier de langue
's_html'=>'[HTML code]', // Code HTML du sélecteur de thème 's_html'=>'[HTML code]', // Code HTML du sélecteur de thème
'e_html'=>'[HTML code]', // Code HTML d'un item pouvant être sélectionné 'e_html'=>'[HTML code]', // Code HTML d'un item pouvant être sélectionné
'a_html'=>'[HTML code]' // Code HTML d'un item actif (thème sélectionné) 'a_html'=>'[HTML code]' // Code HTML d'un item actif (thème sélectionné)
); );
//*/ //*/
$mt_models[] = array( $mt_models[] = [
'name'=>__('Bullets list'), 'name' => __('Bullets list'),
's_html'=>'<ul>%2$s</ul>', 's_html' => '<ul>%2$s</ul>',
'e_html'=>'<li><a href="%1$s%2$s%3$s">%4$s</a></li>', 'e_html' => '<li><a href="%1$s%2$s%3$s">%4$s</a></li>',
'a_html'=>'<li><strong>%4$s</strong></li>' 'a_html' => '<li><strong>%4$s</strong></li>',
); ];
$mt_models[] = array( $mt_models[] = [
'name'=>__('Scrolled list'), 'name' => __('Scrolled list'),
's_html'=> 's_html' => '<form action="%1$s" method="post">' . "\n" .
'<form action="%1$s" method="post">'."\n". '<p><select name="theme">' . "\n" .
'<p><select name="theme">'."\n". '%2$s' . "\n" .
'%2$s'."\n". '</select>' . "\n" .
'</select>'."\n". '<input type="submit" value="' . __('ok') . '"/></p>' . "\n" .
'<input type="submit" value="'.__('ok').'"/></p>'."\n". '</form>',
'</form>', 'e_html' => '<option value="%3$s">%4$s</option>',
'e_html'=>'<option value="%3$s">%4$s</option>', 'a_html' => '<option value="%3$s" selected="selected" disabled="disabled">%4$s (' . __('active theme') . ')</option>',
'a_html'=>'<option value="%3$s" selected="selected" disabled="disabled">%4$s ('.__('active theme').')</option>' ];
);

209
index.php
View File

@ -1,141 +1,114 @@
<?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ <?php
/***************************************************************\ /**
* This is 'Arlequin', a plugin for Dotclear 2 * * @brief arlequin, a plugin for Dotclear 2
* * *
* Copyright (c) 2007,2015 * * @package Dotclear
* Oleksandr Syenchuk and contributors. * * @subpackage Plugin
* * *
* This is an open source software, distributed under the GNU * * @author Oleksandr Syenchuk, Pierre Van Glabeke and contributors
* General Public License (version 2) terms and conditions. * *
* * * @copyright Jean-Crhistian Denis
* You should have received a copy of the GNU General Public * * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
* License along with 'Arlequin' (see COPYING.txt); * */
* if not, write to the Free Software Foundation, Inc., * if (!defined('DC_CONTEXT_ADMIN')) {
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * return;
\***************************************************************/
if (!defined('DC_CONTEXT_ADMIN')) { return; }
$page_title = __('Arlequin');
try
{
include dirname(__FILE__).'/models.php';
$messages = array();
/* Initialisation
--------------------------------------------------- */
$core->blog->settings->addNameSpace('arlequinMulti');
list($mt_cfg,$mt_exclude) =
adminArlequin::loadSettings ($core->blog->settings,$initialized);
/* Enregistrement des données depuis les formulaires
--------------------------------------------------- */
if (isset($_POST['mt_action_config']))
{
$mt_cfg['e_html'] = $_POST['e_html'];
$mt_cfg['a_html'] = $_POST['a_html'];
$mt_cfg['s_html'] = $_POST['s_html'];
$mt_exclude = $_POST['mt_exclude'];
}
/* Traitement des requêtes
--------------------------------------------------- */
if (isset($_POST['mt_action_config']))
{
$core->blog->settings->arlequinMulti->put('mt_cfg',serialize($mt_cfg));
$core->blog->settings->arlequinMulti->put('mt_exclude',$mt_exclude);
$messages[] = __('Settings have been successfully updated.');
$core->blog->triggerBlog();
http::redirect($p_url.'&config=1');
}
if (isset($_POST['mt_action_restore']))
{
$core->blog->settings->arlequinMulti->drop('mt_cfg');
$core->blog->settings->arlequinMulti->drop('mt_exclude');
$core->blog->triggerBlog();
http::redirect($p_url.'&restore=1');
}
}
catch (Exception $e)
{
$core->error->add($e->getMessage());
} }
/* DISPLAY $mt_models = [];
--------------------------------------------------- */
if ($initialized) { try {
$messages[] = __('Settings have been reinitialized.'); include __DIR__ . '/inc/models.php';
// Initialisation
dcCore::app()->blog->settings->addNamespace('arlequinMulti');
[$mt_cfg, $mt_exclude] = adminArlequin::loadSettings(dcCore::app()->blog->settings);
if (adminArlequin::$initialized) {
dcAdminNotices::AddSuccessNotice(__('Settings have been reinitialized.'));
}
// Enregistrement des données depuis les formulaires
if (isset($_POST['mt_action_config'])) {
$mt_cfg['e_html'] = $_POST['e_html'];
$mt_cfg['a_html'] = $_POST['a_html'];
$mt_cfg['s_html'] = $_POST['s_html'];
$mt_exclude = $_POST['mt_exclude'];
}
// Traitement des requêtes
if (isset($_POST['mt_action_config'])) {
dcCore::app()->blog->settings->arlequinMulti->put('mt_cfg', serialize($mt_cfg));
dcCore::app()->blog->settings->arlequinMulti->put('mt_exclude', $mt_exclude);
dcAdminNotices::AddSuccessNotice(__('System settings have been updated.'));
dcCore::app()->blog->triggerBlog();
dcCore::app()->adminurl->redirect('admin.plugin.' . basename(__DIR__), ['config' => 1]);
}
if (isset($_POST['mt_action_restore'])) {
dcCore::app()->blog->settings->arlequinMulti->drop('mt_cfg');
dcCore::app()->blog->settings->arlequinMulti->drop('mt_exclude');
dcAdminNotices::AddSuccessNotice(__('Settings have been reinitialized.'));
dcCore::app()->blog->triggerBlog();
dcCore::app()->adminurl->redirect('admin.plugin.' . basename(__DIR__), ['restore' => 1]);
}
} catch (Exception $e) {
dcCore::app()->error->add($e->getMessage());
} }
// Headers // Headers
$jsModels = '';
$jsModels = ''; $cslashes = "\n\"\'"; $cslashes = "\n\"\'";
foreach ($mt_models as $m) foreach ($mt_models as $m) { // @phpstan-ignore-line
{ $jsModels .= "\t" .
$jsModels .= "\t". 'arlequin.addModel(' .
'arlequin.addModel('. '"' . html::escapeJS($m['name']) . '",' .
'"'.html::escapeJS($m['name']).'",'. '"' . addcslashes($m['s_html'], $cslashes) . '",' .
'"'.addcslashes($m['s_html'],$cslashes).'",'. '"' . addcslashes($m['e_html'], $cslashes) . '",' .
'"'.addcslashes($m['e_html'],$cslashes).'",'. '"' . addcslashes($m['a_html'], $cslashes) . '"' .
'"'.addcslashes($m['a_html'],$cslashes).'"'. ");\n";
");\n";
} }
// DISPLAY
echo ' echo '
<html><head> <html><head><title>' . __('Arlequin') . '</title>' .
<title>'.$page_title.'</title>'. dcPage::jsLoad(dcPage::getPF(basename(__DIR__) . '/js/models.js')) . '
dcPage::jsLoad('index.php?pf=arlequin/js/models.js').'
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
arlequin.msg.predefined_models = "'.html::escapeJS(__('Predefined models')).'"; arlequin.msg.predefined_models = "' . html::escapeJS(__('Predefined models')) . '";
arlequin.msg.select_model = "'.html::escapeJS(__('Select a model')).'"; arlequin.msg.select_model = "' . html::escapeJS(__('Select a model')) . '";
arlequin.msg.user_defined = "'.html::escapeJS(__('User defined')).'"; arlequin.msg.user_defined = "' . html::escapeJS(__('User defined')) . '";
$(function() { $(function() {
arlequin.addDefault(); arlequin.addDefault();
'.$jsModels.' ' . $jsModels . '
}); });
//]]> //]]>
</script> </script>
</head><body>'. </head><body>' .
dcPage::breadcrumb( dcPage::breadcrumb([
array( html::escapeHTML(dcCore::app()->blog->name) => '',
html::escapeHTML($core->blog->name) => '', '<span class="page-title">' . __('Arlequin') . '</span>' => '',
'<span class="page-title">'.$page_title.'</span>' => '' ]) .
)); dcPage::notices() . '
// Messages <form action="' . dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__)) . '" method="post">
if (!empty($_GET['config'])) { <h4>' . __('Switcher display format') . '</h4>
dcPage::success(__('Settings have been successfully updated.'));
}
if (!empty($_GET['restore'])) {
dcPage::success(__('Settings have been reinitialized.'));
}
echo
'<form action="'.$p_url.'" method="post">
<div class="fieldset two-cols"><h4>'.__('Switcher display format').'</h4>
<div id="models"></div> <div id="models"></div>
<p class="col"><label for="s_html">'.__('Switcher HTML code:').'</label> '.
form::textArea('s_html',50,10,html::escapeHTML($mt_cfg['s_html'])).'</p>
<div class="col">
<p><label>'.__('Item HTML code:').' '.
form::field('e_html',50,'200',html::escapeHTML($mt_cfg['e_html'])).'</label></p>
<p><label>'.__('Active item HTML code:').' '.
form::field('a_html',50,'200',html::escapeHTML($mt_cfg['a_html'])).'</label></p>
</div><br class="clear" />
<p><label>'.__('Excluded themes (separated by slashs \'/\'):').' '. <div class="two-boxes odd">
form::field(array('mt_exclude'),50,'200',html::escapeHTML($mt_exclude)).'</label></p> <p><label for="s_html">' . __('Switcher HTML code:') . '</label> ' .
<p class="info">'.__('The names to be taken into account are those of the theme files.').'</p> form::textArea('s_html', 50, 10, html::escapeHTML($mt_cfg['s_html'])) . '</p>
</div><div class="two-boxes even">
<p><label for="e_html">' . __('Item HTML code:') . '</label> ' .
form::field('e_html', 50, 200, html::escapeHTML($mt_cfg['e_html'])) . '</p>
<p><label for="a_html">' . __('Active item HTML code:') . '</label> ' .
form::field('a_html', 50, 200, html::escapeHTML($mt_cfg['a_html'])) . '</p>
</div><div class="two-boxes odd">
<p><label for="mt_exclude">' . __("Excluded themes (separated by slashs '/'):") . '</label> ' .
form::field('mt_exclude', 50, 200, html::escapeHTML($mt_exclude)) . '</p>
<p class="info">' . __('The names to be taken into account are those of the theme files.') . '</p>
</div> </div>
<p><input type="submit" name="mt_action_config" value="'.__('Save').'" /> <p>
<input type="submit" name="mt_action_restore" value="'.__('Restore defaults').'" />'. <input type="submit" name="mt_action_config" value="' . __('Save') . '" />
(is_callable(array($core,'formNonce')) ? $core->formNonce() : '').'</p> <input type="submit" name="mt_action_restore" value="' . __('Restore defaults') . '" />' .
dcCore::app()->formNonce() . '</p>
</form>'; </form>';
dcPage::helpBlock('arlequin'); ?> dcPage::helpBlock('arlequin'); ?>

View File

@ -1,20 +1,17 @@
<?php <?php
/***************************************************************\ /**
* This is 'Arlequin', a plugin for Dotclear 2 * * @brief arlequin, a plugin for Dotclear 2
* * *
* Copyright (c) 2007,2010 * * @package Dotclear
* Oleksandr Syenchuk and contributors. * * @subpackage Plugin
* * *
* This is an open source software, distributed under the GNU * * @author Oleksandr Syenchuk, Pierre Van Glabeke and contributors
* General Public License (version 2) terms and conditions. * *
* * * @copyright Jean-Crhistian Denis
* You should have received a copy of the GNU General Public * * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
* License along with 'Arlequin' (see COPYING.txt); * */
* if not, write to the Free Software Foundation, Inc., * if (!defined('DC_RC_PATH')) {
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * return;
\***************************************************************/ }
if (!defined('DC_RC_PATH')){return;}
if (!isset($__resources['help']['arlequin'])) dcCore::app()->resources['help']['arlequin'] = __DIR__ . '/help/arlequin.html';
{
$__resources['help']['arlequin'] = dirname(__FILE__).'/help/arlequin.html';
}

View File

@ -1,84 +1,66 @@
# Language: Français
# Module: arlequin - 1.3
# Date: 2018-01-22 17:11:42
# Translated with translater 2017.05.10
msgid "" msgid ""
msgstr "" msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: arlequin 1.3\n" "Project-Id-Version: arlequin 1.5\n"
"POT-Creation-Date: \n" "POT-Creation-Date: \n"
"PO-Revision-Date: 2018-01-22T17:11:42+00:00\n" "PO-Revision-Date: 2022-12-14T22:24:43+00:00\n"
"Last-Translator: brol\n" "Last-Translator: Jean-Crhistian Denis\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: _widgets.php:26
msgid "Theme switcher" msgid "Theme switcher"
msgstr "Sélecteur de thème" msgstr "Sélecteur de thème"
#: _widgets.php:27
msgid "Choose a theme" msgid "Choose a theme"
msgstr "Choisissez un thème" msgstr "Choisissez un thème"
#: index.php:72
#: index.php:116
msgid "Settings have been reinitialized."
msgstr "Les paramètres ont été réinitialisés."
#: index.php:95
msgid "Predefined models"
msgstr "Modèles prédéfinis"
#: index.php:96
msgid "Select a model"
msgstr "Sélectionnez un modèle"
#: index.php:121
msgid "Switcher display format"
msgstr "Format d'affichage du sélecteur"
#: index.php:123
msgid "Switcher HTML code:"
msgstr "Code HTML du sélecteur :"
#: index.php:126
msgid "Item HTML code:"
msgstr "Code HTML d'un item :"
#: index.php:128
msgid "Active item HTML code:"
msgstr "Code HTML d'un item actif :"
#: index.php:134
msgid "The names to be taken into account are those of the theme files."
msgstr "Les noms à prendre en compte sont ceux des dossiers de thème."
#: index.php:137
msgid "Restore defaults"
msgstr "Réinitialiser les paramètres"
#: models.php:22
msgid "Model name" msgid "Model name"
msgstr "Nom du modèle" msgstr "Nom du modèle"
#: models.php:32
msgid "Bullets list" msgid "Bullets list"
msgstr "Liste à puces" msgstr "Liste à puces"
#: models.php:39
msgid "Scrolled list" msgid "Scrolled list"
msgstr "Liste déroulante" msgstr "Liste déroulante"
#: models.php:48
msgid "active theme" msgid "active theme"
msgstr "thème actif" msgstr "thème actif"
msgid "Settings have been reinitialized."
msgstr "Les paramètres ont été réinitialisés."
msgid "System settings have been updated."
msgstr "Les paramètres on tété mis à jour."
msgid "Predefined models"
msgstr "Modèles prédéfinis"
msgid "Select a model"
msgstr "Sélectionnez un modèle"
msgid "Switcher display format"
msgstr "Format d'affichage du sélecteur"
msgid "Switcher HTML code:"
msgstr "Code HTML du sélecteur :"
msgid "Item HTML code:"
msgstr "Code HTML d'un item :"
msgid "Active item HTML code:"
msgstr "Code HTML d'un item actif :"
msgid "Excluded themes (separated by slashs '/'):" msgid "Excluded themes (separated by slashs '/'):"
msgstr "Thèmes exclus (séparés par des slashs \"/\") :" msgstr "Thèmes exclus (séparés par des slashs \"/\") :"
msgid "The names to be taken into account are those of the theme files."
msgstr "Les noms à prendre en compte sont ceux des dossiers de thème."
msgid "Restore defaults"
msgstr "Réinitialiser les paramètres"
msgid "Arlequin - theme switcher configuration" msgid "Arlequin - theme switcher configuration"
msgstr "Arlequin - configuration du sélecteur de thème" msgstr "Arlequin - configuration du sélecteur de thème"

View File

@ -1,20 +1,17 @@
<?php <?php
/***************************************************************\ /**
* This is 'Arlequin', a plugin for Dotclear 2 * * @brief arlequin, a plugin for Dotclear 2
* * *
* Copyright (c) 2007,2010 * * @package Dotclear
* Oleksandr Syenchuk and contributors. * * @subpackage Plugin
* * *
* This is an open source software, distributed under the GNU * * @author Oleksandr Syenchuk, Pierre Van Glabeke and contributors
* General Public License (version 2) terms and conditions. * *
* * * @copyright Jean-Crhistian Denis
* You should have received a copy of the GNU General Public * * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
* License along with 'Arlequin' (see COPYING.txt); * */
* if not, write to the Free Software Foundation, Inc., * if (!defined('DC_RC_PATH')) {
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * return;
\***************************************************************/ }
if (!defined('DC_RC_PATH')){return;}
if (!isset($__resources['help']['arlequin'])) dcCore::app()->resources['help']['arlequin'] = __DIR__ . '/help/arlequin.html';
{
$__resources['help']['arlequin'] = dirname(__FILE__).'/help/arlequin.html';
}