From d97c03b17f6d4ee47475088fc4400b97c675a567 Mon Sep 17 00:00:00 2001
From: brol
Date: Tue, 23 Jan 2018 03:37:27 +0100
Subject: [PATCH] cf CHANGELOG
---
CHANGELOG | 9 +++
_admin.php | 4 +-
_define.php | 4 +-
_public.php | 10 +--
_widgets.php | 10 +--
index.php | 19 +++---
locales/en/help/arlequin.html | 2 +-
locales/en/resources.php | 2 +-
locales/fr/help/arlequin.html | 2 +-
locales/fr/main.po | 120 ++++++++++++++++------------------
locales/fr/resources.php | 2 +-
11 files changed, 95 insertions(+), 89 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index c7376d5..273897f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,12 @@
+v1.3 - 21-01-2018 - Pierre Van Glabeke
+* modif setting
+* modif index
+* modif localisation
+
+v1.2 - 12-06-2016 - Pierre Van Glabeke
+* ajout code sécu resources.php
+* modif intitulé dans admin
+
v1.1 - 05-03-2015 - Pierre Van Glabeke
* compatibilité dc2.7
* cosmétique dc2.6
diff --git a/_admin.php b/_admin.php
index cc92945..6a1b1aa 100644
--- a/_admin.php
+++ b/_admin.php
@@ -15,7 +15,7 @@
\***************************************************************/
if (!defined('DC_CONTEXT_ADMIN')) { return; }
-$_menu['Blog']->addItem(__('Theme switcher'),'plugin.php?p=arlequin',
+$_menu['Blog']->addItem(__('Arlequin'),'plugin.php?p=arlequin',
'index.php?pf=arlequin/icon.png',
preg_match('/plugin.php\?p=arlequin(&.*)?$/',$_SERVER['REQUEST_URI']),
$core->auth->check('contentadmin',$core->blog->id));
@@ -27,7 +27,7 @@ $core->addBehavior('adminDashboardFavorites','arlequinDashboardFavorites');
function arlequinDashboardFavorites($core,$favs)
{
$favs->register('arlequin', array(
- 'title' => __('Theme switcher'),
+ 'title' => __('Arlequin'),
'url' => 'plugin.php?p=arlequin',
'small-icon' => 'index.php?pf=arlequin/icon.png',
'large-icon' => 'index.php?pf=arlequin/icon-big.png',
diff --git a/_define.php b/_define.php
index 2e6c394..41af704 100644
--- a/_define.php
+++ b/_define.php
@@ -19,12 +19,12 @@ $this->registerModule(
/* Name */ 'Arlequin',
/* Description*/ 'Allows visitors choose a theme',
/* Author */ 'Oleksandr Syenchuk, Pierre Van Glabeke',
- /* Version */ '1.1',
+ /* Version */ '1.3',
/* Properties */
array(
'permissions' => 'contentadmin',
'type' => 'plugin',
- 'dc_min' => '2.7',
+ 'dc_min' => '2.12',
'support' => 'http://forum.dotclear.org/viewtopic.php?id=48345',
'details' => 'http://plugins.dotaddict.org/dc2/details/arlequin'
)
diff --git a/_public.php b/_public.php
index 6db862e..a22516a 100644
--- a/_public.php
+++ b/_public.php
@@ -64,8 +64,8 @@ class publicArlequinEngine
public static function switchTheme($blog,$theme)
{
- if ($blog->settings->multitheme->mt_exclude) {
- if (in_array($theme,explode('/',$blog->settings->multitheme->mt_exclude))) {
+ if ($blog->settings->arlequinMulti->mt_exclude) {
+ if (in_array($theme,explode('/',$blog->settings->arlequinMulti->mt_exclude))) {
return;
}
}
@@ -93,7 +93,7 @@ class publicArlequinInterface
if ($w->offline)
return;
- $cfg = @unserialize($core->blog->settings->multitheme->get('mt_cfg'));
+ $cfg = @unserialize($core->blog->settings->arlequinMulti->get('mt_cfg'));
if (($w->homeonly == 1 && $core->url->type != 'default') ||
($w->homeonly == 2 && $core->url->type == 'default')) {
@@ -172,10 +172,10 @@ class publicArlequinInterface
{
global $core;
- $mt_exclude = $core->blog->settings->multitheme->mt_exclude;
+ $mt_exclude = $core->blog->settings->arlequinMulti->mt_exclude;
$exclude = array();
if (!empty($mt_exclude)) {
- $exclude = array_flip(explode('/',$core->blog->settings->multitheme->mt_exclude));
+ $exclude = array_flip(explode('/',$core->blog->settings->arlequinMulti->mt_exclude));
}
$names = array_diff_key($core->themes->getModules(),$exclude);
diff --git a/_widgets.php b/_widgets.php
index 3edb122..0f0573e 100644
--- a/_widgets.php
+++ b/_widgets.php
@@ -50,8 +50,8 @@ class adminArlequin
global $core;
$initialized = false;
- $mt_cfg = @unserialize($settings->multitheme->get('mt_cfg'));
- $mt_exclude = $settings->multitheme->get('mt_exclude');
+ $mt_cfg = @unserialize($settings->arlequinMulti->get('mt_cfg'));
+ $mt_exclude = $settings->arlequinMulti->get('mt_exclude');
// Paramètres corrompus ou inexistants
if ($mt_cfg === false ||
@@ -61,9 +61,9 @@ class adminArlequin
isset($mt_cfg['s_html'])))
{
$mt_cfg = adminArlequin::getDefaults();
- $settings->addNameSpace('multitheme');
- $settings->multitheme->put('mt_cfg',serialize($mt_cfg),'string','Arlequin configuration');
- $settings->multitheme->put('mt_exclude','customCSS','string','Excluded themes');
+ $settings->addNameSpace('arlequinMulti');
+ $settings->arlequinMulti->put('mt_cfg',serialize($mt_cfg),'string','Arlequin configuration');
+ $settings->arlequinMulti->put('mt_exclude','customCSS','string','Excluded themes');
$initialized = true;
$core->blog->triggerBlog();
}
diff --git a/index.php b/index.php
index 3d910f7..6f33f57 100644
--- a/index.php
+++ b/index.php
@@ -26,7 +26,7 @@ try
/* Initialisation
--------------------------------------------------- */
- $core->blog->settings->addNameSpace('multitheme');
+ $core->blog->settings->addNameSpace('arlequinMulti');
list($mt_cfg,$mt_exclude) =
adminArlequin::loadSettings ($core->blog->settings,$initialized);
@@ -46,16 +46,16 @@ try
if (isset($_POST['mt_action_config']))
{
- $core->blog->settings->multitheme->put('mt_cfg',serialize($mt_cfg));
- $core->blog->settings->multitheme->put('mt_exclude',$mt_exclude);
+ $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->multitheme->drop('mt_cfg');
- $core->blog->settings->multitheme->drop('mt_exclude');
+ $core->blog->settings->arlequinMulti->drop('mt_cfg');
+ $core->blog->settings->arlequinMulti->drop('mt_exclude');
$core->blog->triggerBlog();
http::redirect($p_url.'&restore=1');
}
@@ -124,15 +124,16 @@ echo
form::textArea('s_html',50,10,html::escapeHTML($mt_cfg['s_html'])).'
+ form::field('e_html',50,'',html::escapeHTML($mt_cfg['e_html'])).'
+ form::field('a_html',50,'',html::escapeHTML($mt_cfg['a_html'])).'
+ form::field(array('mt_exclude'),50,'',html::escapeHTML($mt_exclude)).'
+ '.__('The names to be taken into account are those of the theme files.').'
-
+
'.
(is_callable(array($core,'formNonce')) ? $core->formNonce() : '').'
';
diff --git a/locales/en/help/arlequin.html b/locales/en/help/arlequin.html
index d1b684d..731548c 100644
--- a/locales/en/help/arlequin.html
+++ b/locales/en/help/arlequin.html
@@ -8,7 +8,7 @@
- With a widget
- - The easiest way is to use the Theme Selector
+
- The easiest way is to use the Arlequin / Theme Selector
widget that displays a list of available themes.
- In the template file
diff --git a/locales/en/resources.php b/locales/en/resources.php
index d976353..ba8fea0 100644
--- a/locales/en/resources.php
+++ b/locales/en/resources.php
@@ -13,7 +13,7 @@
* if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
\***************************************************************/
-
+if (!defined('DC_RC_PATH')){return;}
if (!isset($__resources['help']['arlequin']))
{
$__resources['help']['arlequin'] = dirname(__FILE__).'/help/arlequin.html';
diff --git a/locales/fr/help/arlequin.html b/locales/fr/help/arlequin.html
index 78a2100..5a5902d 100644
--- a/locales/fr/help/arlequin.html
+++ b/locales/fr/help/arlequin.html
@@ -9,7 +9,7 @@
- Avec un widget
- Le plus simple est d'utiliser le widget
- Sélecteur de thème qui affiche la liste des thèmes disponibles.
+ Arlequin / Sélecteur de thème qui affiche la liste des thèmes disponibles.
- Dans le fichier template
- Le sélecteur peut aussi être intégré dans l'interface du blog en éditant
diff --git a/locales/fr/main.po b/locales/fr/main.po
index 90c4ffe..68b5444 100644
--- a/locales/fr/main.po
+++ b/locales/fr/main.po
@@ -1,17 +1,68 @@
+# Language: Français
+# Module: arlequin - 1.3
+# Date: 2018-01-22 17:11:42
+# Translated with translater 2017.05.10
+
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
-"Project-Id-Version: Dotclear 2 Arlequin v1.1 module\n"
+"Project-Id-Version: arlequin 1.3\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2009-10-20 21:01+0100\n"
-"Last-Translator: brol \n"
+"PO-Revision-Date: 2018-01-22T17:11:42+00:00\n"
+"Last-Translator: brol\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Poedit-Language: French\n"
-"X-Poedit-KeywordsList: __\n"
-"X-Poedit-Basepath: ../..\n"
-"X-Poedit-SearchPath-0: .\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: _widgets.php:26
+msgid "Theme switcher"
+msgstr "Sélecteur de thème"
+
+#: _widgets.php:27
+msgid "Choose a theme"
+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"
+msgstr "Nom du modèle"
#: models.php:32
msgid "Bullets list"
@@ -25,67 +76,12 @@ msgstr "Liste déroulante"
msgid "active theme"
msgstr "thème actif"
-#: forms.php:22
-msgid "Switcher display format"
-msgstr "Format d'affichage du sélecteur"
-
-#: forms.php:24
-msgid "Switcher HTML code:"
-msgstr "Code HTML du sélecteur :"
-
-#: forms.php:27
-msgid "Item HTML code:"
-msgstr "Code HTML d'un item :"
-
-#: forms.php:29
-msgid "Active item HTML code:"
-msgstr "Code HTML d'un item actif :"
-
-#: forms.php:35
msgid "Excluded themes (separated by slashs '/'):"
msgstr "Thèmes exclus (séparés par des slashs \"/\") :"
-#: forms.php:38
-msgid "Update"
-msgstr "Mettre à jour"
-
-#: forms.php:39
-msgid "Restore defaults"
-msgstr "Réinitialiser les paramètres"
-
-#: _admin.php:18
-#: _admin.php:29
-msgid "Theme switcher"
-msgstr "Sélecteur de thème"
-
-#: _admin.php:32
-msgid "Choose a theme"
-msgstr "Choisissez un thème"
-
-#: index.php:51
-msgid "Settings have been successfully updated."
-msgstr "Les paramètres ont été mis à jour avec succès."
-
-#: index.php:71
-msgid "Settings have been reinitialized."
-msgstr "Les paramètres ont été réinitialisés."
-
-#: index.php:18
msgid "Arlequin - theme switcher configuration"
msgstr "Arlequin - configuration du sélecteur de thème"
-#: 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:97
-msgid "User defined"
-msgstr "Défini par l'utilisateur"
-
msgid "Allows visitors choose a theme"
msgstr "Permettre aux visiteurs de choisir un thème"
diff --git a/locales/fr/resources.php b/locales/fr/resources.php
index d976353..ba8fea0 100644
--- a/locales/fr/resources.php
+++ b/locales/fr/resources.php
@@ -13,7 +13,7 @@
* if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
\***************************************************************/
-
+if (!defined('DC_RC_PATH')){return;}
if (!isset($__resources['help']['arlequin']))
{
$__resources['help']['arlequin'] = dirname(__FILE__).'/help/arlequin.html';