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
Twitter And Facebook Integrated Buttons in Threads Details »»
Twitter And Facebook Integrated Buttons in Threads
Version: 1.01, by Boko577 Boko577 is offline
Developer Last Online: Nov 2011 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.0.x Rating:
Released: 06-07-2010 Last Update: Never Installs: 36
Template Edits
Translations  
No support by the author.

First of all, I would like to give credit to the founders of the codes I used in this mod. I know almost nothing about coding and without them, this mod would have never existed.
Twitter Code Founder: https://vborg.vbsupport.ru/showthread.php?t=242425
Facebook Code Founder: https://vborg.vbsupport.ru/showthread.php?t=241011



What's better about my mod?
Doing two template edits is much quicker than making two advertisements. Another reason, is that both of these mods tell you to put the code as an advertisement. Although it's easier to do, it leaves an ugly blank space below the buttons that is just wasted. The way I implemented them in uses the space under the buttons.
Their mods:

My mods:

OR:




Demo this mod here!


How to Install
Add the following code at the top of the header template:
Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://tweet-it.s3.amazonaws.com/tweet-it.js"></script>

<script type="text/javascript">
	$(document).ready(function(){
		$(".tweet-this a").tweetIt({
			animate: "fade",
			header: "Tweet!"
		});
// Something else
			$("tr.openclose a").click(function(){ $(this).parents("tr").hide(); $("tr.closed").show(); });
	})
</script>
It seems to work when you put this code anywhere, but just to be safe, I would put it at the top.


If you want it here:

Find the following code in the postbit_legacy template:
Code:
{vb:raw ad_location.thread_first_post_content}
Add the following code below it:
Code:
<vb:if condition="THIS_SCRIPT == 'showthread'"><div style="float: right; padding: 0px 0px 0px 0px;"><p class="tweet-this"><p class="tweet-this"><a href="javascript://"><img src="http://nextgendaily.com/images/retweet.png" /> Tweet Topic!</a></p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.YOURSITE.com/{vb:link thread, {vb:raw thread}}&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=tahoma&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:25px"></iframe></div>
</vb:if>
Make sure to change http://www.YOURSITE.com/ to your link! If you don't use www like me, delete it. You can also change the code Tweet Topic! to whatever you would like the Twitter button to say.


If you want it here:

Find the following code in the SHOWTHREAD template:
Code:
	<div id="thread_controls" class="thread_controls">
		<div>
Add the following code below it:
Code:
<vb:if condition="THIS_SCRIPT == 'showthread'"><iframe src="http://www.facebook.com/plugins/like.php?href=http://nextgendaily.com/{vb:link thread, {vb:raw thread}}&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=tahoma&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:25px"></iframe><div style="float: left; padding: 0px 5px 0px 5px;"><p class="tweet-this"><p class="tweet-this"><a href="javascript://"><img src="http://nextgendaily.com/images/retweet.png" /> Tweet Topic!</a></p></div></vb:if>
If someone can help me with this code it would be much appreciated. I was able to put both buttons on the same line, but it still makes the gray bar longer. If someone can find a way to shorten the gray bar back, I'll put your code here instead.



Again, I take no credit for finding the code used in this mod, however, I did make some changes to it and moved the code to a different area to add more flexibility. If you have any way to increase the code or fix a flaw I might have made, please leave a comment with the code below and I'll change this code right away.

PLEASE MARK AS INSTALLED IF YOU USE THIS

Show Your Support

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

Comments
  #12  
Old 06-17-2010, 07:04 AM
The Rocketeer's Avatar
The Rocketeer The Rocketeer is offline
 
Join Date: Jun 2010
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

dosent work for me either, can u look at the issue please?
Reply With Quote
  #13  
Old 06-17-2010, 07:23 AM
Sparrow-Sean Sparrow-Sean is offline
 
Join Date: May 2010
Location: Canberra
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Animemike View Post
Hmm dont work for me the pop up box from twitter pops up for like 1 sec than goes away
Did you add this to your header.php file?

Quote:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://tweet-it.s3.amazonaws.com/tweet-it.js"></script>

<script type="text/javascript">
$(document).ready(function(){
$(".tweet-this a").tweetIt({
animate: "fade",
header: "Share this link!"
});
// Something else
$("tr.openclose a").click(function(){ $(this).parents("tr").hide(); $("tr.closed").show(); });
})
</script>
Reply With Quote
  #14  
Old 06-24-2010, 08:36 AM
Yangster's Avatar
Yangster Yangster is offline
 
Join Date: Mar 2007
Location: Doncaster UK
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This doesn't work for me in 4.0.4 throws out some really weird issues within long threads where users have quoted the original poster.
Reply With Quote
  #15  
Old 06-24-2010, 05:24 PM
Filgga's Avatar
Filgga Filgga is offline
 
Join Date: Jul 2007
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Yangster View Post
This doesn't work for me in 4.0.4 throws out some really weird issues within long threads where users have quoted the original poster.
Works for me

The issue am facing is; it's in all pages (if you navigate to page 2, 3, etc) of each thread.

I think it was supposed to be on the 1st post of the thread only, anyone with a code pls?
Reply With Quote
  #16  
Old 10-12-2010, 06:51 AM
waleedelsafoury waleedelsafoury is offline
 
Join Date: Aug 2010
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I used this code you but in thread

PHP Code:
<vb:if condition="THIS_SCRIPT == 'showthread'"><iframe src="http://www.facebook.com/plugins/like.php?href=http://nextgendaily.com/{vb:link thread, {vb:raw thread}}&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=tahoma&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:25px"></iframe><div style="float: left; padding: 0px 5px 0px 5px;"><class="tweet-this"><class="tweet-this"><a href="javascript://"><img src="http://nextgendaily.com/images/retweet.png" /> Tweet Topic!</a></p></div></vb:if> 
It worked for facebook but not for twitter
Reply With Quote
  #17  
Old 11-12-2010, 03:28 AM
Cicada Cicada is offline
 
Join Date: Mar 2002
Location: Palm Springs, CA - USA
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bookmarked.
Reply With Quote
  #18  
Old 11-28-2010, 02:56 AM
hnjco hnjco is offline
 
Join Date: Jul 2006
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have installed with but its only showing for the first post.

Also your demo site shows the "share" mod which one is that?

Reply With Quote
  #19  
Old 12-10-2010, 02:55 AM
SoloX SoloX is offline
 
Join Date: Jun 2002
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ i would like to know that as well. Which mod are you using to "share"?
Reply With Quote
  #20  
Old 12-14-2010, 11:14 PM
Kingpin55 Kingpin55 is offline
 
Join Date: Jul 2010
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed this and the Tweet button shows up fine and it does post to Twitter but the links do not work. He is an example of a link it posts to Twitter

http://www.victorylaneforum.comshowt...hp/?3603-Rumor


The URL for my forum is http://www.victorylaneforum.com

shouldn't there be some sort of forward slash or something between .comshowthread??

Thanks for any help
Reply With Quote
  #21  
Old 04-11-2014, 12:53 PM
thom thom is offline
 
Join Date: Dec 2001
Location: Sweden
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

damn i have try to install this but it no't works for me
i have done exactly who u write hmmmmmmm
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 04:55 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04848 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_php
  • (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
  • (1)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
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete