From b886cc21cbbfb67f91afc9664f2edcbe19734309 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Mon, 25 May 2020 21:03:34 +0200 Subject: [PATCH] =?UTF-8?q?10.2=20strat=C3=A9gie=20cr=C3=A9ation=20screens?= =?UTF-8?q?hot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 21 --------------------- core/module/config/config.php | 4 +++- core/module/config/view/index/index.php | 4 ++-- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/core/core.php b/core/core.php index 367d0c33..2916b0f2 100755 --- a/core/core.php +++ b/core/core.php @@ -351,27 +351,6 @@ class common { } } - - /** - * Récupérer une copie d'écran du site Web pour le tag image - * En local, copie du site décran de ZwiiCMS - */ - public function makeImageTag() { - if ( strpos(helper::baseUrl(false),'localhost') == 0 AND strpos(helper::baseUrl(false),'127.0.0.1') == 0) { - $googlePagespeedData = helper::urlGetContents('https://www.googleapis.com/pagespeedonline/v2/runPagespeed?url='. helper::baseUrl(false) .'&screenshot=true'); - if ($googlePagespeedData !== false) { - $googlePagespeedData = json_decode($googlePagespeedData, true); - $screenshot = $googlePagespeedData['screenshot']['data']; - $screenshot = str_replace(array('_','-'),array('/','+'),$screenshot); - $data = 'data:image/jpeg;base64,'.$screenshot; - $data = base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $data)); - file_put_contents( self::FILE_DIR.'source/screenshot.jpg',$data); - } - } - } - - - /** * Accède aux données * @param array $keys Clé(s) des données diff --git a/core/module/config/config.php b/core/module/config/config.php index bad596b3..36f67223 100755 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -488,10 +488,12 @@ class config extends common { 'state' => true ]); } - // Initialisation du screen + // Initialisation du screen - APPEL AUTO DESACTIVE POUR EVITER UN RALENTISSEMENT + /* if (!file_exists(self::FILE_DIR.'source/screenshot.jpg')) { $this->configMetaImage(); } + */ // Valeurs en sortie $this->addOutput([ 'title' => 'Configuration', diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php index 3a390db4..4ae3f66e 100755 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -227,8 +227,6 @@ -

Référencement

@@ -248,11 +246,13 @@ ]); ?>
+
+