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'])).'
'.__('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 @@