diff --git a/core/core.php b/core/core.php
index 54953ac8..3b2875e0 100755
--- a/core/core.php
+++ b/core/core.php
@@ -1185,11 +1185,108 @@ class common {
}
}
+ /**
+ * Formate le contenu de la page selon les gabarits
+ * @param Page par defaut
+ */
+ public function showSection() {
+ echo '';
+ // Récupérer la config de la page courante
+ $blocks = explode('-',$this->getData(['page',$this->getUrl(0),'block']));
+ // Initialiser
+ $blockleft=$blockright="";
+ switch (sizeof($blocks)) {
+ case 1 : // une colonne
+ $content = 'col'. $blocks[0] ;
+ break;
+ case 2 : // 2 blocs
+ if ($blocks[0] < $blocks[1]) { // détermine la position de la colonne
+ $blockleft = 'col'. $blocks[0];
+ $content = 'col'. $blocks[1] ;
+ } else {
+ $content = 'col' . $blocks[0];
+ $blockright = 'col' . $blocks[1];
+ }
+ break;
+ case 3 : // 3 blocs
+ $blockleft = 'col' . $blocks[0];
+ $content = 'col' . $blocks[1];
+ $blockright = 'col' . $blocks[2];
+ }
+ // Page pleine pour la configuration des modules et l'édition des pages sauf l'affichage d'un article de blog
+ $pattern = ['config','edit','add','comment','data'];
+ if ((sizeof($blocks) === 1 ||
+ 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');
+ }
+ } else {
+ echo '';
+ /**
+ * Barre gauche
+ */
+ if ($blockleft !== "") {
+ echo '
' ;
+ // Détermine si le menu est présent
+ if ($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'displayMenu']) === 'none') {
+ // Pas de menu
+ echo $this->output['contentLeft'];
+ } else {
+ // $mark contient 0 le menu est positionné à la fin du contenu
+ $contentLeft = str_replace ('[]','[MENU]',$this->output['contentLeft']);
+ $contentLeft = str_replace ('[menu]','[MENU]',$contentLeft);
+ $mark = strrpos($contentLeft,'[MENU]') !== false ? strrpos($contentLeft,'[MENU]') : strlen($contentLeft);
+ echo substr($contentLeft,0,$mark);
+ echo '';
+ echo substr($contentLeft,$mark+6,strlen($contentLeft));
+ }
+ echo " ";
+ }
+ /**
+ * Contenu de page
+ */
+ echo '
';
+ $this->showContent();
+ if (file_exists(self::DATA_DIR . 'body.inc.html')) {
+ include(self::DATA_DIR . 'body.inc.html');
+ }
+ echo '
';
+ /**
+ * Barre droite
+ */
+ if ($blockright !== "") {
+ echo '
';
+ // Détermine si le menu est présent
+ if ($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'displayMenu']) === 'none') {
+ // Pas de menu
+ echo $this->output['contentRight'];
+ } else {
+ // $mark contient 0 le menu est positionné à la fin du contenu
+ $contentRight = str_replace ('[]','[MENU]',$this->output['contentRight']);
+ $contentRight = str_replace ('[menu]','[MENU]',$contentRight);
+ $mark = strrpos($contentRight,'[MENU]') !== false ? strrpos($contentRight,'[MENU]') : strlen($contentRight);
+ echo substr($contentRight,0,$mark);
+ echo '';
+ echo substr($contentRight,$mark+6,strlen($contentRight));
+ }
+ echo ' ';
+ }
+ echo '
';
+ }
+ echo ' ';
+ }
+
/**
* Affiche le contenu
* @param Page par défaut
*/
- public function showContent() {
+ private function showContent() {
if(
$this->output['title']
AND (
@@ -1222,55 +1319,85 @@ class common {
}
}
-
-
/**
- * Affiche le contenu de la barre gauche
- *
+ * Affiche le pied de page
*/
- public function showBarContentLeft() {
- // Détermine si le menu est présent
- if ($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'displayMenu']) === 'none') {
- // Pas de menu
- echo $this->output['contentLeft'];
- } else {
- // $mark contient 0 le menu est positionné à la fin du contenu
- $contentLeft = str_replace ('[]','[MENU]',$this->output['contentLeft']);
- $contentLeft = str_replace ('[menu]','[MENU]',$contentLeft);
- $mark = strrpos($contentLeft,'[MENU]') !== false ? strrpos($contentLeft,'[MENU]') : strlen($contentLeft);
- echo substr($contentLeft,0,$mark);
- echo '
';
- echo substr($contentLeft,$mark+6,strlen($contentLeft));
+ public function showFooter () {
+ // Déterminer la position
+ $positionFixed = '';
+ if (
+ $this->getData(['theme', 'footer', 'position']) === 'site'
+ // Affiche toujours le pied de page pour l'édition du thème
+ OR (
+ $this->getData(['theme', 'footer', 'position']) === 'hide'
+ AND $this->getUrl(0) === 'theme'
+ )
+ ) {
+ $position = 'site';
+ } else {
+ $position = 'body';
+ if ( $this->getData(['theme', 'footer', 'fixed']) === true) {
+ $positionFixed = 'footerbodyFixed';
+ }
+ // Sortir de la division précédente
+ echo '';
}
- }
+
+ echo $this->getData(['theme', 'footer', 'position']) === 'hide' ? '' : '';
+ echo ($position === 'site') ? '