Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications

Reply
 
Thread Tools
+1 Google Button In Topic Details »»
+1 Google Button In Topic
Version: 1.00, by Last_Zero Last_Zero is offline
Developer Last Online: May 2014 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.7 Rating:
Released: 06-01-2011 Last Update: Never Installs: 27
Template Edits
Is in Beta Stage  
No support by the author.

+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



You Are Done

Screenshots

File Type: jpg +1.Google.Topics.Jpg (11.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
yamahapaul

Comments
  #12  
Old 06-05-2011, 07:47 AM
jw00dy's Avatar
jw00dy jw00dy is offline
 
Join Date: Dec 2004
Location: Utah
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
5 благодарности(ей) от:
blackberry, danyxxx, Eplexx, imedic, kamrandahir
  #13  
Old 06-05-2011, 04:30 PM
JakeAppliance JakeAppliance is offline
 
Join Date: Jul 2005
Location: McMullen Valley, Arizona
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #14  
Old 06-05-2011, 10:41 PM
SBlueman SBlueman is offline
 
Join Date: Jan 2006
Posts: 717
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just use a if conditional to only show it in the first post of a thread.
Reply With Quote
  #15  
Old 06-05-2011, 11:27 PM
c0ld.co c0ld.co is offline
 
Join Date: May 2011
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
Reply With Quote
  #16  
Old 06-06-2011, 01:35 AM
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Location: Google Kansas
Posts: 4,678
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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..
Reply With Quote
  #17  
Old 06-06-2011, 05:27 PM
jw00dy's Avatar
jw00dy jw00dy is offline
 
Join Date: Dec 2004
Location: Utah
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JakeAppliance View Post
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.
Reply With Quote
  #18  
Old 07-01-2011, 06:42 AM
imedic's Avatar
imedic imedic is offline
 
Join Date: Mar 2008
Location: Romania
Posts: 178
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ....
Reply With Quote
  #19  
Old 07-27-2011, 07:42 AM
Jay106n Jay106n is offline
 
Join Date: Jan 2011
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks good 3.8.0
Reply With Quote
  #20  
Old 07-27-2011, 03:45 PM
Wreck713 Wreck713 is offline
 
Join Date: Feb 2009
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SBlueman View Post
I just use a if conditional to only show it in the first post of a thread.
can you explain further? paste code etc. ?
Reply With Quote
  #21  
Old 08-07-2011, 06:13 PM
Wreck713 Wreck713 is offline
 
Join Date: Feb 2009
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

paste code?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:56 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.15115 seconds
  • Memory Usage 2,343KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (6)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete