View Full Version : Google +1 button for every post rather than Page
iref2010
02-21-2014, 03:59 PM
Is there a way that you could add a Google +1 button for every post rather than the whole page?
Members may like a particular post within the page/thread rather than the whole page itself.
Any plugin out there?
omardealo
02-27-2014, 06:51 PM
in template : postbit & postbit_legacy
add this :
<!-- Place this tag where you want the +1 button to render. -->
<div class="g-plusone" data-size="tall" data-annotation="inline" data-width="300" data-href="showpost.php?$session[sessionurl]p=$post[postid]&postcount=$post[postcount]"></div>
<!-- Place this tag after the last +1 button tag. -->
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/platform.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
after :
<if condition="$post['title']"><strong>$post[title]</strong></if>
iref2010
02-28-2014, 12:06 AM
Thanks for your help.
The button plus 1s the page that it is on, I don't think it works that way on a per post basis. I think if you were to +1 a post, it would cause all buttons on the whole thread, one in each post, to all increase. Correct?
Is there a way around this?
omardealo
02-28-2014, 07:15 AM
you don't think but you don't try and see it working or not !
yes every all buttons on same thread page , but not every buttons liks the other becouse every button have Different postid
showpost.php?$session[sessionurl]p=$post[postid]&postcount=$post[postcount]
you can get source of thread page to see it !
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.