vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Google +1 button for every post rather than Page (https://vborg.vbsupport.ru/showthread.php?t=308721)

iref2010 02-21-2014 03:59 PM

Google +1 button for every post rather than Page
 
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 :

PHP Code:

<!-- 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]&amp;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 
document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(pos);
  })();
</
script

after :

PHP Code:

<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
PHP Code:

showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount

you can get source of thread page to see it !


All times are GMT. The time now is 02:44 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01013 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete