body et head en php
This commit is contained in:
parent
ebe99bf9da
commit
892db37aab
|
@ -14,7 +14,9 @@
|
|||
- Blog 6.8 et News 4.7 : les dates s'adaptent automatiquement à la traduction rédigée,
|
||||
- Blog 6.8 et News 4.7 : amélioration de la navigation entre les articles,
|
||||
- Theme / Footer : amélioration, 'Qui est en ligne ?' s'affiche dans la langue de rédaction du site avec les labels réglables dans Configuration / Localisation.
|
||||
- Scripts : les fichiers body.inc.html et head.inc.html sont renommés body.inc.php et head.inc.php
|
||||
- Correction :
|
||||
- Langues : la langue originale de rédaction du site choisie à l'installation peut être modifiée
|
||||
- Slider 4.8 / Configuration : les liens sur les images étaient modifiés au changement de l'ordre des pages.
|
||||
|
||||
## Version 4.4.10 de Deltacms
|
||||
|
|
|
@ -1255,8 +1255,8 @@ class common {
|
|||
in_array($this->getUrl(1),$pattern) )
|
||||
) { // Pleine page en mode configuration
|
||||
$this->showContent();
|
||||
if (file_exists(self::DATA_DIR . 'body.inc.html')) {
|
||||
include( self::DATA_DIR . 'body.inc.html');
|
||||
if (file_exists(self::DATA_DIR . 'body.inc.php')) {
|
||||
include( self::DATA_DIR . 'body.inc.php');
|
||||
}
|
||||
if($this->getData(['config', 'statislite', 'enable'])){
|
||||
if(is_dir("./module/statislite")) include "./module/statislite/include/stat.php";
|
||||
|
@ -1290,8 +1290,8 @@ class common {
|
|||
*/
|
||||
echo '<div class="'. $content . '" id="contentSite">';
|
||||
$this->showContent();
|
||||
if (file_exists(self::DATA_DIR . 'body.inc.html')) {
|
||||
include(self::DATA_DIR . 'body.inc.html');
|
||||
if (file_exists(self::DATA_DIR . 'body.inc.php')) {
|
||||
include(self::DATA_DIR . 'body.inc.php');
|
||||
}
|
||||
if($this->getData(['config', 'statislite', 'enable'])){
|
||||
if(is_dir("./module/statislite")) include "./module/statislite/include/stat.php";
|
||||
|
|
|
@ -164,6 +164,8 @@ if ($this->getData(['core', 'dataVersion']) < 4501) {
|
|||
$this->setData(['locale', 'editorLabel', $groupWhoIs[2] ]);
|
||||
$this->setData(['locale', 'moderatorLabel', $groupWhoIs[3] ]);
|
||||
$this->setData(['locale', 'administratorLabel', $groupWhoIs[4] ]);
|
||||
if( is_file('./site/data/body.inc.html')) rename('./site/data/body.inc.html', './site/data/body.inc.php' );
|
||||
if( is_file('./site/data/head.inc.html')) rename('./site/data/head.inc.html', './site/data/head.inc.php' );
|
||||
$this->setData(['core', 'dataVersion', 4501]);
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -32,7 +32,7 @@ else { echo '<html lang="'.$lang.'">'; }
|
|||
AND $this->getData(['module', $this->getUrl(0), 'config', 'feeds']) === TRUE ): ?>
|
||||
<link rel="alternate" type="application/rss+xml" href="'<?php echo helper::baseUrl(). $this->getUrl(0) . '/rss';?>" title="fLUX rss">
|
||||
<?php endif;
|
||||
if (file_exists(self::DATA_DIR .'head.inc.html')) include(self::DATA_DIR .'head.inc.html'); ?>
|
||||
if (file_exists(self::DATA_DIR .'head.inc.php')) include(self::DATA_DIR .'head.inc.php'); ?>
|
||||
</head>
|
||||
<body>
|
||||
<?php //Barre d'administration
|
||||
|
|
|
@ -621,10 +621,10 @@ class config extends common {
|
|||
if($this->isPost()) {
|
||||
// Ecrire les fichiers de script
|
||||
if ($this->geturl(2) === 'head') {
|
||||
file_put_contents(self::DATA_DIR . 'head.inc.html',$this->getInput('configScriptHead',null));
|
||||
file_put_contents(self::DATA_DIR . 'head.inc.php',$this->getInput('configScriptHead',null));
|
||||
}
|
||||
if ($this->geturl(2) === 'body') {
|
||||
file_put_contents(self::DATA_DIR . 'body.inc.html',$this->getInput('configScriptBody',null));
|
||||
file_put_contents(self::DATA_DIR . 'body.inc.php',$this->getInput('configScriptBody',null));
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
|
|
|
@ -23,7 +23,7 @@ echo template::formOpen('configScript'); ?>
|
|||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::textarea('configScriptHead', [
|
||||
'value' => file_exists( self::DATA_DIR . 'head.inc.html') ? file_get_contents (self::DATA_DIR . 'head.inc.html') : '' ,
|
||||
'value' => file_exists( self::DATA_DIR . 'head.inc.php') ? file_get_contents (self::DATA_DIR . 'head.inc.php') : '' ,
|
||||
'class' => 'editor'
|
||||
]); ?>
|
||||
</div>
|
||||
|
@ -33,7 +33,7 @@ echo template::formOpen('configScript'); ?>
|
|||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::textarea('configScriptBody', [
|
||||
'value' => file_exists( self::DATA_DIR . 'body.inc.html') ? file_get_contents (self::DATA_DIR . 'body.inc.html') : '' ,
|
||||
'value' => file_exists( self::DATA_DIR . 'body.inc.php') ? file_get_contents (self::DATA_DIR . 'body.inc.php') : '' ,
|
||||
'class' => 'editor'
|
||||
]); ?>
|
||||
</div>
|
||||
|
|
|
@ -124,6 +124,16 @@ class translate extends common {
|
|||
|
||||
// Soumission du formulaire
|
||||
if($this->isPost()) {
|
||||
// Si la langue originale du site est modifiée
|
||||
if( $this->getData(['config', 'i18n', 'langBase']) !== $this->getInput('translateLangBase') ){
|
||||
// Sauvegarde du dossier 'base' dans un dossier code ISO de l'ancienne langue originale du site
|
||||
$this->copyDir('./site/data/base', './site/data/'. $this->getData(['config', 'i18n', 'langBase']));
|
||||
// La nouvelle langue originale du site était une langue en traduction rédigée
|
||||
if( is_dir('./site/data/'.$this->getInput('translateLangBase'))){
|
||||
$this->removeDir('./site/data/base');
|
||||
rename('./site/data/'. $this->getInput('translateLangBase') , './site/data/base');
|
||||
}
|
||||
}
|
||||
// Edition des langues
|
||||
foreach (self::$i18nList as $keyi18n => $value) {
|
||||
if ($keyi18n === 'base') continue;
|
||||
|
|
Loading…
Reference in New Issue