Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

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
  #72  
Old 10-30-2015, 11:28 AM
darksidemon2 darksidemon2 is offline
 
Join Date: Apr 2011
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

perfect.
Thank you very much greetings
work in vb 4.2.3
Reply With Quote
Reply


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 07:37 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.04013 seconds
  • Memory Usage 2,236KB
  • Queries Executed 17 (?)
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
  • (3)bbcode_code
  • (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
  • (2)post_thanks_box
  • (2)post_thanks_box_bit
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_attachment
  • (2)postbit_onlinestatus
  • (2)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_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