From 3560c0aa3d495edba30081fed582aa3905e76007 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 3 May 2019 22:03:07 +0200 Subject: [PATCH 1/2] Emplacement menu dans une barre [] --- core/core.php | 32 ++++++++++++++++++++++++++--- core/layout/main.php | 28 ++----------------------- core/module/page/view/edit/edit.php | 3 ++- 3 files changed, 33 insertions(+), 30 deletions(-) diff --git a/core/core.php b/core/core.php index 07767582..e54fdb34 100644 --- a/core/core.php +++ b/core/core.php @@ -1817,10 +1817,23 @@ class layout extends common { /** * Affiche le contenu de la barre gauche - * @param page chargée + * */ public function showBarContentLeft() { - echo $this->core->output['contentLeft']; + // 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->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); + echo substr($contentLeft,0,$mark); + echo ''; + echo substr($contentRight,$mark+2,strlen($contentRight)); + } } /** diff --git a/core/layout/main.php b/core/layout/main.php index 8c2f0627..fc1d5fc4 100755 --- a/core/layout/main.php +++ b/core/layout/main.php @@ -169,19 +169,7 @@
- showBarContentLeft(); - // Type de menu affiché - // 0 : aucun - // 1 : menu complet - // 2 : sous-menu de la page parente - if ($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'displayMenu']) !== 'none') { - ?> + showBarContentLeft(); ?>
- showBarContentRight(); - // Type de menu affiché - // 0 : aucun - // 1 : menu complet - // 2 : sous-menu de la page parente - if ($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'displayMenu']) !== 'none') { - ?> + showBarContentRight(); ?>
diff --git a/core/module/page/view/edit/edit.php b/core/module/page/view/edit/edit.php index 762f2b05..ca3be12f 100755 --- a/core/module/page/view/edit/edit.php +++ b/core/module/page/view/edit/edit.php @@ -122,7 +122,8 @@ $this->pages2Json();
'Configuration du menu vertical', - 'selected' => $this->getData(['page', $this->getUrl(2), 'displayMenu']) + 'selected' => $this->getData(['page', $this->getUrl(2), 'displayMenu']), + 'help' => 'Par défaut le menu est affiché APRES le contenu de la page. Pour le placer à un emplacement précis, y insérez [] (deux crochets).' ]); ?>
From 0c6d8b952935be4e9eb9ba2d88db065d6edcbc4c Mon Sep 17 00:00:00 2001 From: Fred <23246457+fredtempez@users.noreply.github.com> Date: Fri, 3 May 2019 22:42:30 +0200 Subject: [PATCH 2/2] Update index.php --- index.php | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/index.php b/index.php index 883ea33a..17332495 100755 --- a/index.php +++ b/index.php @@ -24,26 +24,6 @@ date_default_timezone_set('Europe/Paris'); setlocale (LC_TIME, 'fra_fra', 'french'); -/*Configuration Proxy */ -$proxy = 'cache-etu.univ-artois.fr:3128'; -if (!empty($proxy)) { - $proxy = str_replace('http://', 'tcp://', $proxy); - $context = array( - 'http' => array( - 'proxy' => $proxy, - 'request_fulluri' => true, - 'verify_peer' => false, - 'verify_peer_name' => false, - ), - "ssl"=>array( - "verify_peer"=>false, - "verify_peer_name"=>false - ) - ); - stream_context_set_default($context); -} else { - echo "Proxy not found" . PHP_EOL; -} /** * Initialisation de Zwii