forked from Wavyzz/dolibarr
FIX Sharing buttons
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user