Back to vBulletin 4.x Template Modifications

Twitter And Facebook Integrated Buttons in Threads
Mod Version: 1.01, by Boko577

vB Version: 4.0.x Rating: (2 votes - 5.00 average) Installs: 36
Released: 08 Jun 2010 Last Update: Never Downloads: 0
Not Supported Template Edits Translations  

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: Tweet-This (vBulletin Style)
Facebook Code Founder: Add New Facebook "Like" button to your threads

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:


http://nextgendaily.com/

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

Download

No files for download.

Similar Mods

Show Thread Enhancements Submit threads, blogs, articles to facebook, twitter, myspace and others - addtoany vBulletin 4.x Template Modifications
Show Thread Enhancements Submission buttons ( Facebook, Twitter, Digg, Addthisto, Ect ) vBulletin 3.8 Template Modifications
Mini Mods Twitter And Facebook Integrated Buttons in Threads Modification Graveyard

vblts.ru supports vBulletin®, 2022-2024