From aa4741d4734661c4e3dde08e21109bfb287e4827 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Tue, 17 Aug 2021 09:04:25 +0200 Subject: [PATCH 1/7] =?UTF-8?q?mise=20=C3=A0=20jour=20activation=20du=20r?= =?UTF-8?q?=C3=A9f=C3=A9rencement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/include/update.inc.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/include/update.inc.php b/core/include/update.inc.php index 91f264f3..ac274951 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -588,8 +588,8 @@ $this->deleteData(['config','itemsperPage']); $this->setData(['core', 'dataVersion', 10600]); } -// Version 11.0.00 -if ($this->getData(['core', 'dataVersion']) < 11000) { +// Version 11.0.06 +if ($this->getData(['core', 'dataVersion']) < 11006) { // Option de déconnexion auto activée $this->setData(['config','autoDisconnect',true]); @@ -636,7 +636,10 @@ if ($this->getData(['core', 'dataVersion']) < 11000) { $this->setData(['page', $parent, 'content', $parent . '.html']); } - $this->setData(['core', 'dataVersion', 11000]); + // Référencement + $this->setData(['config','seo','robots',true]); + + $this->setData(['core', 'dataVersion', 11006]); } ?> From a6255053d3d4ffcfb39b704801c14d6179e8a642 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Thu, 19 Aug 2021 05:18:19 +0200 Subject: [PATCH 2/7] Bug sautillement avec l'apparition de l'ascenseur. --- core/layout/common.css | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/layout/common.css b/core/layout/common.css index 5ec54e7a..77435ecb 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -25,7 +25,8 @@ html, body { - min-height: 100%; + /*min-height: 100%;*/ + min-height: 100vh; } @@ -757,7 +758,8 @@ li .menuSideChild { } section { - min-height: 450px; + /*min-height: 100%;*/ + min-height: 65vh; } section #sectionTitle { From d4c79e95fda82b875d562fd84172d7fcc567f3fe Mon Sep 17 00:00:00 2001 From: fredtempez Date: Thu, 19 Aug 2021 05:30:01 +0200 Subject: [PATCH 3/7] =?UTF-8?q?Propri=C3=A9t=C3=A9=20shadow,=20valeur=20pa?= =?UTF-8?q?r=20d=C3=A9faut=20invalide?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/install/ressource/defaultdata.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index d689bf4a..c6ac5331 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -175,8 +175,8 @@ class init extends common { ], 'site' => [ 'backgroundColor' => 'rgba(255, 255, 255, 1)', - 'radius' => '0', - 'shadow' => '0', + 'radius' => '0px', + 'shadow' => '0px 0px 0px', 'width' => '960px' ], 'block' => [ From 5848941062462602b791ae6d6b7211f331086038 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 20 Aug 2021 07:03:08 +0200 Subject: [PATCH 4/7] =?UTF-8?q?R=C3=A9organisation=20des=20modules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/addon/addon.php | 2 +- core/module/addon/view/index/index.php | 10 ++------ core/module/addon/view/store/store.php | 2 +- core/module/addon/view/upload/upload.php | 31 ++++++++++++++++++------ 4 files changed, 27 insertions(+), 18 deletions(-) diff --git a/core/module/addon/addon.php b/core/module/addon/addon.php index 2793cc41..ff8c05a7 100644 --- a/core/module/addon/addon.php +++ b/core/module/addon/addon.php @@ -395,7 +395,7 @@ class addon extends common { // Valeurs en sortie $this->addOutput([ - 'title' => 'Modules installés', + 'title' => 'Gestion des modules', 'view' => 'index' ]); } diff --git a/core/module/addon/view/index/index.php b/core/module/addon/view/index/index.php index 5b868422..55854804 100644 --- a/core/module/addon/view/index/index.php +++ b/core/module/addon/view/index/index.php @@ -14,16 +14,10 @@ 'value' => 'Aide' ]); ?> -
+
helper::baseUrl() . 'addon/upload', - 'value' => 'Téléverser un module' - ]); ?> -
-
- helper::baseUrl() . 'addon/store', - 'value' => 'Catalogue en ligne' + 'value' => 'Installer un module' ]); ?>
diff --git a/core/module/addon/view/store/store.php b/core/module/addon/view/store/store.php index 803f5712..5ed010b6 100644 --- a/core/module/addon/view/store/store.php +++ b/core/module/addon/view/store/store.php @@ -2,7 +2,7 @@
'buttonGrey', - 'href' => helper::baseUrl() . 'addon', + 'href' => helper::baseUrl() . 'addon/upload', 'ico' => 'left', 'value' => 'Retour' ]); ?> diff --git a/core/module/addon/view/upload/upload.php b/core/module/addon/view/upload/upload.php index 5fcd7cdc..288d77f4 100644 --- a/core/module/addon/view/upload/upload.php +++ b/core/module/addon/view/upload/upload.php @@ -15,21 +15,30 @@ 'value' => 'Aide' ]); ?>
-
- 'Valider', - 'ico' => 'check' - ]); ?> -
+
+
+
+
+

Télécharger un module du catalogue en ligne

+
+
+ helper::baseUrl() . 'addon/store', + 'value' => 'Catalogue en ligne' + ]); ?> +
+
+
+
-

Installer ou mettre à jour un module

+

Installer ou mettre à jour un module téléchargé

-
+
false, 'help' => 'Permet de forcer une mise à jour même si la version du module est inférieure ou égale à celle du module installé.', ]); ?>
+
+ 'Valider', + 'ico' => 'check' + ]); ?> +
From bc20e9020925699e4ab3feb12385c2cce26c6294 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 20 Aug 2021 11:39:04 +0200 Subject: [PATCH 5/7] =?UTF-8?q?11007=20=20bug=20search=20+=20proc=C3=A9dur?= =?UTF-8?q?e=20init?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 2 +- README.md | 2 +- core/core.php | 2 +- module/search/ressource/defaultdata.php | 2 +- module/search/search.php | 56 ++++--------------------- 5 files changed, 13 insertions(+), 51 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8940fe66..b5132efc 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,7 @@ # Changelog -## Version 11.0.06 +## Version 11.0.07 - Modifications : - Intégration de la classe layout dans la classe core - Gestion multi-langues diff --git a/README.md b/README.md index 9a3e586f..5e2a5a32 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# ZwiiCMS 11.0.06 +# ZwiiCMS 11.0.07 Zwii 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. diff --git a/core/core.php b/core/core.php index 104f85b4..42fdb59d 100755 --- a/core/core.php +++ b/core/core.php @@ -45,7 +45,7 @@ class common { // Numéro de version const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/'; - const ZWII_VERSION = '11.0.06'; + const ZWII_VERSION = '11.0.07'; const ZWII_UPDATE_CHANNEL = "v11"; public static $actions = []; diff --git a/module/search/ressource/defaultdata.php b/module/search/ressource/defaultdata.php index a4980e6e..18005ff2 100644 --- a/module/search/ressource/defaultdata.php +++ b/module/search/ressource/defaultdata.php @@ -5,7 +5,7 @@ class init extends search { 'resultHideContent' => false, 'placeHolder' => 'Un ou plusieurs mots-clés séparés par un espace ou par +', 'submitText' => 'Rechercher', - 'versionData' => '2.0' + 'versionData' => '2.2' ]; public static $defaultTheme = [ 'keywordColor' => 'rgba(229, 229, 1, 1)' diff --git a/module/search/search.php b/module/search/search.php index e71aa931..1ad80a6e 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -52,44 +52,14 @@ class search extends common { */ private function update() { - // Déplacement des données d'une version ultérieure - // selon la présence de previewLenght - if ($this->getData(['module', $this->getUrl(0), 'previewLength']) ) { - $data = $this->getData(['module', $this->getUrl(0)]); - // Feuille de style - $fileCSS = self::DATADIRECTORY . $this->getUrl(0) . '/theme.css' ; - $this->setData(['module', $this->getUrl(0), 'config', [ - 'submitText' => $this->getData(['module', $this->getUrl(0), 'submitText']), - 'placeHolder' => $this->getData(['module', $this->getUrl(0), 'placeHolder']), - 'resultHideContent' => $this->getData(['module', $this->getUrl(0), 'resultHideContent']), - 'previewLength' => $this->getData(['module', $this->getUrl(0), 'previewLength']), - 'versionData' => '2.0' - ]]); - $this->setData(['module', $this->getUrl(0), 'theme', [ - 'keywordColor' => $this->getData(['module', $this->getUrl(0), 'keywordColor']), - 'style' => $fileCSS - ]]); - - // Dossier de l'instance - if (!is_dir(self::DATADIRECTORY . $this->getUrl(0) )) { - mkdir (self::DATADIRECTORY . $this->getUrl(0), 0777, true); - } - // Générer la feuille de CSS - $style = '.keywordColor {background: ' . $this->getData(['module', $this->getUrl(0), 'theme', 'keywordColor']) . ';}'; - // Sauver la feuille de style - $success = file_put_contents( $fileCSS, $style); - // Nettoyage des données précédentes - $this->deleteData(['module', $this->getUrl(0), 'submitText']); - $this->deleteData(['module', $this->getUrl(0), 'placeHolder']); - $this->deleteData(['module', $this->getUrl(0), 'resultHideContent']); - $this->deleteData(['module', $this->getUrl(0), 'previewLength']); - $this->deleteData(['module', $this->getUrl(0), 'keywordColor']); - - $this->setData(['module', $this->getUrl(0), 'config', 'versionData', '2.0']); - } $versionData = $this->getData(['module',$this->getUrl(0),'config', 'versionData' ]); + // le module n'est pas initialisé + if ($versionData === NULL) { + $this->init(); + } + // Mise à jour 2.2 if (version_compare($versionData, '2.2', '<') ) { if (is_dir(self::DATADIRECTORY . 'pages/')) { @@ -145,10 +115,6 @@ class search extends common { // Mise à jour des données de module $this->update(); - // Initialisation d'un nouveau module - $this->init(); - - if($this->isPost()) { // Générer la feuille de CSS @@ -194,10 +160,6 @@ class search extends common { // Mise à jour des données de module $this->update(); - // Initialisation d'un nouveau module - $this->init(); - - if($this->isPost()) { //Initialisations variables $success = true; @@ -267,9 +229,9 @@ class search extends common { $url = $parentId; $titre = $this->getData(['page', $parentId, 'title']); $content = file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $parentId, 'content'])); - $contenu = $titre . ' ' . $contenu ; + $content = $titre . ' ' . $content ; // Pages sauf pages filles et articles de blog - $tempData = $this->occurrence($url, $titre, $contenu, $motclef, self::$motentier); + $tempData = $this->occurrence($url, $titre, $content, $motclef, self::$motentier); if (is_array($tempData) ) { $result [] = $tempData; } @@ -283,9 +245,9 @@ class search extends common { $url = $childId; $titre = $this->getData(['page', $childId, 'title']); $content = file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $childId, 'content'])); - $contenu = $titre . ' ' . $contenu ; + $content = $titre . ' ' . $content ; //Pages filles - $tempData = $this->occurrence($url, $titre, $contenu, $motclef, self::$motentier); + $tempData = $this->occurrence($url, $titre, $content, $motclef, self::$motentier); if (is_array($tempData) ) { $result [] = $tempData; } From cc630ccfa3467e2599338199484b0abbebeae4b8 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 20 Aug 2021 11:44:38 +0200 Subject: [PATCH 6/7] =?UTF-8?q?11007=20news=20et=20gallery=20init=20ne=20s?= =?UTF-8?q?'ex=C3=A9cute=20que=20si=20le=20num=C3=A9ro=20de=20version=20du?= =?UTF-8?q?=20module=20n'existe=20pas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/gallery/gallery.php | 11 +++++------ module/news/news.php | 22 +++++----------------- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index f66beb66..6f40ac7c 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -179,6 +179,11 @@ class gallery extends common { $versionData = $this->getData(['module',$this->getUrl(0),'config', 'versionData' ]); + // le module n'est pas initialisé + if ($versionData === NULL) { + $this->init(); + } + // Mise à jour 3.1 if (version_compare($versionData, '3.1', '<') ) { if (is_dir(self::DATADIRECTORY . 'pages/')) { @@ -313,9 +318,6 @@ class gallery extends common { // Mise à jour des données de module $this->update(); - // Initialisation d'un nouveau module - $this->init(); - //Affichage de la galerie triée $g = $this->getData(['module', $this->getUrl(0), 'content']); $p = helper::arrayCollumn(helper::arrayCollumn($g,'config'),'position'); @@ -599,9 +601,6 @@ class gallery extends common { // Mise à jour des données de module $this->update(); - // Initialisation d'un nouveau module - $this->init(); - // Images d'une galerie if($this->getUrl(1)) { // La galerie n'existe pas diff --git a/module/news/news.php b/module/news/news.php index 177e806d..5da4ed42 100755 --- a/module/news/news.php +++ b/module/news/news.php @@ -189,9 +189,6 @@ class news extends common { // Mise à jour des données de module $this->update(); - // Initialisation d'un nouveau module - $this->init(); - // Soumission du formulaire if($this->isPost()) { @@ -396,9 +393,6 @@ class news extends common { // Mise à jour des données de module $this->update(); - // Initialisation d'un nouveau module - $this->init(); - // Affichage d'un article if( $this->getUrl(1) @@ -502,19 +496,13 @@ class news extends common { */ private function update() { - // Créer la structure de configuration si absente - // Il n'existait aucun paramétrage dans les version précédentes - if ($this->getData(['module', $this->getUrl(0), 'config', 'itemsperPage']) === NULL ) { - // Données config et theme absentes du précédent module - require_once('module/news/ressource/defaultdata.php'); - $this->setData(['module', $this->getUrl(0), 'config', init::$defaultData]); - // Données de thème - $this->setData(['module', $this->getUrl(0), 'theme', init::$defaultTheme]); - $this->setData(['module', $this->getUrl(0), 'theme', 'style', self::DATADIRECTORY . $this->getUrl(0) . '/theme.css' ]); - } - $versionData = $this->getData(['module',$this->getUrl(0),'config', 'versionData' ]); + // le module n'est pas initialisé + if ($versionData === NULL) { + $this->init(); + } + // Mise à jour 3.2 if (version_compare($versionData, '3.1', '<') ) { $this->setData(['module',$this->getUrl(0),'theme', 'itemsBlur', '0%' ]); From b24ca52a45b6313478bf7aba6f8dba027c80102f Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 20 Aug 2021 11:50:32 +0200 Subject: [PATCH 7/7] numero de version des modules news gallery et search --- module/gallery/gallery.php | 2 +- module/news/news.php | 2 +- module/search/search.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 6f40ac7c..c5d56367 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -17,7 +17,7 @@ class gallery extends common { - const VERSION = '3.1'; + const VERSION = '3.2'; const REALNAME = 'Galerie'; const DELETE = true; const UPDATE = '0.0'; diff --git a/module/news/news.php b/module/news/news.php index 5da4ed42..67787218 100755 --- a/module/news/news.php +++ b/module/news/news.php @@ -15,7 +15,7 @@ class news extends common { - const VERSION = '3.4'; + const VERSION = '3.5'; const REALNAME = 'News'; const DELETE = true; const UPDATE = '0.0'; diff --git a/module/search/search.php b/module/search/search.php index 1ad80a6e..d8fadaad 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -19,7 +19,7 @@ class search extends common { - const VERSION = '2.2'; + const VERSION = '2.3'; const REALNAME = 'Recherche'; const DELETE = true; const UPDATE = '0.0';