From: vincent@cubedesigners.com Date: Wed, 5 Sep 2018 12:57:14 +0000 (+0000) Subject: fix #2212 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=4290a2c996baca1d137d370009f3b2fd74db14bd;p=cubeextranet.git fix #2212 @1 --- diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index af85cba9d..724f42c18 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -127,6 +127,17 @@ class wsBookParametres extends wsParametres 'fieldsnames' => array('share', '|', 'email_title', 'email_body', 'email_editable', 'askAcknowledge', 'sendasfluidbook', 'email_mailto', '|', 'facebook_title', 'facebook_description', 'facebook_image', 'twitter_description', '|', 'friend', 'facebook', 'twitter', 'googleplus', 'linkedin', 'viadeo', '|', 'customSharer', '|', 'friendWidth', 'friendHeight')); +//. + $this->fields['seoVersion'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Générer une version pour les moteurs de recherche')); + $this->fields['seoRobots'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Autoriser le parcours par les moteurs de recherche')); + $this->fields['seoDescription'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Meta tag Description')); + $this->fields['seoKeywords'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Meta tag Keywords')); + $this->fields['seoAdvanced'] = ['type' => 'freefile', 'default' => '', 'editable' => true, 'label' => __('Données SEO par page'), 'grade' => 5, 'fileFilter' => $seoFilter]; + $this->fields['seoBaseURL'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('URL de base'), 'grade' => 5, 'hint' => __("Si l'authentification échoue, redirection vers cette adresse")); + + $this->forms['seo'] = array('label' => __('Optimisation pour les moteurs de recherche'), + 'fieldsnames' => array('seoVersion', 'seoRobots', 'seoDescription', "seoKeywords", '|', 'seoBaseURL', 'seoAdvanced')); + // . $this->fields['pages'] = array('type' => 'integer', 'default' => '', 'editable' => false, 'label' => __('Nombre de pages')); $this->fields['width'] = array('type' => 'float', 'default' => '', 'editable' => false, 'label' => __('Largeur')); @@ -483,16 +494,6 @@ class wsBookParametres extends wsParametres $this->forms['secure'] = array('label' => __('Sécurisation'), 'fieldsnames' => array('secureURL', 'secureURLRedirect', '|', 'preventRightClick')); - $this->fields['seoVersion'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Générer une version pour les moteurs de recherche')); - $this->fields['seoRobots'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Autoriser le parcours par les moteurs de recherche')); - $this->fields['seoDescription'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Meta tag Description')); - $this->fields['seoKeywords'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Meta tag Keywords')); - $this->fields['seoAdvanced'] = ['type' => 'freefile', 'default' => '', 'editable' => true, 'label' => __('Données SEO par page'), 'grade' => 5, 'fileFilter' => $seoFilter]; - $this->fields['seoBaseURL'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('URL de base'), 'grade' => 5, 'hint' => __("Si l'authentification échoue, redirection vers cette adresse")); - - $this->forms['seo'] = array('label' => __('Optimisation pour les moteurs de recherche'), - 'fieldsnames' => array('seoVersion', 'seoRobots', 'seoDescription', "seoKeywords", '|', 'seoBaseURL', 'seoAdvanced')); - $this->fields['home'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Accueil de l'interface multibrochure"), 'grade' => 5); $this->fields['multilang'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Langues'), 'hint' => __('Code langue') . ',' . __('Code pays') . ',' . __('URL')); $this->fields['country'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Pays de la brochure')); 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 4ecb5b1c4..e60ebce3e 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -565,20 +565,20 @@ class wsHTML5Compiler } $script .= $iscript; - $socialTitle = $this->book->parametres->facebook_title ? $this->book->parametres->facebook_title : $titre; - $socialDescription = $this->book->parametres->seoDescription ? $this->book->parametres->seoDescription : $this->book->parametres->seoDescription; + $socialTitle = html::escapeHTML($this->book->parametres->facebook_title ? $this->book->parametres->facebook_title : $titre); + $socialDescription = html::escapeHTML($this->book->parametres->facebook_description ? $this->book->parametres->facebook_description : $this->book->parametres->seoDescription); $socialImage = 'https://workshop.fluidbook.com/services/facebook_thumbnail?id=' . $this->book_id . '&j=' . TIME; $dim = CubeIT_Image::getimagesize($socialImage); $socialImageWidth = $dim[0]; $socialImageHeight = $dim[1]; - $twittercard = ' - + $twittercard = ' + '; - $opengraph = ' - + $opengraph = ' + '; 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 d9cb36c68..d46df167b 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.seo.php +++ b/inc/ws/Util/html5/master/class.ws.html5.seo.php @@ -22,6 +22,7 @@ class wsHTML5Seo $p->title = ($page == 1) ? $this->compiler->book->parametres->title : $this->_getPageLabel($page); $p->text = $this->getTextContent($infos); $p->description = $this->compiler->book->parametres->seoDescription ? $this->compiler->book->parametres->seoDescription : $this->compiler->book->parametres->title . ' - Powered by Fluidbook'; + $p->socialDescription = $this->compiler->parametres->facebook_description || $this->compiler->book->parametres->seoDescription; $p->keywords = $this->compiler->book->parametres->seoKeywords; $p->robots = $this->compiler->book->parametres->seoRobots ? 'index,follow' : 'noindex,nofollow';