Modifications 4103

This commit is contained in:
Deltacms 2022-04-12 08:55:42 +02:00
parent 6d1c8a14cd
commit 5235936ccd
12 changed files with 69 additions and 16 deletions

View File

@ -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 :

View File

@ -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.

View File

@ -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 '<img class="flag" src="' . helper::baseUrl(false) . 'core/vendor/i18n/png/' . $lang . '.png"
width="' . $size .'"
height="' . $size .'"
title="' . $lang .'"
alt="(' . $lang . ')"/>';
title="' . $text .'" />';
}
/**

View File

@ -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 = [];

View File

@ -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]);
}

View File

@ -66,7 +66,7 @@ class init extends common {
]
],
'core' => [
'dataVersion' => 4102,
'dataVersion' => 4103,
'lastBackup' => 0,
'lastClearTmp' => 0,
'lastAutoUpdate' => 0,

View File

@ -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'),

BIN
core/vendor/i18n/png/blanc.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

View File

@ -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
]);
}

View File

@ -15,6 +15,10 @@
$(document).ready(function() {
//Fullcalendar : instanciation, initialisations
<?php $listeLocale = 'af, ar, bg, bs, ca, cs, da, de, el, en, es, et, eu, fa, fi, fr, gl, he, hi, hr, hu, id, is, it, ja, ka, kk, ko, lb, lt, lv, mk, ms, nb, nl, nn, pl, pt, ro, ru, sk, sl ,sq, sr, sv, th, tr, uk, vi, zh';
$valid_locale = $this->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 : '<?php echo $this->getData(['config', 'i18n', 'langBase']) ;?>',
locale : '<?php echo $valid_locale ;?>',
defaultView: '<?php echo $this->getData(['module', $this->getUrl(0), 'vue', 'vueagenda']) ;?>',
defaultDate: '<?php echo $this->getData(['module', $this->getUrl(0), 'vue', 'debagenda']) ;?>',
selectable: true,

View File

@ -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')){

View File

@ -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
*/
?>
?>
<div class="block">
<h4><?php echo $text[0]; echo $module::$datedebut; ?></h4>
<?php
$lang = 'fr_FR';
$zone = 'Europe/Paris';
if ($val === 'en'){
$lang = 'en_GB';
$zone = 'Europe/London';
}
$fmt = datefmt_create(
$lang,
IntlDateFormatter::LONG,
IntlDateFormatter::SHORT,
$zone,
IntlDateFormatter::GREGORIAN
);
?>
<h4><?php echo $text[0]; echo datefmt_format($fmt, strtotime($module::$datedebut)); ?></h4>
<div class="row">
<div class="col4"><h3>
<?php echo $text[1].$module::$comptepagestotal;?></h3>