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

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

Category: Show Thread Enhancements - Version: 4.0.0 Beta 3 Rating:
Released: 11-21-2009 Last Update: Never Installs: 148
Template Edits
Re-useable Code  
No support by the author.

This is an update to vB4.0 Beta 3 of my Submit to Twitter and FB mod https://vborg.vbsupport.ru/showthread.php?t=217117

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. At the moment it cannot be turned off for specific forums, I still have to work out the conditional changes for vb4 so it will appear in all forums for now.

In the SHOWTHREAD template find:
Code:
<li class="popupmenu nohovermenu" id="threadtools">
Add this ABOVE:
Code:
			<!-- Begin Share FB -->
			<li class="popupmenu nohovermenu" id="sharefb">
				<h6><a class="popupctrl" href="javascript://">Share</a></h6>
				<ul class="popupbody popuphover">
					<!-- Facebook Share -->
          <li>
          <a name="fb_share" type="icon_link" href="http://www.facebook.com/sharer.php">Facebook</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
          </li>
          <!-- / Facebook Share -->
					<li>
          <!-- Twitter Share -->
          <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>
          <!-- / Twitter Share -->
          </li>
				</ul>
			</li>
      <!-- End Share FB -->

Screenshots

File Type: jpg fb_mod.jpg (18.4 KB, 0 views)

Show Your Support

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

Comments
  #22  
Old 12-30-2009, 03:03 AM
BlackJacket's Avatar
BlackJacket BlackJacket is offline
 
Join Date: Nov 2008
Location: 070108111114105100100
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the great mod. I have a small request (I think it was mentioned before also)

Could this be posted at the bottom of the posts instead? Where the Edit, Reply, Reply with Quote, etc are?

Thanks again!
Reply With Quote
  #23  
Old 12-30-2009, 03:33 AM
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 NittoMOD View Post
Thanks for the great mod. I have a small request (I think it was mentioned before also)

Could this be posted at the bottom of the posts instead? Where the Edit, Reply, Reply with Quote, etc are?

Thanks again!
The code can be used anywhere in the thread I would guess and still work okay, for what you are talking about you would want to edit the postbit (or postbit_legacy) and place the code near those buttons.

Here is the core code you would want to use:
HTML Code:
<!-- Begin Facebook Share -->
<a name="fb_share" type="icon_link" href="http://www.facebook.com/sharer.php">Facebook</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
<!-- End Facebook Share -->

<!-- Begin Twitter Share -->
<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!" /'+'>Tweet This!<'+'/a>');
</script>
<!-- End Twitter Share -->
Reply With Quote
  #24  
Old 12-30-2009, 03:34 AM
barcena's Avatar
barcena barcena is offline
 
Join Date: Sep 2006
Posts: 262
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry to ask but is this working for 4.0 gold? Im still confused w/ all the changes and I really need my Facebook and Twitter bookmarks back.

Reply With Quote
  #25  
Old 12-30-2009, 03:36 AM
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 barcena View Post
Sorry to ask but is this working for 4.0 gold? Im still confused w/ all the changes and I really need my Facebook and Twitter bookmarks back.

Yes, this specific one is the updated version for 4.0 and I am using it on Gold.
Reply With Quote
  #26  
Old 12-30-2009, 10:42 AM
Big-Pete Big-Pete is offline
 
Join Date: May 2009
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works ok for me on VB4 PL1 and VBSEO 3.5 RC1
Reply With Quote
  #27  
Old 12-30-2009, 08:05 PM
bleros's Avatar
bleros bleros is offline
 
Join Date: Oct 2008
Location: Macedonia
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ericgtr View Post
Thnx bro nice job keep it up
Reply With Quote
  #28  
Old 01-04-2010, 04:07 PM
habanero68 habanero68 is offline
 
Join Date: Jan 2008
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi. as I could fix it are next to each other. since they are one above the other.
thanks
Reply With Quote
  #29  
Old 01-04-2010, 06:59 PM
captainron19's Avatar
captainron19 captainron19 is offline
 
Join Date: Mar 2006
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hate to seem dumb but what exactly does this mod do? If someone clicks on the facebook link are you telling me it creates a link to that specific thread on their facbook wall?
Reply With Quote
  #30  
Old 01-04-2010, 07:20 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 habanero68 View Post
hi. as I could fix it are next to each other. since they are one above the other.
thanks
It is designed to work like all of the other dropdown items in the menu but you can play with the layout if you like.
Quote:
Originally Posted by captainron19 View Post
I hate to seem dumb but what exactly does this mod do? If someone clicks on the facebook link are you telling me it creates a link to that specific thread on their facbook wall?
Exactly, it will create a new facebook or Twitter entry containing the contents of the post.
Reply With Quote
  #31  
Old 01-05-2010, 03:04 AM
habanero68 habanero68 is offline
 
Join Date: Jan 2008
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello. and try to fix the position and I can not put it online. I want it next to each other. I can do.? or to do.
thanks


Code:
         <!-- Begin Share FB -->

            <li class="popupmenu nohovermenu" id="sharefb">
 <h6><a class="popupctrl" href="javascript://"><FONT COLOR="#FF0303"><B>COMPARTIR</B></FONT></a></h6>
                <ul class="popupbody popuphover">

                    <!-- Facebook Share -->
          <li>
<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php">FACEBOOK</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
          </li>
          <!-- / Facebook Share -->

                    <li>
          <!-- Twitter Share -->
          <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="http://i50.tinypic.com/f9imv_th.jpg"  border="0" alt="Tweet This!" /'+'><'+'/a>');
          </script>
          <!-- / Twitter Share -->
          </li>
                </ul>
            </li>
      <!-- End Share FB -->


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 01:54 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.04683 seconds
  • Memory Usage 2,344KB
  • 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
  • (3)bbcode_code
  • (1)bbcode_html
  • (5)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
  • (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