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
[vB4.0.X] Submit to Twitter, Facebook and Digg Details »»
[vB4.0.X] Submit to Twitter, Facebook and Digg
Version: 1.00, by demonfatal demonfatal is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.0.x Rating:
Released: 09-14-2010 Last Update: Never Installs: 74
Template Edits
Re-useable Code Translations  
No support by the author.

This mod is an update for vB4.0.X from the modification Submit to Twitter, Facebook and Digg made by ericgtr...

This modification add a "button" in the thread (top menu) and allow the users to share it using Twitter, Facebook and Digg...See the screenshot for example






And here we go:
------------------------------------------------------------------------------------------------------------------

Open the SHOWTHREAD template and find:
Code:
<vb:if condition="$show['firstunreadlink']">
Add above:
Code:
<li class="popupmenu nohovermenu">
<h6><a class="popupctrl" href="javascript://"><blink><font style="background:#FC3" color="#000000">Share</font></blink></a></h6>
<ul class="popupbody popuphover"  style="background:#FFF">
<li><label>
<img class="inlineimg" src="images/facebook_share_icon.gif" alt="Share on Facebook" />
<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script>
<a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank" class="fb_share_link">Share on Facebook</a>
</label></li>
<li><label>
<img class="inlineimg" src="images/twitter_icon.gif" alt="Submit to Twitter" />
<script type="text/javascript">
    var twtTitle  = document.title;
    var twtUrl    = location.href;
    var maxLength = 140 - (twtUrl.length + 1);
    if (twtTitle.length > maxLength) {
    twtTitle = twtTitle.substr(0, (maxLength - 3))+'...';
    }
    var twtLink = 'http://twitter.com/home?status='+encodeURIComponent(twtTitle + ' ' + twtUrl);
    document.write('<a href="'+twtLink+'" target="_blank"'+'>Tweet This!<'+'/a>');</script>
</label></li>
<li><label>
<img class="inlineimg" src="images/digg_icon.gif" alt="Submit to Digg" /> 
<script src="http://widgets.digg.com/buttons.js" type="text/javascript"></script> <a class="DiggThisButton DiggCompact"></a>
</label></li>
</ul>
</li>

Add the files in attachment in the folder "images" of your style...

------------------------------------------------------------------------------------------------------------------

If you installed this hack please Click "Mark as Installed"



Enjoy!

Download Now

File Type: zip images.zip (986 Bytes, 370 views)

Screenshots

File Type: png Share.png (4.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 01-29-2011, 03:35 PM
jeleven jeleven is offline
 
Join Date: Jun 2010
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just installed on 4.0.2 not work ;(
Reply With Quote
  #23  
Old 02-24-2011, 12:39 AM
demonfatal demonfatal is offline
 
Join Date: Mar 2009
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you tell me what error you get??
Or what is not working?
More details please...If you want help...
Reply With Quote
  #24  
Old 02-24-2011, 01:40 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Couldnt you have just moved the social bookmark stuff north and added these to the template?
Reply With Quote
  #25  
Old 06-30-2011, 06:15 PM
oldfan's Avatar
oldfan oldfan is offline
 
Join Date: Jul 2004
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works great thanks!!
Reply With Quote
  #26  
Old 06-30-2011, 10:42 PM
merk_aus merk_aus is offline
 
Join Date: Feb 2008
Location: Australia
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works great but have removed the
Code:
<font color="#000000">
stuff as that is making the link black.

For those wishing to just have this looking like the rest of your links at the time find:
Code:
<blink><font color="#000000">Share</font></blink>
and Replace with:
Code:
<blink>Share</blink>
It will make the Share Link look the same as all of your other links.

EDIT: If anyone knows how to have bit.ly built into this so the url's are shorter it would be greatly appreciated if you could share.
Reply With Quote
  #27  
Old 07-31-2011, 11:57 AM
pentolkorek pentolkorek is offline
 
Join Date: Mar 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed and work..

Btw, how to include our twitter username and integrated url shortener when klik Tweet This?

example:

Thread Subject http://t.co/BlaBla via @username
Reply With Quote
  #28  
Old 01-16-2013, 02:47 AM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great trick. This is exactly what I was looking for. Thanks man. works fine on vb.4.2
Cheers
Reply With Quote
  #29  
Old 01-26-2013, 09:26 PM
Wirral.Talk Wirral.Talk is offline
 
Join Date: Jan 2013
Location: Wirral, UK
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can i make the menu show correctly because at the moment there is gaps (please see screenshot) Also how do i remove digg so its just Twitter and Facebook. Thank you.
Attached Images
File Type: jpg share.jpg (8.7 KB, 0 views)
Reply With Quote
  #30  
Old 02-22-2013, 01:57 PM
vimarc vimarc is offline
 
Join Date: Feb 2013
Location: SnappyFizz.com
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As shown in picture - tweet this and facebook text next to image but actually after install text droping below image. how i can make it look like as suggested in image
Reply With Quote
  #31  
Old 03-03-2013, 09:00 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Wirral.Talk View Post
How can i make the menu show correctly because at the moment there is gaps (please see screenshot) Also how do i remove digg so its just Twitter and Facebook. Thank you.
I believe you can just remove the image and leave it as text like this (removed digg):

Code:
<li class="popupmenu nohovermenu">
<h6><a class="popupctrl" href="javascript://"><blink><font style="background:#FC3" color="#000000">Share</font></blink></a></h6>
<ul class="popupbody popuphover"  style="background:#FFF">
<li><label>
<img class="inlineimg" src="images/facebook_share_icon.gif" alt="Share on Facebook" />
<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script>
<a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank" class="fb_share_link">Share on Facebook</a>
</label></li>
<li><label>
<img class="inlineimg" src="images/twitter_icon.gif" alt="Submit to Twitter" />
<script type="text/javascript">
    var twtTitle  = document.title;
    var twtUrl    = location.href;
    var maxLength = 140 - (twtUrl.length + 1);
    if (twtTitle.length > maxLength) {
    twtTitle = twtTitle.substr(0, (maxLength - 3))+'...';
    }
    var twtLink = 'http://twitter.com/home?status='+encodeURIComponent(twtTitle + ' ' + twtUrl);
    document.write('<a href="'+twtLink+'" target="_blank"'+'>Tweet This!<'+'/a>');</script>
</label></li>

</ul>
</li>
maybe you want to remove all pictures - see below:

Code:
<li class="popupmenu nohovermenu">
<h6><a class="popupctrl" href="javascript://"><blink><font style="background:#FC3" color="#000000">Share</font></blink></a></h6>
<ul class="popupbody popuphover"  style="background:#FFF">
<li><label>
<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script>
<a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank" class="fb_share_link">Share on Facebook</a>
</label></li>
<li><label>
<script type="text/javascript">
    var twtTitle  = document.title;
    var twtUrl    = location.href;
    var maxLength = 140 - (twtUrl.length + 1);
    if (twtTitle.length > maxLength) {
    twtTitle = twtTitle.substr(0, (maxLength - 3))+'...';
    }
    var twtLink = 'http://twitter.com/home?status='+encodeURIComponent(twtTitle + ' ' + twtUrl);
    document.write('<a href="'+twtLink+'" target="_blank"'+'>Tweet This!<'+'/a>');</script>
</label></li>
<li><label>
<script src="http://widgets.digg.com/buttons.js" type="text/javascript"></script> <a class="DiggThisButton DiggCompact"></a>
</label></li>
</ul>
</li>
leave feedback and use whatever code you like.

Cheers
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 08:22 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.05492 seconds
  • Memory Usage 2,346KB
  • 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
  • (7)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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