diff --git a/CHANGES.md b/CHANGES.md index eb45ec8..3300d4b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,17 @@ # Changelog +## Version 4.1.03 de Deltacms +- Modifications : + - Statislite : amèioration de l'affichage de la date initiale, + - Agenda : si la langue originale du site n'est pas reconnue, la langue d'administration est utilisée, + - Blog : dans les labels de Tinymce si la langue originale du site n'est pas reconnue, la langue d'administration est utilisée, + - Langues : si le dapeau correspondant au langage du site n'existe pas un drapeau paer défaut est affiché dans les pages de localisation. +- Correction : + - Statislite : modification de l'initialisation du filtrage primaire. + ## Version 4.1.02 de Deltacms - Modifications : - - Installation : la page d'acceuil du site d'exemple est dans la langue originale du site. + - Installation : la page d'accueil du site d'exemple est dans la langue originale du site. ## Version 4.1.01 de Deltacms - Modifications : diff --git a/README.md b/README.md index 91aacd3..552c39a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# DeltaCMS 4.1.02 +# DeltaCMS 4.1.03 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 des principales langues européennes. diff --git a/core/class/template.class.php b/core/class/template.class.php index 329be2b..3d2cfb0 100644 --- a/core/class/template.class.php +++ b/core/class/template.class.php @@ -427,10 +427,11 @@ class template { /** * Crée un drapeau du site courant * @param string $langId Id de la langue à affiche ou site pour la langue traduite courante - * @param string $margin Ajoute un margin autour de l'icône (choix : left, right, all) + * @param string $size fixe la largeur du drapeau * @return string */ public static function flag($langId, $size = 'auto') { + /* switch ($langId) { case '': $lang = 'fr'; @@ -446,11 +447,15 @@ class template { $lang = 'fr'; } } + */ + $lang = $langId; + if( ! file_exists( 'core/vendor/i18n/png/' . $lang . '.png')) $lang = 'blanc'; + $text = $lang; + if ($text === 'blanc') $text = 'Your language'; return '(' . $lang . ')'; + title="' . $text .'" />'; } /** diff --git a/core/core.php b/core/core.php index 3f64396..7040351 100644 --- a/core/core.php +++ b/core/core.php @@ -48,7 +48,7 @@ class common { // Numéro de version const DELTA_UPDATE_URL = 'https://update.deltacms.fr/master/'; - const DELTA_VERSION = '4.1.02'; + const DELTA_VERSION = '4.1.03'; const DELTA_UPDATE_CHANNEL = "v4"; public static $actions = []; diff --git a/core/include/update.inc.php b/core/include/update.inc.php index 86a333a..a9d0629 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -43,10 +43,10 @@ if ($this->getData(['core', 'dataVersion']) < 4101) { $this->setData(['core', 'dataVersion', 4101]); } -if ($this->getData(['core', 'dataVersion']) < 4102) { +if ($this->getData(['core', 'dataVersion']) < 4103) { // Mise à jour - $this->setData(['core', 'dataVersion', 4102]); + $this->setData(['core', 'dataVersion', 4103]); } diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 74c84a9..ac8df31 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -66,7 +66,7 @@ class init extends common { ] ], 'core' => [ - 'dataVersion' => 4102, + 'dataVersion' => 4103, 'lastBackup' => 0, 'lastClearTmp' => 0, 'lastAutoUpdate' => 0, diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 339c190..4253e21 100644 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -949,7 +949,7 @@ class theme extends common { if($this->isPost()) { // Modification des URL des images dans la bannière perso $featureContent = $this->getInput('themeHeaderText', null); - $featureContent = str_replace(helper::baseUrl(false,false), './', $featureContent); + // $featureContent = str_replace(helper::baseUrl(false,false), './', $featureContent); // Si une image est positionnée, l'arrière en transparent. $this->setData(['theme', 'header', [ 'backgroundColor' => $this->getInput('themeHeaderBackgroundColor'), diff --git a/core/vendor/i18n/png/blanc.png b/core/vendor/i18n/png/blanc.png new file mode 100644 index 0000000..8a2bcb5 Binary files /dev/null and b/core/vendor/i18n/png/blanc.png differ diff --git a/module/agenda/agenda.php b/module/agenda/agenda.php index 0b77882..141c6b9 100644 --- a/module/agenda/agenda.php +++ b/module/agenda/agenda.php @@ -1281,6 +1281,17 @@ class agenda extends common { * Extraction des données de la chaîne url et détection de changement de vue */ private function vue_debut($url,$idda) { + // Lexique + $text = []; + $val = $this->getData(['config', 'i18n', 'langAdmin']); + switch ($val) { + case 'fr' : + $text[0] = 'Modification de vue enregistrée'; + break; + case 'en' : + $text[0] = 'Change of registered view';; + break; + } $pos1 = strpos($url,$idda); $pos2 = strpos($url,'vue:'); $pos3 = strpos($url,'deb:'); @@ -1295,7 +1306,7 @@ class agenda extends common { 'debagenda' => $deb ]]); $this->addOutput([ - 'notification' => 'Modification de vue enregistrée', + 'notification' => $text[0], 'state' => true ]); } diff --git a/module/agenda/view/index/index.js.php b/module/agenda/view/index/index.js.php index e1744d6..c65c1f9 100644 --- a/module/agenda/view/index/index.js.php +++ b/module/agenda/view/index/index.js.php @@ -15,6 +15,10 @@ $(document).ready(function() { //Fullcalendar : instanciation, initialisations + getData(['config', 'i18n', 'langBase']) ; + if( strpos( $listeLocale, $valid_locale ) === false ) $valid_locale = $this->getData(['config', 'i18n', 'langAdmin']); + ?> var calendarEl = document.getElementById('calendar'); var calendar = new FullCalendar.Calendar(calendarEl, { header: { @@ -35,7 +39,7 @@ } }, plugins: [ 'dayGrid', 'interaction' ], - locale : 'getData(['config', 'i18n', 'langBase']) ;?>', + locale : '', defaultView: 'getData(['module', $this->getUrl(0), 'vue', 'vueagenda']) ;?>', defaultDate: 'getData(['module', $this->getUrl(0), 'vue', 'debagenda']) ;?>', selectable: true, diff --git a/module/statislite/statislite.php b/module/statislite/statislite.php index f534d7c..ef88a2d 100644 --- a/module/statislite/statislite.php +++ b/module/statislite/statislite.php @@ -686,6 +686,15 @@ class statislite extends common { 'config' => false, 'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData']) ]]); + // Initialisation de filtre_primaire.json qui contient les paramètres de la configuration avancée + $json = '{}'; + $fp= json_decode($json, true); + $fp['robots'] = array( 'ua' => 0, 'ip'=> 0); + $fp['listeIP'] = []; + $fp['listeQS'] = array( 0 => $this->getUrl(0)); + $fp['listeBot'] = []; + $json = json_encode($fp); + file_put_contents(self::$fichiers_json.'filtre_primaire.json',$json); // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl().$this->getUrl(0).'/config', @@ -729,7 +738,7 @@ class statislite extends common { self::$comptepages = 0; self::$dureevisites = 0; $datedebut = date('Y/m/d H:i:s'); - + // Initialisation du fichier cumul.json if(! is_file(self::$fichiers_json.'cumul.json')){ $this -> initcumul(); @@ -1392,7 +1401,7 @@ class statislite extends common { /* Geolocalisation */ - + /* Utilisation de cette fonction supprimée */ private function geolocalise($ip){ // Géolocalisation avec le site www.ipapi.com qui offre 10000 requêtes / mois if( is_file(self::$base.'clef_ipapi_com.txt')){ diff --git a/module/statislite/view/index/index.php b/module/statislite/view/index/index.php index 4e97950..dbc3f8d 100644 --- a/module/statislite/view/index/index.php +++ b/module/statislite/view/index/index.php @@ -98,9 +98,24 @@ $geolocalisation = $this->getData(['module', $this->getUrl(0), 'config', 'geoloc /* * Affichage cumulé depuis le début de l'analyse soit depuis l'initialisation du fichier cumul.json */ -?> +?>
-

+ +