From 20655858d2a71ddb672608b49badd1614bddd468 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 11 May 2022 16:34:22 +0000 Subject: [PATCH] wip #5112 @2 --- inc/commons/class.common.tools.php | 2 +- inc/ws/Metier/class.ws.book.parametres.php | 3 ++- inc/ws/Util/class.ws.util.php | 3 +++ inc/ws/Util/html5/master/class.ws.html5.compiler.php | 8 +++++--- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/inc/commons/class.common.tools.php b/inc/commons/class.common.tools.php index e31ae80f0..2855e6747 100644 --- a/inc/commons/class.common.tools.php +++ b/inc/commons/class.common.tools.php @@ -321,7 +321,7 @@ class commonTools $res .= '' . __('Adresse IP') . '' . $_SERVER['REMOTE_ADDR'] . ''; $res .= '' . __('Adobe Flash Player') . ''; $res .= '' . __('Support de la video') . ''; - $res .= 'OGV'; + $res .= 'OGV'; $res .= 'H264'; $res .= 'WEBM'; $res .= '' . __('Ecran') . '' . __('Orientation') . '' . __('Portrait') . '' . __('Paysage') . ''; diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 4d1cd2553..413a07902 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -483,12 +483,13 @@ class wsBookParametres extends wsParametres $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_scriptname'] = ['type' => 'text', 'default' => 'tc_Multisite_Head.js,tc_Multisite_Analytics.js,tc_Multisite_Medias.js', 'editable' => true, 'label' => 'Nom du script Tagcommander', '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->fields['anchorsAliases'] = ['type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Alias des ancres')]; $this->forms['stats'] = array('label' => __('Statistiques avancées'), - 'fieldsnames' => array('tagcommander_id', 'tagcommander_prod', 'tagcommander_plan', 'tagcommander_default_vars', 'anchorsAliases', '|', 'stats_score', 'stats_exclude_ip', '|', 'relay_url_params', '|', 'gtag_additional_code', '|', 'googleAnalyticsCustom', 'statsCustom', '|', 'xiti', 'xiti_page')); + 'fieldsnames' => array('tagcommander_id', 'tagcommander_scriptname', 'tagcommander_prod', 'tagcommander_plan', 'tagcommander_default_vars', 'anchorsAliases', '|', 'stats_score', 'stats_exclude_ip', '|', 'relay_url_params', '|', 'gtag_additional_code', '|', 'googleAnalyticsCustom', 'statsCustom', '|', 'xiti', 'xiti_page')); $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/class.ws.util.php b/inc/ws/Util/class.ws.util.php index 0b41286d9..e6b7cfb8b 100644 --- a/inc/ws/Util/class.ws.util.php +++ b/inc/ws/Util/class.ws.util.php @@ -184,6 +184,9 @@ class wsUtil } $r = []; foreach ($vars as $j => $varname) { + if(!trim[$varname]){ + continue; + } $r[$varname] = trim($line[$j]); } $id = trim($line[0]); 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 30b5a7eb5..21d031900 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -1031,9 +1031,11 @@ class wsHTML5Compiler $this->config->tagcommander_default_vars = array_merge($default, $this->parseVariables($this->book->parametres->tagcommander_default_vars)); $this->config->tagcommander_default_vars['env_work'] = $this->book->parametres->tagcommander_prod ? 'prod' : 'pre-prod'; - $this->book->parametres->googleAnalyticsCustom .= ''; - $this->book->parametres->statsCustom .= ''; - $this->book->parametres->statsCustom .= ''; + $scriptNames=explode(',', $this->config->tagcommander_scriptname); + $this->book->parametres->googleAnalyticsCustom .= ''; + for($i=1;$ibook->parametres->statsCustom .= ''; + } if ($this->book->parametres->tagcommander_plan) { $plan = wsUtil::excelToArrayKeyVars($this->_wdirOrAbsolute($this->book->parametres->tagcommander_plan)); -- 2.39.5