From: vincent@cubedesigners.com Date: Tue, 18 Aug 2020 16:46:16 +0000 (+0000) Subject: wip #3839 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=daddd17fbc0b1f24484d0df82691175117b1d103;p=cubeextranet.git wip #3839 @1.5 --- diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 2f5365851..f691ba418 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -349,8 +349,12 @@ class wsBookParametres extends wsParametres $this->fields['statsCustom'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Code Stats personnalisé (placé avant fermeture du body)')); $this->fields['xiti'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Code XiTi global')); $this->fields['xiti_page'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Modèle code xiti (pour tags relatifs aux pages)')); + $this->fields['tagcommander_id'] = ['type' => 'text', 'default' => '', 'editable' => true, 'label' => 'Tag commander ID', 'grade' => 3]; + $this->fields['tagcommander_prod'] = ['type' => 'boolean', 'default' => true, 'editable' => true, 'label' => 'Production', 'grade' => 3]; + $this->fields['tagcommander_plan'] = ['type' => 'freefile', 'default' => '', 'editable' => true, 'label' => 'Plan de taggage "Tag commander"', 'grade' => 3]; + $this->fields['tagcommander_default_vars'] = ['type' => 'textarea', 'default' => '', 'editable' => true, 'label' => 'Variables par défaut', 'grade' => 3]; $this->forms['stats'] = array('label' => __('Statistiques'), - 'fieldsnames' => array('stats', 'stats_score', 'stats_exclude_ip', '|', 'relay_url_params', '|', 'googleAnalytics', '|', 'googleAnalyticsCustom', 'statsCustom', '|', 'xiti', 'xiti_page')); + 'fieldsnames' => array('stats', 'stats_score', 'stats_exclude_ip', '|', 'relay_url_params', '|', 'googleAnalytics', '|', 'googleAnalyticsCustom', 'statsCustom', '|', 'xiti', 'xiti_page', '|', 'tagcommander_id','tagcommander_prod', 'tagcommander_plan', 'tagcommander_default_vars')); $this->fields['displayChaptersPopup'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Always display chapters in a popup'), 'grade' => 1); $this->fields['displayChaptersIcon'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __("Affiche l'icône du sommaire"), 'grade' => 1); diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index 8652544a0..82a2bdb58 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -576,7 +576,7 @@ class wsHTML5Compiler if ($this->book->parametres->scorm_enable) { $this->book->parametres->seoVersion = false; } - + $this->writeStats(); $this->writeSecure(); $this->log('Copied assets'); $this->loadPlugins(); @@ -617,6 +617,19 @@ class wsHTML5Compiler $this->log('Files Synced'); } + protected function writeStats() + { + if ($this->book->parametres->tagcommander_id) { + $id = $this->book->parametres->tagcommander_id; + if (!$this->book->parametres->tagcommander_prod) { + $id .= '/uat'; + } + $this->book->parametres->googleAnalyticsCustom .= ''; + $this->book->parametres->statsCustom .= ''; + $this->book->parametres->statsCustom .= ''; + } + } + protected function writeSecure() { if ($this->book->parametres->secureClientSidePassword !== '') { diff --git a/inc/ws/Util/html5/master/class.ws.html5.seo.php b/inc/ws/Util/html5/master/class.ws.html5.seo.php index a7bc5586d..5e4812db4 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.seo.php +++ b/inc/ws/Util/html5/master/class.ws.html5.seo.php @@ -224,8 +224,6 @@ class wsHTML5SeoPage public function getSEOContent() { - - $res = ''; if (null !== $this->h1) { $res .= '

' . htmlentities($this->h1) . '

';