diff --git a/core/core.php b/core/core.php index b8f740ad..54b5e750 100644 --- a/core/core.php +++ b/core/core.php @@ -1387,9 +1387,15 @@ class core extends common { 'content' => ob_get_clean() . ($output['showPageContent'] ? $pageContent : '')]); } else if ($modpos === 'free') { - $begin = strstr($pageContent, '[]', true); - $end = strstr($pageContent, '[]'); - $cut=2; + if ( strstr($pageContent, '[MODULE]', true) === false) { + $begin = strstr($pageContent, '[]', true); } else { + $begin = strstr($pageContent, '[MODULE]', true); + } + if ( strstr($pageContent, '[MODULE]') === false ) { + $end = strstr($pageContent, '[]');} else { + $end = strstr($pageContent, '[MODULE]'); + } + $cut=8; $end=substr($end,-strlen($end)+$cut); $this->addOutput([ 'content' => ($output['showPageContent'] ? $begin : '') . ob_get_clean() . ($output['showPageContent'] ? $end : '')]); } @@ -1933,13 +1939,14 @@ class layout extends common { echo $this->core->output['contentLeft']; } else { // $mark contient 0 le menu est positionné à la fin du contenu - $contentLeft = $this->core->output['contentLeft']; - $mark = strrpos($contentLeft,'[]') !== false ? strrpos($contentLeft,'[]') : strlen($contentLeft); + $contentLeft = str_replace ('[]','[MENU]',$this->core->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+2,strlen($contentLeft)); + echo substr($contentLeft,$mark+6,strlen($contentLeft)); } } @@ -1953,13 +1960,14 @@ class layout extends common { echo $this->core->output['contentRight']; } else { // $mark contient 0 le menu est positionné à la fin du contenu - $contentRight = $this->core->output['contentRight']; - $mark = strrpos($contentRight,'[]') !== false ? strrpos($contentRight,'[]') : strlen($contentRight); + $contentRight = str_replace ('[]','[MENU]',$this->core->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+2,strlen($contentRight)); + echo substr($contentRight,$mark+6,strlen($contentRight)); } } diff --git a/core/module/page/page.php b/core/module/page/page.php index daa0b00e..dec03618 100755 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -247,7 +247,7 @@ class page extends common { 'typeMenu' => $this->getinput('pageTypeMenu'), 'iconUrl' => $this->getinput('pageIconUrl'), 'disable'=> $this->getinput('pageEditDisable', helper::FILTER_BOOLEAN), - 'content' => (empty($this->getInput('pageEditContent', null)) ? '' : $this->getInput('pageEditContent', null)) , + 'content' => (empty($this->getInput('pageEditContent', null)) ? '
' : $this->getInput('pageEditContent', null)), 'hideTitle' => $hideTitle, 'breadCrumb' => $this->getInput('pageEditbreadCrumb', helper::FILTER_BOOLEAN), 'metaDescription' => $this->getInput('pageEditMetaDescription', helper::FILTER_STRING_LONG), diff --git a/core/module/page/view/edit/edit.php b/core/module/page/view/edit/edit.php index be3fe490..8f999932 100755 --- a/core/module/page/view/edit/edit.php +++ b/core/module/page/view/edit/edit.php @@ -72,7 +72,7 @@ echo template::formOpen('pageEditForm'); ?>