diff --git a/CHANGES.md b/CHANGES.md index 90ae4f5..000418e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,14 @@ # Changelog -## Version 4.4.08 de Deltacms -- Correction : - - Thème / bannière : perte de contrôle du thème si la case 'Masquer la bannière en écran réduit' était décochée. +## Version 4.5.01 de Deltacms +- Modifications : + - Une troisième langue d'administration est disponible : espagnol / castillan, + - Thème / Menu : le menu en petit écran (burger) dispose maintenant de ses propres paramètres, + - Nouveaux gabarits pour l'éditeur Tinymce : accordéon à 3 et 4 paragraphes, + - Statislite 4.7 : comptage des liens cliqués (ils doivent posséder la class="download-link" ). +- Corrections : + - Statislite / configuration : erreur qui effaçait l'information 'configuration validée', + - Slider 4.8 / Configuration : les liens sur les images étaient modifiés au changement de l'ordre des pages. ## Version 4.4.07 de Deltacms - Modifications : diff --git a/README.md b/README.md index c8ad7da..29b1c01 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,18 @@ -# DeltaCMS 4.4.08 +# DeltaCMS 4.5.01 DeltaCMS est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation. -L'administration du site est bilingue anglais ou français, le site peut être rédigé dans une langue quelconque. +L'administration du site est trilingue espagnol (castillan), anglais ou français, le site peut être rédigé dans une langue quelconque. 2 modes de traduction sont proposés : traduction rédigée, assistée (conseillée) ou à défaut traduction automatique par script. DeltaCMS is a database-less (flat-file) CMS that allows you to easily create and manage a website without any programming knowledge. -The administration of the site is bilingual English or French, the site can be written in any language. +The administration of the site is trilingual Spanish, English or French, the site can be written in any language. 2 translation modes are available: written and assisted translation (recommended) or automatic translation by script. +DeltaCMS es un CMS sin base de datos (flat-file) que permite crear y administrar fácilmente un sitio web sin ningún conocimiento de programación. +La administración del sitio es trilingüe español (castellano), inglés o francés, el sitio puede ser escrito en cualquier idioma. +Hay 2 modos de traducción disponibles: traducción escrita, asistida (recomendada) o traducción automática por script. + [Site](http://deltacms.fr/) DeltaCMS a été créé à partir de ZwiiCMS 11.2.00.24 diff --git a/core/class/helper.class.php b/core/class/helper.class.php index 29c2431..d024c2e 100644 --- a/core/class/helper.class.php +++ b/core/class/helper.class.php @@ -60,7 +60,7 @@ class helper { } if(function_exists('file_get_contents') && ini_get('allow_url_fopen') ){ - $url_get_contents_data = @file_get_contents($url); // Masque un warning éventuel + $url_get_contents_data = file_get_contents($url); // Masquait un warning éventuel }elseif(function_exists('curl_version')){ $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); @@ -295,7 +295,7 @@ class helper { */ public static function colorVariants($rgba) { preg_match('#\(+(.*)\)+#', $rgba, $matches); - $rgba = explode(', ', $matches[1]); + $rgba = explode(',', $matches[1]); return [ 'normal' => 'rgba(' . $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ',' . $rgba[3] . ')', 'darken' => 'rgba(' . max(0, $rgba[0] - 15) . ',' . max(0, $rgba[1] - 15) . ',' . max(0, $rgba[2] - 15) . ',' . $rgba[3] . ')', diff --git a/core/core.js.php b/core/core.js.php index 0130657..c451fca 100644 --- a/core/core.js.php +++ b/core/core.js.php @@ -265,11 +265,11 @@ core.start = function() { * Affiche / Cache le menu en mode responsive */ var menuDOM = $("#menu"); - $("#toggle").on("click", function() { + $("#burgerIcon").on("click", function() { menuDOM.slideToggle(); }); $(window).on("resize", function() { - if($(window).width() > 768) { + if($(window).width() > 799) { menuDOM.css("display", ""); } }); @@ -483,18 +483,19 @@ $(document).ready(function(){ }); /** - * Icône du Menu Burger + * Icône du Menu Burger, couleur du bandeau burger et position du menu */ - $("#toggle").click(function() { - var changeIcon = $('#toggle').children("span"); + $("#burgerIcon").click(function() { + var changeIcon = $('#burgerIcon').children("span"); + var bgColor = "getData(['theme', 'menu', 'burgerBannerColor']) ;?>"; + var bgColorOpaque = bgColor.replace(/[^,]+(?=\))/, '1'); if ( $(changeIcon).hasClass('zwiico-menu') ) { $(changeIcon).removeClass('zwiico-menu').addClass('zwiico-cancel'); - $("#navfixedlogout, #navfixedconnected").css('position','static'); - $('html, body').animate({ scrollTop: '0px'}, 100); + $("nav #toggle").css("background-color",bgColorOpaque); } else { $(changeIcon).addClass('zwiico-menu'); - $("#navfixedlogout, #navfixedconnected").css('position','sticky'); + $("nav #toggle").css("background-color",bgColor); }; }); @@ -557,7 +558,7 @@ $(document).ready(function(){ * sauf en petit écran */ $(window).on("resize", function() { - if( $(window).width() > 768 ){ + if( $(window).width() > 799 ){ if( typeof parentPage !== "undefined" ){ var page=[]; if( 'getData(['theme', 'menu', 'minWidthParentOrAll']); ?>' === ''){ @@ -579,7 +580,43 @@ $(document).ready(function(){ } }).trigger("resize"); - - + /* Compteur de téléchargements + * Fonctionne avec download_counter.php + * Les liens comptabilisés doivent avoir la class="download-link" + * Envoi au fichier download_counter.php la donnée url + */ + getData(['config', 'statislite', 'enable']) && is_file('site/data/statislite/module/download_counter/download_counter.php' ) ) { ?> + $('.download-link').on('click', function(event) { + // Récupérer le chemin vers le fichier + var filePath = $(this).attr('href'); + // Envoyer une requête AJAX pour enregistrer le téléchargement + $.ajax({ + type: 'POST', + url: '/site/data/statislite/module/download_counter/download_counter.php', + data: {'url': filePath}, + }); + }); + + + /* Affichage des items du sous-menu + * après appui sur l'icône down + */ + if($(window).width() < 800) { + $("nav #menu ul li span").click(function() { + // id de la page parent + var parentId = $(this).parents().attr("id"); + var select = "nav li ul#"+parentId; + if( $(select).css("z-index") === "-1" ) { + $(select).css("z-index","1"); + $(select).css("opacity","1"); + $(select).css("padding-left","20px"); + $(select).css("position","static"); + } else { + $(select).css("z-index","-1"); + $(select).css("opacity","0"); + $(select).css("position","absolute"); + } + }); + } }); diff --git a/core/core.php b/core/core.php index 82f5b7e..8df78f9 100644 --- a/core/core.php +++ b/core/core.php @@ -49,7 +49,7 @@ class common { // Numéro de version const DELTA_UPDATE_URL = 'https://update.deltacms.fr/master/'; - const DELTA_VERSION = '4.4.08'; + const DELTA_VERSION = '4.5.01'; const DELTA_UPDATE_CHANNEL = "v4"; public static $actions = []; @@ -149,6 +149,25 @@ class common { 'eu' => 'Basque (eu)', 'none' => 'Autre langue' ]; + public static $i18nList_es = [ + 'fr' => 'Francés (fr)', + 'de' => 'Alemán (de)', + 'en' => 'Inglés (en)', + 'da' => 'Danés (da)', + 'es' => 'Español (es)', + 'fi' => 'Finés (fi)', + 'el' => 'Griego (el)', + 'it' => 'Italiano (it)', + 'ga' => 'Irlandés (ga)', + 'nl' => 'Holandés (nl)', + 'pt' => 'Portugués (pt)', + 'sv' => 'Sueco (sv)', + 'br' => 'Bretón (br)', + 'ca' => 'Catalán (ca)', + 'co' => 'Córcega (co)', + 'eu' => 'Euskera (eu)', + 'none' => 'Otro idioma' + ]; public static $i18nList_en = [ 'en' => 'English (en)', 'fr' => 'French (fr)', @@ -170,7 +189,8 @@ class common { ]; public static $i18nList_admin = [ 'fr' => 'Français (fr)', - 'en' => 'English (en)' + 'en' => 'English (en)', + 'es' => 'Español (es)' ]; public static $i18nList_int = [ 'fr' => 'Français (fr)', @@ -845,7 +865,7 @@ class common { } /** - * Retourne une chemin localisé pour l'enregistrement des données + * Retourne un chemin localisé pour l'enregistrement des données * @param $stageId nom du module * @param $lang langue des pages * @return string du dossier à créer @@ -1657,54 +1677,94 @@ class common { public function showMenu( $position ='') { // Lexique include('./core/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_core.php'); - $menuClass = ''; + $menuClass = ''; $burgerclass =''; $burgerclassshort =''; + // Ajout de la class navfixedburgerconnected ou navfixedburgerlogout si le bandeau (texte ou logo + icône burger) du menu burger est fixe + if( $this->getData(['theme', 'menu', 'burgerFixed']) === true ){ + if( $this->getUser('password') === $this->getInput('DELTA_USER_PASSWORD') AND $this->getUser('group') > self::GROUP_MEMBER ) { + $burgerclass = 'class="navfixedburgerconnected"'; + $burgerclassshort = 'navfixedburgerconnected'; + } else { + $burgerclass = 'class="navfixedburgerlogout"'; + $burgerclassshort = 'navfixedburgerlogout'; + } + } else { + if( $this->getUser('password') === $this->getInput('DELTA_USER_PASSWORD') AND $this->getUser('group') > self::GROUP_MEMBER) { + $burgerclass = 'class="navburgerconnected"'; + $burgerclassshort = 'navburgerconnected'; + } + } switch ($position) { case 'top': // Détermine si le menu est fixe en haut de page lorsque l'utilisateur n'est pas connecté if ( $this->getData(['theme', 'menu', 'position']) === 'top' AND $this->getData(['theme', 'menu', 'fixed']) === true ){ if( $this->getUser('password') === $this->getInput('DELTA_USER_PASSWORD') AND $this->getUser('group') > self::GROUP_MEMBER) { - echo '