From 2a197e886bd7bf026c834275ab92e5acdef79043 Mon Sep 17 00:00:00 2001 From: SylvainLelievre Date: Thu, 11 Mar 2021 11:37:46 +0100 Subject: [PATCH 1/3] =?UTF-8?q?Syst=C3=A8me=20d'aide=20dans=20core.js.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.js.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/core.js.php b/core/core.js.php index 456cd067..5bed7595 100755 --- a/core/core.js.php +++ b/core/core.js.php @@ -474,6 +474,20 @@ $(document).ready(function(){ }; }); + /** + * Active le système d'aide interne + * + */ + + $(".helpDisplayButton").on({ + mouseenter: function () { + $(".helpDisplayContent").slideDown(); + }, + mouseleave: function () { + $(".helpDisplayContent").slideUp(); + } + }); + /** * Remove ID Facebook from URL */ From 37cf776789a9a1437c86c7e57a21ec4b8d805648 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Thu, 11 Mar 2021 14:57:10 +0100 Subject: [PATCH 2/3] Pb sitemap avec proxy --- CHANGES.md | 5 ++++ core/core.php | 44 ++++++--------------------------- core/module/config/config.php | 44 ++++----------------------------- core/module/install/install.php | 2 -- 4 files changed, 17 insertions(+), 78 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 133b0b56..ca91add5 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,11 @@ # Changelog ## version 10.5.00 +A partir de cette version, les version de php inférieures à 7.2 ne sont plus supportées. +- Corrections : + - SiteMapGenerator 4.3.1 + - La classe SiteMapGenerator prend en charge la création/modification du fichier robots.txt + - Si un proxy est défini le sitemap n'est pas soumis aux moteurs de recherche afin d'éviter un timeout trop important. - Modifications : - Gestion des modules dans l'interface d'administration. diff --git a/core/core.php b/core/core.php index 051e6b94..97b22910 100755 --- a/core/core.php +++ b/core/core.php @@ -695,37 +695,6 @@ class common { return ($folder); } - /** - * Génère un fichier robots.txt à l'installation - * Si le fichier existe déjà les commandes sont ajoutées - */ - public function createRobots() { - - $robotValue = - PHP_EOL . - '# ZWII CONFIG ---------' . PHP_EOL . - 'User-agent: *' . PHP_EOL . - 'Allow: /site/file/' .PHP_EOL . - 'Disallow: /site/' .PHP_EOL . - 'Sitemap: ' . helper::baseUrl(false) . 'sitemap.xml' . PHP_EOL . - 'Sitemap: ' . helper::baseUrl(false) . 'sitemap.xml.gz' . PHP_EOL . - '# ZWII CONFIG ---------' . PHP_EOL ; - - if (file_exists('robots.txt')) { - return(file_put_contents( - 'robots.txt', - $robotValue, - FILE_APPEND - )); - } else { - // Sinon on crée un fichier - return(file_put_contents( - 'robots.txt', - $robotValue - )); - } - } - /** * Génère un fichier un fichier sitemap.xml @@ -740,9 +709,7 @@ class common { //require_once "core/vendor/sitemap/SitemapGenerator.php"; $timezone = $this->getData(['config','timezone']); - $outputDir = getcwd(); - $sitemap = new \Icamys\SitemapGenerator\SitemapGenerator(helper::baseurl(false),$outputDir); // will create also compressed (gzipped) sitemap @@ -753,10 +720,11 @@ class common { $sitemap->setMaxUrlsPerSitemap(50000); // sitemap file name - $sitemap->setSitemapFileName("sitemap.xml"); + $sitemap->setSitemapFileName( 'sitemap.xml') ; + // Set the sitemap index file name - $sitemap->setSitemapIndexFileName("sitemap-index.xml"); + $sitemap->setSitemapIndexFileName( 'sitemap-index.xml'); $datetime = new DateTime(date('c')); $datetime->format(DateTime::ATOM); // Updated ISO8601 @@ -812,9 +780,11 @@ class common { $sitemap->updateRobots(); // Submit your sitemaps to Google, Yahoo, Bing and Ask.com - $sitemap->submitSitemap(); + if (empty ($this->getData(['config','proxyType']) . $this->getData(['config','proxyUrl']) . ':' . $this->getData(['config','proxyPort'])) ) { + $sitemap->submitSitemap(); + } - return(file_exists('sitemap.xml')); + return(file_exists('sitemap.xml') && file_exists('robots.txt')); } diff --git a/core/module/config/config.php b/core/module/config/config.php index 7665cfd7..a2244036 100755 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -20,7 +20,6 @@ class config extends common { 'backup' => self::GROUP_ADMIN, 'configMetaImage' => self::GROUP_ADMIN, 'generateFiles' => self::GROUP_ADMIN, - 'updateRobots' => self::GROUP_ADMIN, 'index' => self::GROUP_ADMIN, 'advanced' => self::GROUP_ADMIN, 'manage' => self::GROUP_ADMIN, @@ -187,55 +186,22 @@ class config extends common { /** * Génére les fichiers pour les crawlers + * Sitemap compressé et non compressé + * Robots.txt */ public function generateFiles() { + // Mettre à jour le site map $successSitemap=$this->createSitemap(); - // Créer un fichier robots.txt - $successRobots=$this->updateRobots(); - if ( $successSitemap === true && - $successRobots >= 100) { - $success = true; - } else { - $success = false; - } // Valeurs en sortie $this->addOutput([ - 'notification' => ($successSitemap === true && $successRobots >= 100) ? 'Création réussie' : 'Echec d\'écriture', + 'notification' => $successSitemap ? 'Le sitemap a été mis à jour' : 'Echec d\'écriture, le site map n\'a pas été mis à jour', 'redirect' => helper::baseUrl() . 'config/advanced', - 'state' => ($successSitemap === true && $successRobots >=100) ? true : false + 'state' => $successSitemap ]); } - /** - * Met à jour un fichier robots.txt lors du changement de réécriture - */ - - private function updateRobots() { - // Créer le fichier robot si absent - if (!file_exists('robots.txt')) { - $this->createRobots(); - } - // backup - rename ('robots.txt','robots.bak'); - $fileold = fopen('robots.bak','r'); - $filenew = fopen('robots.txt','w'); - while(!feof($fileold)) { - $data = fgets($fileold); - if (strpos($data,'sitemap.xml') == 0) { - fwrite($filenew, $data); - } else { - fwrite($filenew, 'Sitemap: ' . helper::baseUrl(false) . 'sitemap.xml' . PHP_EOL); - fwrite($filenew, 'Sitemap: ' . helper::baseUrl(false) . 'sitemap.xml.gz' . PHP_EOL); - fwrite($filenew, '# ZWII CONFIG ---------' . PHP_EOL); - break; - } - } - fclose($fileold); - unlink('robots.bak'); - return(fclose($filenew)); - } /** * Sauvegarde des données diff --git a/core/module/install/install.php b/core/module/install/install.php index 1c2c1254..d5c7a419 100755 --- a/core/module/install/install.php +++ b/core/module/install/install.php @@ -103,8 +103,6 @@ class install extends common { } // Stocker le dossier d'installation $this->setData(['core', 'baseUrl', helper::baseUrl(false,false) ]); - // Générer un fichier robots.txt - $this->createRobots(); // Créer sitemap $this->createSitemap(); // Valeurs en sortie From 6ddec644acedcfee5fdf75292a47f7ce51944102 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Thu, 11 Mar 2021 14:59:12 +0100 Subject: [PATCH 3/3] merge change 10406 --- CHANGES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index ca91add5..415c7e46 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,12 @@ A partir de cette version, les version de php inférieures à 7.2 ne sont plus s - Modifications : - Gestion des modules dans l'interface d'administration. +## version 10.4.06 +- Mise à jour : + - Annulation de la mise à jour SiteMapGenerator 4.3.1 et réinstallation de la version initiale. +- Modification : + - Méthode Curl pour la lecture de données par Url. + ## version 10.4.05 - Mise à jour : - SiteMapGenerator 4.3.1