Advertisement:

Navigation

File Edits

./Themes/default/Display.template.php

Find: [Select]
// Are there any custom profile fields for above the signature?
Add Before: [Select]


// Add Facebook Like, Tweet, and Google +1
if (!empty($modSettings['socialization_onoff'])) {
if ($message['id'] == $context['topic_first_message']) {
echo '
<br />
<div style="margin-left:auto;margin-right:auto;text-align:center;padding-left:12px">';

// Show Facebook Like icon in the first post
if (!empty($modSettings['facebook_like'])) {
echo '
<iframe src="http://www.facebook.com/plugins/like.php?href=', $scripturl, '?topic=', $context['current_topic'], '&amp;send=false&amp;layout=button_count&amp;width=100&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:20px;" allowTransparency="true"></iframe>';
}

// Show Twitter Tweet icon in the first post
if (!empty($modSettings['twitter_tweet'])) {
echo '
<a href="https://twitter.com/share" class="twitter-share-button" data-url="', $scripturl, '?topic=', $context['current_topic'], '" data-counturl="', $scripturl, '?topic=', $context['current_topic'], '"></a><script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>';
}

// Show Google +1 icon in the first post
if (!empty($modSettings['googleplus_plusone'])) {
echo '
<div class="g-plusone" data-size="medium"></div><script type="text/javascript">(function() {var po = document.createElement("script"); po.type = "text/javascript"; po.async = true;po.src = "https://apis.google.com/js/plusone.js";var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s);})();</script>';
}

echo '
</div>
<br />';
}
}


./Sources/ManageSettings.php

Find: [Select]

// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!
Add After: [Select]

array('check', 'socialization_onoff'),
array('check', 'facebook_like'),
array('check', 'twitter_tweet'),
array('check', 'googleplus_plusone'),

./Themes/default/languages/Modifications.english.php

Find (at the end of the file): [Select]
?>
Add Before: [Select]

$txt['socialization_onoff'] = 'Enable socialization button (Facebook, Twitter, and Google+)';
$txt['facebook_like'] = 'Show Facebook Like icon in the first post';
$txt['twitter_tweet'] = 'Show Twitter Tweet icon in the first post';
$txt['googleplus_plusone'] = 'Show Google +1 icon in the first post';

./Themes/default/languages/Modifications.english-utf8.php

Find (at the end of the file): [Select]
?>
Add Before: [Select]

$txt['socialization_onoff'] = 'Enable socialization button (Facebook, Twitter, and Google+)';
$txt['facebook_like'] = 'Show Facebook Like icon in the first post.';
$txt['twitter_tweet'] = 'Show Twitter Tweet icon in the first post.';
$txt['googleplus_plusone'] = 'Show Google +1 icon in the first post.';
This operation isn't vital to the installation of this mod.