From 121efb59a6282cf8eac70fa832feb649498627d2 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 20 Nov 2017 16:32:18 +0000 Subject: [PATCH] wip #1799 @2 --- .../html5/socialarticles/class.ws.html5.compiler.php | 3 ++- .../Util/html5/socialarticles/class.ws.html5.links.php | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/inc/ws/Util/html5/socialarticles/class.ws.html5.compiler.php b/inc/ws/Util/html5/socialarticles/class.ws.html5.compiler.php index 7465e3ad7..5363ab4c4 100644 --- a/inc/ws/Util/html5/socialarticles/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/socialarticles/class.ws.html5.compiler.php @@ -852,7 +852,7 @@ class wsHTML5Compiler { } public function addSEOArticle($page, $title, $intro, $image) { - $this->seoArticles[] = ['title' => $title, 'description' => $intro, 'image' => $image, 'content' => '', 'page' => $page, 'url' => CubeIT_Text::str2URL($title) . '.html']; + $this->seoArticles[$title] = ['title' => $title, 'description' => $intro, 'image' => $image, 'content' => '', 'page' => $page, 'url' => CubeIT_Text::str2URL($title) . '.html']; } public function _sortLinks($a, $b) { @@ -1036,6 +1036,7 @@ class wsHTML5Compiler { } } $this->config->rasterizePages = cubeArray::parseRange($this->config->rasterizePages); + $this->config->seoArticles = $this->seoArticles; return 'var DATAS=' . json_encode($this->config) . ';' . "\n"; } diff --git a/inc/ws/Util/html5/socialarticles/class.ws.html5.links.php b/inc/ws/Util/html5/socialarticles/class.ws.html5.links.php index 86f1633a6..a82a41555 100644 --- a/inc/ws/Util/html5/socialarticles/class.ws.html5.links.php +++ b/inc/ws/Util/html5/socialarticles/class.ws.html5.links.php @@ -750,12 +750,18 @@ class actionLink extends internalLink { } public function getAdditionnalContent() { + $res = parent::getAdditionnalContent(); + if ($this->extra) { + $res .= ' data-extra="' . $this->extra . '"'; + } + if (in_array($this->to, $this->_share)) { - return parent::getAdditionnalContent() . ' data-service="' . $this->to . '" '; + $res .= ' data-service="' . $this->to . '" '; } else { - return /*parent::getClasses()*/ + $res .= /*parent::getClasses()*/ ' data-action="' . $this->to . '" '; } + return $res; } public function getDefaultTooltip() { -- 2.39.5