vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Show Thread Enhancements - +1 Google Button In Topic (https://vborg.vbsupport.ru/showthread.php?t=264605)

Last_Zero 06-01-2011 10:00 PM

+1 Google Button In Topic
 
1 Attachment(s)
+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

PHP Code:

<if condition="$show['messageicon'] OR $post['title']"

Add Below It

PHP Code:

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

Screenshot

https://vborg.vbsupport.ru/attachmen...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

Quote:

Originally Posted by sulasno (Post 2202688)
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

Quote:

Originally Posted by coderphp (Post 2202694)
screenshoot?

Added

Randomm 06-02-2011 05:33 PM

is this server intense?

nitra1000 06-02-2011 09:11 PM

Quote:

Originally Posted by sulasno (Post 2202688)
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:
Code:

<!-- 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)
Code:

<!-- 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

Quote:

Originally Posted by JakeAppliance (Post 2203894)
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

Quote:

Originally Posted by SBlueman (Post 2204025)
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>


All times are GMT. The time now is 05:47 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.01434 seconds
  • Memory Usage 1,768KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)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