From: vincent@cubedesigners.com Date: Wed, 29 Apr 2015 15:43:24 +0000 (+0000) Subject: Add base URL (sogecap fluidbook) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=17deeafb8aa4a39bd53aa6df2427dc2458c42a59;p=cubeextranet.git Add base URL (sogecap fluidbook) --- diff --git a/fluidbook/compile/index.html b/fluidbook/compile/index.html index 2e1fc9536..29b2d6ffd 100644 --- a/fluidbook/compile/index.html +++ b/fluidbook/compile/index.html @@ -9,6 +9,7 @@ + $base $favicon $robots $facebook diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index ecf9aa9ad..3f7337d21 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -387,12 +387,12 @@ class wsBookParametres extends wsParametres { $this->forms['theme'] = array('label' => __('Options du thème'), 'fieldsnames' => array('themeEnableAfterSearch')); - $this->fields['htmlExtension'] = array('type' => 'text', 'default' => 'html', 'editable' => true, 'label' => __('Extension des fichiers html'), 'grade' => 5, 'hint' => __('Ex : php, htm, html, phtml, asp'), 'grade' => 5); $this->fields['htmlPrepend'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Code à insérer en tête des fichiers'), 'grade' => 5); + $this->fields['baseUrl'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Base de l\'url'), 'grade' => 5, 'grade' => 5); $this->forms['package'] = array('label' => __('Option d\'export'), - 'fieldsnames' => array('htmlExtension', 'htmlPrepend')); + 'fieldsnames' => array('htmlExtension', 'htmlPrepend', 'baseUrl')); $this->fields['disableDemo'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Désactiver le lien de démo'), 'grade' => 5); $this->fields['redirectDemo'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Rediriger le lien de démo vers'), 'grade' => 5); diff --git a/inc/ws/Util/packager/class.ws.packager.html.php b/inc/ws/Util/packager/class.ws.packager.html.php index 6ed7d5748..7907153e4 100644 --- a/inc/ws/Util/packager/class.ws.packager.html.php +++ b/inc/ws/Util/packager/class.ws.packager.html.php @@ -173,7 +173,14 @@ class wsPackagerHTML extends wsPackager { $alt .= $footer; + $base = ''; + if ($this->book->parametres->baseUrl) { + $base = ''; + } + + $data = str_replace('$alt', $alt, $this->origHTML); + $data = str_replace('$base', $base, $data); $data = str_replace('$pathToIndex', $pathToIndex, $data); $data = str_replace('$title', $this->escape($title), $data); $data = str_replace('$pathToGetflash', $pathToGetflash, $data);