2
0
forked from Wavyzz/dolibarr

FIX Sharing buttons

This commit is contained in:
Laurent Destailleur
2020-06-10 00:01:41 +02:00
parent a216c9b0d6
commit 9bbdaffe9d

View File

@@ -732,10 +732,12 @@ function getSocialNetworkSharingLinks()
{
global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running inluded containers.
$fullurl = $website->alias.'/'.$websitepage->pageurl.'.php';
$out = '<!-- section for social network sharing of page -->'."\n";
if ($website->virtualhost) {
$fullurl = $website->virtualhost.'/'.$websitepage->pageurl.'.php';
$hashtags = trim(join(' #', array_map('trim', explode(',', $websitepage->keywords))));
$out = '<!-- section for social network sharing of page -->'."\n";
$out .= '<div class="dol-social-share">'."\n";
// Twitter
@@ -771,6 +773,10 @@ function getSocialNetworkSharingLinks()
$out .= '</div>'."\n";
$out .= "\n</div>\n";
}
else {
$out .= '<!-- virtual host not defined in CMS. No way to add sharing buttons -->'."\n";
}
$out .= '<!-- section end for social network sharing of page -->'."\n";
return $out;