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
  #42  
Old 07-05-2011, 06:02 PM
dormopoco dormopoco is offline
 
Join Date: May 2007
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes not work please update twitter button
Reply With Quote
  #43  
Old 07-06-2011, 11:21 PM
DevOne5555 DevOne5555 is offline
 
Join Date: Feb 2011
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just FYI, the problems with the Tweet count are a known issue on Twitter's end. AFAIK only vBulletin 4.x users are affected. Until Twitter comes out with a fix the best thing to do is disable the Tweet button.
Reply With Quote
  #44  
Old 07-11-2011, 08:19 AM
Taggy Taggy is offline
 
Join Date: Jun 2011
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To speed up the Google plus one button you can change.

Code:
<script src=?http://apis.google.com/js/plusone.js? type=?text/javascript?></script>
To

Code:
<script src=?https://apis.google.com/js/plusone.js? type=?text/javascript?></script>
When the plus one button is pressed Google redirects the javascript from a http URL to a https URL and can add up to 5 seconds on a users load time. So by changing the above code Google will no longer have to make this redirect.
Reply With Quote
  #45  
Old 08-04-2011, 03:51 PM
andresm000 andresm000 is offline
 
Join Date: Jul 2011
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is great! So i got it to work and I have 2 questions:
Is there any way to make the bubbles only display when hovering over the social media button?

Also, any way to make these buttons available on all CMS articles and comments? Please see screenshot.
http://brighthotelier.com/images/misc2/socialmedia.png
Reply With Quote
  #46  
Old 08-06-2011, 08:42 AM
birdie birdie is offline
 
Join Date: Aug 2007
Location: Australia
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just posted a job in the request for paid work for someone who can install this mod in vB3.6:
https://vborg.vbsupport.ru/showthread.php?t=268067
Reply With Quote
  #47  
Old 08-08-2011, 11:04 PM
MADMA MADMA is offline
 
Join Date: May 2011
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by birdie View Post
I just posted a job in the request for paid work for someone who can install this mod in vB3.6:
https://vborg.vbsupport.ru/showthread.php?t=268067
i can do this for you, it is easy to do
Reply With Quote
  #48  
Old 09-07-2011, 01:24 PM
Cystomatic Cystomatic is offline
 
Join Date: Sep 2011
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there also a way to add this to the index page of my forum? So that it would show up in the header?

Thank you.
Reply With Quote
  #49  
Old 11-16-2011, 10:29 AM
geggi69 geggi69 is offline
 
Join Date: Nov 2011
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, I have an issue with the twitter button: the address pointing to thread is wrong

indeed it appears to be

http://www.termometropolitico.itshow...1234-my-thread

while it should be

http://www.termometropolitico.it/for...1234-my-thread

any hints?

Thanks so much
Reply With Quote
  #50  
Old 12-05-2011, 03:01 PM
RyanIsra.net RyanIsra.net is offline
 
Join Date: May 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool!
Just edited and works like a charm.

However, I prefer to put these buttons on the left, it's more eye-catching to users, IMO.

So, I changed the float to the left (in case anyone would do the same)

<div style="float: right; padding: 10px 0 8px 10px;">

to be:

<div style="float: left; padding: 10px 0 8px 10px;">

"Mark as Installed" : Done
Reply With Quote
  #51  
Old 12-06-2011, 05:57 AM
RyanIsra.net RyanIsra.net is offline
 
Join Date: May 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Btw, the script seem to be conflict with CONNECT button.

If I removed this script:

<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>

the facebook connect button appear but the share button gone (only text link)

Any suggestion?
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 05:12 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.09879 seconds
  • Memory Usage 2,340KB
  • 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
  • (1)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)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_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