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

Reply
 
Thread Tools
Submit to Twitter, Facebook and Digg Details »»
Submit to Twitter, Facebook and Digg
Version: 1.00, by ericgtr ericgtr is offline
Developer Last Online: Feb 2022 Show Printable Version Email this Page

Category: End-User Options - Version: 3.8.x Rating:
Released: 06-24-2009 Last Update: Never Installs: 139
Template Edits
Re-useable Code Translations  
No support by the author.

I have been adding these as I go and decided to share, I am sure there are other versions out there but this is how I do it. See screenshot for example of where it goes and how it looks. Keeping up with the latest in social networking keeps traffic flowing to your site.

This can all be added at once or you may add only the one's you want. Additionally, this will probably work in any version of vB.

In the SHOWTHREAD template find:
Code:
<td class="vbmenu_control" id="threadtools" nowrap="nowrap">
Paste this ABOVE:
Code:
<!-- Facebook Share -->
<if condition="in_array($forum['forumid'], array(1,2))">
<else />
<td class="vbmenu_control" id="facebook" nowrap="nowrap">
<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><style> html .fb_share_button { display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; height:15px; border:1px solid #d8dfea; background:url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif?8:26981) no-repeat top right; } html .fb_share_button:hover { color:#fff; border-color:#295582; background:#3b5998 url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif?8:26981) no-repeat top right; text-decoration:none; } </style> <a href="http://www.facebook.com/share.php?u=<url>" class="fb_share_button" onclick="return fbs_click()" target="_blank" style="text-decoration:none;">Share</a>
</td>
</if>
<!-- / Facebook Share -->
<!-- Twitter Share -->
<if condition="in_array($forum['forumid'], array(1,2))">
<else />
<td class="vbmenu_control" id="twitter" nowrap="nowrap">
<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"'+'><img src="images/tweet.png"  border="0" alt="Tweet This!" /'+'><'+'/a>');
</script>
</div>
</if>
<!-- / Twitter Share -->
<!-- Digg Share -->
<if condition="in_array($forum['forumid'], array(1,2))">
<else />
<td class="vbmenu_control" id="digg" nowrap="nowrap">
<script type="text/javascript">
digg_url = 'http://www.YOURSITE.com/showthread.php?t=$thread[threadid]';
digg_title = "$threadinfo[title]";
<!-- Change color below to match your forum -->
digg_bgcolor = '#FFFFFF';
digg_skin = 'compact';
digg_window = 'new';
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</td>
</if>
<!-- / Digg Share -->
Note the bolded statements above, these are where you must make changes:

enter the forum id's of the forums where you do not want it to show
<if condition="in_array($forum['forumid'], array(1,2))">

You will also see that in the digg section there is an option to change the background color and you will need to add your site URL.

The tweet image is attached, upload to your forum and change the path in the "Twitter Share" section.

Update: This has also been updated to vB4 Beta 3 here https://vborg.vbsupport.ru/showthread.php?t=228610

Screenshots

File Type: jpg networking.jpg (40.4 KB, 0 views)

Show Your Support

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

Comments
  #12  
Old 06-25-2009, 09:18 PM
Chimpie's Avatar
Chimpie Chimpie is offline
 
Join Date: Nov 2007
Location: Sarasota, Florida
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think if you remove the Submit to Twitter and Submit to Digg text it will look perfect.
Reply With Quote
  #13  
Old 06-25-2009, 09:23 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Chimpie View Post
I think if you remove the Submit to Twitter and Submit to Digg text it will look perfect.
From what I can tell it's embedded in the javascript which is called from their servers. Take a look at the code and you'll probably see what I mean, that text is not in there.
Reply With Quote
  #14  
Old 06-26-2009, 06:00 AM
sugresmax's Avatar
sugresmax sugresmax is offline
 
Join Date: Nov 2006
Location: Russia
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="https://vborg.vbsupport.ru/showthread.php?p=1783648#post1783648" target="_blank">https://vborg.vbsupport.ru/showt...48#post1783648</a> look this
Reply With Quote
  #15  
Old 06-26-2009, 07:47 PM
saviola8x's Avatar
saviola8x saviola8x is offline
 
Join Date: May 2006
Location: Paris
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i need facebook.
Thanks ^^
Reply With Quote
  #16  
Old 06-27-2009, 06:35 AM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd recommend tweaking the optional dropdown a bit so that the button and the description are in different columns within the dropdown. Much cleaner that way IMHO.
Reply With Quote
  #17  
Old 06-27-2009, 04:30 PM
Chimpie's Avatar
Chimpie Chimpie is offline
 
Join Date: Nov 2007
Location: Sarasota, Florida
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Wired1 View Post
I'd recommend tweaking the optional dropdown a bit so that the button and the description are in different columns within the dropdown. Much cleaner that way IMHO.
I'd say skip the description, just have the icon, and then when you hover the mouse over it then it could say "Share with ... ".
Reply With Quote
  #18  
Old 06-28-2009, 11:34 AM
LI_Pets LI_Pets is offline
 
Join Date: Jun 2009
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works great, thanks
Reply With Quote
  #19  
Old 06-28-2009, 10:24 PM
Morrus Morrus is offline
 
Join Date: Jan 2002
Posts: 494
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool mod. Is there any way to get it working with vBSEO?
Reply With Quote
  #20  
Old 06-29-2009, 01:58 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Morrus View Post
Cool mod. Is there any way to get it working with vBSEO?
I am using it with VBSEO on my site.
Reply With Quote
  #21  
Old 06-29-2009, 03:04 PM
deadlySniper deadlySniper is offline
 
Join Date: Dec 2008
Location: New York
Posts: 211
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Pretty sweet, thanks.
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 06:42 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.05684 seconds
  • Memory Usage 2,329KB
  • 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
  • (2)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
  • (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
  • (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
  • 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