diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index 095ffde1234..08453c6bcb8 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -652,6 +652,57 @@ function getStructuredData($type, $data = array()) return $ret; } +/** + * Return HTML content to add structured data for an article, news or Blog Post. + * + * @return string HTML content + */ +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'; + $hashtags = trim(join(' #', array_map('trim', explode(',', $websitepage->keywords)))); + + print ''."\n"; + print '
'."\n"; + + // Twitter + print '
'."\n"; + print ''; + print ''; + print '
'."\n"; + + // Reddit + print '
'."\n"; + print ''; + print 'Submit to reddit '; + print '
'."\n"; + + // Facebook + print '
'."\n"; + print '
'."\n"; + print ' + '."\n"; + print '
'."\n"; + + print "\n
\n"; + print ''."\n"; +} + /** * Return list of containers object that match a criteria. * WARNING: This function can be used by websites.