cf CHANGELOG

master
brol 2018-01-23 03:37:27 +01:00
parent 128303194f
commit d97c03b17f
11 changed files with 95 additions and 89 deletions

View File

@ -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 v1.1 - 05-03-2015 - Pierre Van Glabeke
* compatibilité dc2.7 * compatibilité dc2.7
* cosmétique dc2.6 * cosmétique dc2.6

View File

@ -15,7 +15,7 @@
\***************************************************************/ \***************************************************************/
if (!defined('DC_CONTEXT_ADMIN')) { return; } 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', 'index.php?pf=arlequin/icon.png',
preg_match('/plugin.php\?p=arlequin(&.*)?$/',$_SERVER['REQUEST_URI']), preg_match('/plugin.php\?p=arlequin(&.*)?$/',$_SERVER['REQUEST_URI']),
$core->auth->check('contentadmin',$core->blog->id)); $core->auth->check('contentadmin',$core->blog->id));
@ -27,7 +27,7 @@ $core->addBehavior('adminDashboardFavorites','arlequinDashboardFavorites');
function arlequinDashboardFavorites($core,$favs) function arlequinDashboardFavorites($core,$favs)
{ {
$favs->register('arlequin', array( $favs->register('arlequin', array(
'title' => __('Theme switcher'), 'title' => __('Arlequin'),
'url' => 'plugin.php?p=arlequin', 'url' => 'plugin.php?p=arlequin',
'small-icon' => 'index.php?pf=arlequin/icon.png', 'small-icon' => 'index.php?pf=arlequin/icon.png',
'large-icon' => 'index.php?pf=arlequin/icon-big.png', 'large-icon' => 'index.php?pf=arlequin/icon-big.png',

View File

@ -19,12 +19,12 @@ $this->registerModule(
/* Name */ 'Arlequin', /* Name */ 'Arlequin',
/* Description*/ 'Allows visitors choose a theme', /* Description*/ 'Allows visitors choose a theme',
/* Author */ 'Oleksandr Syenchuk, Pierre Van Glabeke', /* Author */ 'Oleksandr Syenchuk, Pierre Van Glabeke',
/* Version */ '1.1', /* Version */ '1.3',
/* Properties */ /* Properties */
array( array(
'permissions' => 'contentadmin', 'permissions' => 'contentadmin',
'type' => 'plugin', 'type' => 'plugin',
'dc_min' => '2.7', 'dc_min' => '2.12',
'support' => 'http://forum.dotclear.org/viewtopic.php?id=48345', 'support' => 'http://forum.dotclear.org/viewtopic.php?id=48345',
'details' => 'http://plugins.dotaddict.org/dc2/details/arlequin' 'details' => 'http://plugins.dotaddict.org/dc2/details/arlequin'
) )

View File

@ -64,8 +64,8 @@ class publicArlequinEngine
public static function switchTheme($blog,$theme) public static function switchTheme($blog,$theme)
{ {
if ($blog->settings->multitheme->mt_exclude) { if ($blog->settings->arlequinMulti->mt_exclude) {
if (in_array($theme,explode('/',$blog->settings->multitheme->mt_exclude))) { if (in_array($theme,explode('/',$blog->settings->arlequinMulti->mt_exclude))) {
return; return;
} }
} }
@ -93,7 +93,7 @@ class publicArlequinInterface
if ($w->offline) if ($w->offline)
return; 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') || if (($w->homeonly == 1 && $core->url->type != 'default') ||
($w->homeonly == 2 && $core->url->type == 'default')) { ($w->homeonly == 2 && $core->url->type == 'default')) {
@ -172,10 +172,10 @@ class publicArlequinInterface
{ {
global $core; global $core;
$mt_exclude = $core->blog->settings->multitheme->mt_exclude; $mt_exclude = $core->blog->settings->arlequinMulti->mt_exclude;
$exclude = array(); $exclude = array();
if (!empty($mt_exclude)) { 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); $names = array_diff_key($core->themes->getModules(),$exclude);

View File

@ -50,8 +50,8 @@ class adminArlequin
global $core; global $core;
$initialized = false; $initialized = false;
$mt_cfg = @unserialize($settings->multitheme->get('mt_cfg')); $mt_cfg = @unserialize($settings->arlequinMulti->get('mt_cfg'));
$mt_exclude = $settings->multitheme->get('mt_exclude'); $mt_exclude = $settings->arlequinMulti->get('mt_exclude');
// Paramètres corrompus ou inexistants // Paramètres corrompus ou inexistants
if ($mt_cfg === false || if ($mt_cfg === false ||
@ -61,9 +61,9 @@ class adminArlequin
isset($mt_cfg['s_html']))) isset($mt_cfg['s_html'])))
{ {
$mt_cfg = adminArlequin::getDefaults(); $mt_cfg = adminArlequin::getDefaults();
$settings->addNameSpace('multitheme'); $settings->addNameSpace('arlequinMulti');
$settings->multitheme->put('mt_cfg',serialize($mt_cfg),'string','Arlequin configuration'); $settings->arlequinMulti->put('mt_cfg',serialize($mt_cfg),'string','Arlequin configuration');
$settings->multitheme->put('mt_exclude','customCSS','string','Excluded themes'); $settings->arlequinMulti->put('mt_exclude','customCSS','string','Excluded themes');
$initialized = true; $initialized = true;
$core->blog->triggerBlog(); $core->blog->triggerBlog();
} }

View File

@ -26,7 +26,7 @@ try
/* Initialisation /* Initialisation
--------------------------------------------------- */ --------------------------------------------------- */
$core->blog->settings->addNameSpace('multitheme'); $core->blog->settings->addNameSpace('arlequinMulti');
list($mt_cfg,$mt_exclude) = list($mt_cfg,$mt_exclude) =
adminArlequin::loadSettings ($core->blog->settings,$initialized); adminArlequin::loadSettings ($core->blog->settings,$initialized);
@ -46,16 +46,16 @@ try
if (isset($_POST['mt_action_config'])) if (isset($_POST['mt_action_config']))
{ {
$core->blog->settings->multitheme->put('mt_cfg',serialize($mt_cfg)); $core->blog->settings->arlequinMulti->put('mt_cfg',serialize($mt_cfg));
$core->blog->settings->multitheme->put('mt_exclude',$mt_exclude); $core->blog->settings->arlequinMulti->put('mt_exclude',$mt_exclude);
$messages[] = __('Settings have been successfully updated.'); $messages[] = __('Settings have been successfully updated.');
$core->blog->triggerBlog(); $core->blog->triggerBlog();
http::redirect($p_url.'&config=1'); http::redirect($p_url.'&config=1');
} }
if (isset($_POST['mt_action_restore'])) if (isset($_POST['mt_action_restore']))
{ {
$core->blog->settings->multitheme->drop('mt_cfg'); $core->blog->settings->arlequinMulti->drop('mt_cfg');
$core->blog->settings->multitheme->drop('mt_exclude'); $core->blog->settings->arlequinMulti->drop('mt_exclude');
$core->blog->triggerBlog(); $core->blog->triggerBlog();
http::redirect($p_url.'&restore=1'); http::redirect($p_url.'&restore=1');
} }
@ -124,15 +124,16 @@ echo
form::textArea('s_html',50,10,html::escapeHTML($mt_cfg['s_html'])).'</p> form::textArea('s_html',50,10,html::escapeHTML($mt_cfg['s_html'])).'</p>
<div class="col"> <div class="col">
<p><label>'.__('Item HTML code:').' '. <p><label>'.__('Item HTML code:').' '.
form::field('e_html',35,'',html::escapeHTML($mt_cfg['e_html'])).'</label></p> form::field('e_html',50,'',html::escapeHTML($mt_cfg['e_html'])).'</label></p>
<p><label>'.__('Active item HTML code:').' '. <p><label>'.__('Active item HTML code:').' '.
form::field('a_html',35,'',html::escapeHTML($mt_cfg['a_html'])).'</label></p> form::field('a_html',50,'',html::escapeHTML($mt_cfg['a_html'])).'</label></p>
</div><br class="clear" /> </div><br class="clear" />
<p><label>'.__('Excluded themes (separated by slashs \'/\'):').' '. <p><label>'.__('Excluded themes (separated by slashs \'/\'):').' '.
form::field(array('mt_exclude'),40,'',html::escapeHTML($mt_exclude)).'</label></p> form::field(array('mt_exclude'),50,'',html::escapeHTML($mt_exclude)).'</label></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="'.__('Update').'" /> <p><input type="submit" name="mt_action_config" value="'.__('Save').'" />
<input type="submit" name="mt_action_restore" value="'.__('Restore defaults').'" />'. <input type="submit" name="mt_action_restore" value="'.__('Restore defaults').'" />'.
(is_callable(array($core,'formNonce')) ? $core->formNonce() : '').'</p> (is_callable(array($core,'formNonce')) ? $core->formNonce() : '').'</p>
</form>'; </form>';

View File

@ -8,7 +8,7 @@
<dl> <dl>
<dt>With a widget</dt> <dt>With a widget</dt>
<dd>The easiest way is to use the <em>Theme Selector</em> <dd>The easiest way is to use the <em>Arlequin / Theme Selector</em>
<a href="plugin.php?p=widgets">widget</a> that displays a list of available themes.</dd> <a href="plugin.php?p=widgets">widget</a> that displays a list of available themes.</dd>
<dt>In the template file</dt> <dt>In the template file</dt>

View File

@ -13,7 +13,7 @@
* if not, write to the Free Software Foundation, Inc., * * if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
\***************************************************************/ \***************************************************************/
if (!defined('DC_RC_PATH')){return;}
if (!isset($__resources['help']['arlequin'])) if (!isset($__resources['help']['arlequin']))
{ {
$__resources['help']['arlequin'] = dirname(__FILE__).'/help/arlequin.html'; $__resources['help']['arlequin'] = dirname(__FILE__).'/help/arlequin.html';

View File

@ -9,7 +9,7 @@
<dl> <dl>
<dt>Avec un widget</dt> <dt>Avec un widget</dt>
<dd>Le plus simple est d'utiliser le <a href="plugin.php?p=widgets">widget</a> <dd>Le plus simple est d'utiliser le <a href="plugin.php?p=widgets">widget</a>
<em>Sélecteur de thème</em> qui affiche la liste des thèmes disponibles.</dd> <em>Arlequin / Sélecteur de thème</em> qui affiche la liste des thèmes disponibles.</dd>
<dt>Dans le fichier template</dt> <dt>Dans le fichier template</dt>
<dd>Le sélecteur peut aussi être intégré dans l'interface du blog en éditant <dd>Le sélecteur peut aussi être intégré dans l'interface du blog en éditant

View File

@ -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 "" msgid ""
msgstr "" msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "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" "POT-Creation-Date: \n"
"PO-Revision-Date: 2009-10-20 21:01+0100\n" "PO-Revision-Date: 2018-01-22T17:11:42+00:00\n"
"Last-Translator: brol <contact@brol.info>\n" "Last-Translator: brol\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"
"X-Poedit-Language: French\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Poedit-KeywordsList: __\n"
"X-Poedit-Basepath: ../..\n" #: _widgets.php:26
"X-Poedit-SearchPath-0: .\n" 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 #: models.php:32
msgid "Bullets list" msgid "Bullets list"
@ -25,67 +76,12 @@ msgstr "Liste déroulante"
msgid "active theme" msgid "active theme"
msgstr "thème actif" 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 '/'):" 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 \"/\") :"
#: 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" msgid "Arlequin - theme switcher configuration"
msgstr "Arlequin - configuration du sélecteur de thème" 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" msgid "Allows visitors choose a theme"
msgstr "Permettre aux visiteurs de choisir un thème" msgstr "Permettre aux visiteurs de choisir un thème"

View File

@ -13,7 +13,7 @@
* if not, write to the Free Software Foundation, Inc., * * if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
\***************************************************************/ \***************************************************************/
if (!defined('DC_RC_PATH')){return;}
if (!isset($__resources['help']['arlequin'])) if (!isset($__resources['help']['arlequin']))
{ {
$__resources['help']['arlequin'] = dirname(__FILE__).'/help/arlequin.html'; $__resources['help']['arlequin'] = dirname(__FILE__).'/help/arlequin.html';