PDA

View Full Version : Show Thread Enhancements - +1 Google Button In Topic


Last_Zero
06-01-2011, 10:00 PM
+1 Google Button In Topic

http://www.google.com/webmasters/+1/button/index.html

This Is The +1 Google Code That All Webmaster Waits

Install

Open Template (( Postbit_Legacy ))

Search For

<if condition="$show['messageicon'] OR $post['title']">Add Below It

<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
<g:plusone></g:plusone>

Screenshot

https://vborg.vbsupport.ru/attachment.php?attachmentid=129676&stc=1&d=1307026585

You Are Done

sulasno
06-02-2011, 01:28 PM
thanks;

will it work for vB 4.x.x

Last_Zero
06-02-2011, 01:38 PM
thanks;

will it work for vB 4.x.x

Sure But With Different Template Edit

coderphp
06-02-2011, 01:47 PM
screenshoot?

Last_Zero
06-02-2011, 01:56 PM
screenshoot?

Added

Randomm
06-02-2011, 05:33 PM
is this server intense?

nitra1000
06-02-2011, 09:11 PM
thanks;

will it work for vB 4.x.x



4.x version is here: https://vborg.vbsupport.ru/showthread.php?t=264625

Doug Nelson
06-02-2011, 11:36 PM
Doesn't seem to work for 3.8.4 (I know it doesn't claim to, just posting the information).

farhanisfarhan
06-03-2011, 07:35 AM
What would be the location for 4.x.x ? btw Thanks ;)

BirdOPrey5
06-04-2011, 10:00 AM
Your instructions are to put this in the postbit but then every one on the same page will +1 the same URL, all posts on the page have the same actual URL.

You should either manually add the URL for each unique post to the code or move the template edit to showthread, navbar, header, or footer so it only displays once per page.

You're also loading the javascript for every single post with a title or icon when it only needs to load once per page.

jw00dy
06-05-2011, 07:47 AM
Here is what I did.

Edit SHOWTHREAD

Find this section:

<!-- controls above postbits -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom">
<if condition="$show['largereplybutton']">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
<else />
<td class="smallfont">&nbsp;</td>
</if>
<if condition="$show['pagenav']"><td align="$stylevar[right]">$pagenav</td></if>
</tr>
</table>
<!-- / controls above postbits -->

Change it to this (The RED text is the addition)
<!-- controls above postbits -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom">
<if condition="$show['largereplybutton']">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a> <script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
<g:plusone></g:plusone></td>
<else />
<td class="smallfont">&nbsp;</td>
</if>
<if condition="$show['pagenav']"><td align="$stylevar[right]">$pagenav</td></if>
</tr>
</table>
<!-- / controls above postbits -->

That puts the +1 just to the right of Post Reply at the top.

JakeAppliance
06-05-2011, 04:30 PM
Hi Jw00dy,

Looks good in Firefox and Chrome, but it shows that +1 button underneath Post Reply in IE8, can you make it show to the right in IE8?

SBlueman
06-05-2011, 10:41 PM
I just use a if conditional to only show it in the first post of a thread.

c0ld.co
06-05-2011, 11:27 PM
thanks

Brandon Sheley
06-06-2011, 01:35 AM
this worked fine for me on 4.x in an ad_location template ;)

Although the script code should go before the closing body code as google directed..

jw00dy
06-06-2011, 05:27 PM
Hi Jw00dy,

Looks good in Firefox and Chrome, but it shows that +1 button underneath Post Reply in IE8, can you make it show to the right in IE8?

Mine shows the same way in IE 8, but I'm not going to spend the time to fix it, sorry.

imedic
07-01-2011, 06:42 AM
You can put in SHOWTHREAD template the script code just before </body> tag to complete the edits in post 11 and you load this only on showthread.

I was thinking to add it next to FB like button ....

Jay106n
07-27-2011, 07:42 AM
Looks good 3.8.0

Wreck713
07-27-2011, 03:45 PM
I just use a if conditional to only show it in the first post of a thread.

can you explain further? paste code etc. ?

Wreck713
08-07-2011, 06:13 PM
paste code?

Deafmute
08-18-2011, 08:56 PM
I need help I could not do for 3.8.4

Fahad_H
08-21-2011, 12:30 AM
didn't work in 3.8.7

EddyMaxx
08-22-2011, 01:14 PM
I have it working on 3.8.7.

danyxxx
09-15-2011, 12:53 PM
It's working in 3.8.7 .

Goomzee
06-17-2013, 06:04 AM
not works
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
<g:plusone>here i paste google code </g:plusone>