From a3fdb3bc1e44bb52c3a6f90bca676416db80d2e7 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Wed, 15 Feb 2023 19:52:33 +0100 Subject: [PATCH] Edition de page ok --- core/core.php | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/core/core.php b/core/core.php index a2ba5f5d..6b722ec8 100644 --- a/core/core.php +++ b/core/core.php @@ -1077,16 +1077,12 @@ class common case 'image/jpeg': case 'image/jpg': return (imagejpeg($virtual_image, $dest)); - break; case 'image/png': return (imagepng($virtual_image, $dest)); - break; case 'image/gif': return (imagegif($virtual_image, $dest)); - break; case 'webp': $source_image = imagecreatefromwebp($src); - break; } } else { return (false); @@ -2319,7 +2315,7 @@ class common { // Import des styles liés à la page if ($this->output['inlineStyle']) { - foreach($this->output['inlineStyle'] as $style) { + foreach ($this->output['inlineStyle'] as $style) { echo ''; } } @@ -2988,22 +2984,15 @@ class core extends common ' › ' . $this->getData(['page', $this->getUrl(0), 'title']); } - // Importe la page simple sans module ou avec un module inexistant - - // Importe le CSS de la page principale - $pageContent = $this->getPage($this->getUrl(0), self::$i18nContent); - $inlineStyle[] = $this->getData(['page', $this->getUrl(0), 'css']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'css']); - // $css = strpos($css, '' : $css; + // Importe le CSS des barres $contentRight = $this->getData(['page', $this->getUrl(0), 'barRight']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barRight']), self::$i18nContent) : ''; $inlineStyle[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css']); - //$cssRight = strpos($cssRight, '' : $cssRight; - $contentLeft = $this->getData(['page', $this->getUrl(0), 'barLeft']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barLeft']), self::$i18nContent) : ''; $inlineStyle[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css']); - //$cssLeft = strpos($cssRight, '' : $cssLeft; + // Importe la page simple sans module ou avec un module inexistant if ( $this->getData(['page', $this->getUrl(0)]) !== null and ($this->getData(['page', $this->getUrl(0), 'moduleId']) === '' @@ -3012,6 +3001,10 @@ class core extends common and $access ) { + // Importe le CSS de la page principale + $pageContent = $this->getPage($this->getUrl(0), self::$i18nContent); + $inlineStyle[] = $this->getData(['page', $this->getUrl(0), 'css']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'css']); + $this->addOutput([ 'title' => $title, 'content' => $pageContent, @@ -3038,6 +3031,10 @@ class core extends common ? strip_tags(substr($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'content']), 0, 159)) : $this->getData(['page', $this->getUrl(0), 'metaDescription']); + // Importe le CSS de la page principale + $pageContent = $this->getPage($this->getUrl(0), self::$i18nContent); + $inlineStyle[] = $this->getData(['page', $this->getUrl(0), 'css']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'css']); + $this->addOutput([ 'title' => $title, // Meta description = 160 premiers caractères de l'article