Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Google+1 / Facebook / Linkedin / Twitter Share Buttons Details »»
Google+1 / Facebook / Linkedin / Twitter Share Buttons
Version: 1.00, by Winter Sonata Winter Sonata is offline
Developer Last Online: Apr 2020 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.x.x Rating:
Released: 06-03-2011 Last Update: Never Installs: 110
Template Edits
Re-useable Code Translations  
No support by the author.

Hello VBers!
This is my first modification here, I hope you will find it useful and helpful

About
Most of us now are aware of the importance of integrating social networks plugins into our websites and the great impact on increasing the site visibility and traffic, social networks made it too easy to share and recommend content which you consider useful for your friends.

What we will do now is integrating, Google+1, Facebook, Linked and Twitter share Buttons at your Showthread page

Live Demo : Language Teaching & Learning Resources Check it under the signature
There is also a photo attached below.

Installation
We will edit the template : postbit_legacy or postbit ( whatever you use
let's assume that I will edit the postbit_legacy.

open postbit_legacy, look for this code :
Code:
           {vb:raw template_hook.postbit_signature_start}
                                {vb:raw ad_location.ad_showthread_firstpost_sig}
                <vb:if condition="$post['signature']">
                        <blockquote class="signature restore"><div class="signaturecontainer">{vb:raw post.signature}</div></blockquote>
                </vb:if>
                                        {vb:raw template_hook.postbit_signature_end}
            </div>
            </vb:if>

add after ( DON'T FORGET TO EDIT THE TWITTER ACCOUNT IN RED):
Code:
<vb:if condition="$post[postcount] == 1">
<div style="float: right; padding: 10px 0 8px 10px;">
    <table border="0" height="62px">

  <tr>
    <td valign="bottom"><g:plusone size="tall"></g:plusone></td>
    <td valign="bottom"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="YOUR TWITTER USERNAME" data-related="aaronwall">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></td>
    <td valign="bottom"> <script type="text/javascript" src="http://platform.linkedin.com/in.js"></script><script type="in/share" data-counter="top"></script></td>
    <td valign="bottom"><a name="fb_share" type="box_count" expr:share_url="data:post.url" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></td>

  </tr>
</table>
 </div>
</vb:if>
For Google +1 , you should add this code to the footer to work :
Code:
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>

Known Problems : Linkedin button give error if the thread titles has some characters like @, !!!!!! , etc, hope that once can help sort this out.

Disclaimer I have got this idea from this post Thanks naveeid

Feel free to Click ' Mark As Installed ' if you used.

Screenshots

File Type: jpg vb.org.JPG (88.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
3 благодарности(ей) от:
justino, Toorak Times

Comments
  #2  
Old 06-05-2011, 01:22 AM
Samhan Samhan is offline
 
Join Date: Jan 2002
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you,
How to hide it in private forums!?
Reply With Quote
  #3  
Old 06-05-2011, 01:43 AM
Dr.osamA's Avatar
Dr.osamA Dr.osamA is offline
 
Join Date: Aug 2004
Location: Syrie
Posts: 979
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed

thank you bro
Reply With Quote
  #4  
Old 06-05-2011, 01:53 PM
MADMA MADMA is offline
 
Join Date: May 2011
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi i am having problems with the google+1 bit. were in the footer do i put that script
Reply With Quote
  #5  
Old 06-05-2011, 03:28 PM
Winter Sonata Winter Sonata is offline
 
Join Date: Apr 2010
Posts: 232
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MADMA View Post
hi i am having problems with the google+1 bit. were in the footer do i put that script
You should insert this code at the end of footer for ex : It may work in another places too.

Code:
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
Reply With Quote
  #6  
Old 06-05-2011, 03:33 PM
Winter Sonata Winter Sonata is offline
 
Join Date: Apr 2010
Posts: 232
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Samhan View Post
Thank you,
How to hide it in private forums!?
Put the code between :

Code:
<vb:if condition="$forum[forumid] != FORUM ID">YOUR CODE HERE</vb:if>
Don't forget to write the forum ID, and your most done
Reply With Quote
  #7  
Old 06-05-2011, 03:56 PM
tarzan22 tarzan22 is offline
 
Join Date: Apr 2008
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very good, but it could take just google +1?

thanks and regards
Reply With Quote
  #8  
Old 06-05-2011, 04:30 PM
Winter Sonata Winter Sonata is offline
 
Join Date: Apr 2010
Posts: 232
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tarzan22 View Post
Very good, but it could take just google +1?

thanks and regards
Yes, you can delete other buttons if you would , let me know if you need any further help, I would be happy to assist
Reply With Quote
  #9  
Old 06-05-2011, 04:49 PM
CrossWind CrossWind is offline
 
Join Date: Aug 2010
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you nice work
Reply With Quote
  #10  
Old 06-05-2011, 04:58 PM
tarzan22 tarzan22 is offline
 
Join Date: Apr 2008
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

perfect.

Thank you very much greetings

ejem

http://www.foroxd.com/gramola-dedica...de-foroxd.html
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 12:43 AM.


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.15981 seconds
  • Memory Usage 2,325KB
  • Queries Executed 26 (?)
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
  • (5)bbcode_code
  • (3)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
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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