Hi,
I wonder how I could put social linking on top of the K2 item view right next to the comments, author and other links? I would like to have them on top and bottom of the article.
Something like here:
<?php if($this->item->params->get('itemSocialButton') && !is_null($this->item->params->get('socialButtonCode', NULL))): ?>
<li>
<?php echo $this->item->params->get('socialButtonCode'); ?>
</li>
<?php endif; ?>
<?php if($this->item->params->get('itemTwitterButton',1) || $this->item->params->get('itemFacebookButton',1) || $this->item->params->get('itemGooglePlusOneButton',1)): ?>
<div class="itemSocialSharing">
<?php if($this->item->params->get('itemTwitterButton',1)): ?>
<div class="itemTwitterButton">
<a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal"<?php if($this->item->params->get('twitterUsername')): ?> data-via="<?php echo $this->item->params->get('twitterUsername'); ?>"<?php endif; ?>><?php echo JText::_('K2_TWEET'); ?></a>
<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemFacebookButton',1)): ?>
<div class="itemFacebookButton">
<div id="fb-root"></div>
<script type="text/javascript">
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#appId=177111755694317&xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-like" data-send="false" data-width="260" data-show-faces="true"></div>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemGooglePlusOneButton',1)): ?>
<div class="itemGooglePlusOneButton">
<g:plusone annotation="inline" width="120"></g:plusone>
<script type="text/javascript">
(function() {
window.___gcfg = {lang: 'en'}; // Define button default language here
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>
</div>
<?php endif; ?>
</div>
<?php endif; ?>