forked from ZwiiCMS-Team/ZwiiCMS
param creation de la config par défaut
This commit is contained in:
parent
9db9708a9f
commit
c81b84b024
@ -254,6 +254,7 @@ class gallery extends common {
|
||||
$content = str_replace('#legendHeight#',$this->getData(['module', $this->getUrl(0), 'theme', 'legendHeight']),$content );
|
||||
$content = str_replace('#legendTextColor#',$this->getData(['module', $this->getUrl(0), 'theme', 'legendTextColor']),$content );
|
||||
$content = str_replace('#legendBgColor#',$this->getData(['module', $this->getUrl(0), 'theme', 'legendBgColor']),$content );
|
||||
|
||||
// Ecriture de la feuille de style
|
||||
file_put_contents(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css' , $content . $themeCss);
|
||||
// Nom de la feuille de style
|
||||
@ -261,9 +262,12 @@ class gallery extends common {
|
||||
}
|
||||
|
||||
// Check la présence de la config
|
||||
if ( $this->getData(['module', $this->getUrl(0), 'config']) === null ) {
|
||||
require_once('module/gallery/ressource/defaultdata.php');
|
||||
$this->setData(['module', $this->getUrl(0), 'config', theme::$defaultData]);
|
||||
require_once('module/gallery/ressource/defaultdata.php');
|
||||
if ( is_null($this->getData(['module', $this->getUrl(0), 'config', 'showUniqueGallery']))
|
||||
|| is_null($this->getData(['module', $this->getUrl(0), 'config', 'backPosition']))
|
||||
|| is_null($this->getData(['module', $this->getUrl(0), 'config', 'backAlign']))
|
||||
) {
|
||||
$this->setData(['module', $this->getUrl(0), 'config', theme::$defaultConfig]);
|
||||
}
|
||||
|
||||
// Contenu vide de la galerie
|
||||
|
@ -16,12 +16,10 @@ class theme extends gallery {
|
||||
'legendTextColor' => 'rgba(255, 255, 255, 1)',
|
||||
'legendBgColor' => 'rgba(0, 0, 0, .6)'
|
||||
];
|
||||
public static $defaultConfig = [
|
||||
public static $defaultData = [
|
||||
"showUniqueGallery" => false,
|
||||
"backPosition" => "top",
|
||||
"backAlign" => "center"
|
||||
];
|
||||
public static $defaultData = [
|
||||
'versionData' => '3.0'
|
||||
"backAlign" => "center",
|
||||
'versionData' => '3.0'
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user