From 07a1d971497d090f5d625fe7e5fcc954d6ec63d4 Mon Sep 17 00:00:00 2001 From: SylvainLelievre Date: Tue, 14 Dec 2021 07:09:57 +0100 Subject: [PATCH] Ajout des images banniere perso a l'archive --- core/module/theme/theme.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index cdbe221b..fc613bdc 100644 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -806,6 +806,23 @@ class theme extends common { self::FILE_DIR.'source/'.$this->getData(['theme','header','image']) ); } + // Extraction des images de la bannière personnalisée + $images=[]; + $ii=0; + if( $this->getData(['theme','header','feature'])=== 'feature') { + $tab = str_word_count($this->getData(['theme','header','featureContent']), 1, './' ); + foreach( $tab as $key=>$value ){ + if( $value ==='src'){ + $images[$ii] = $tab [$key + 1]; + $ii++; + } + } + // ajout des images dans le zip + foreach( $images as $key=>$value){ + $value = str_replace( './site', 'site' , $value); + $zip->addFile( $value, $value ); + } + } break; } $ret = $zip->close();