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

Reply
 
Thread Tools
Tweet-This (vBulletin Style) Details »»
Tweet-This (vBulletin Style)
Version: 1.00, by Sparrow-Sean Sparrow-Sean is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.0.x Rating:
Released: 05-12-2010 Last Update: Never Installs: 17
Template Edits
Code Changes  
No support by the author.

Hello,

*First of all, this modification works quite easily. Insert the code and follow the steps, when you click the link which will appear in the first thread at the top right a fader box will appear at the lower right page of your screen where you can connect to Twitter to tweet that page.

It is not 100% perfect, I think it might reflect better with an image though

This is more a modification that I have made to my board from a (Tweet-it) application:
http://pongsocket.com/tweet-it/ (I take no credit).

Step 1:

Admin Panel >> Style Manager >> Edit Templates >> Header

I added this to the top of my header file, it seems to work whatever position it is inserted:
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 The Sparrow!"
		});
// Something else
			$("tr.openclose a").click(function(){ $(this).parents("tr").hide(); $("tr.closed").show(); });
	})
</script>
Step 2:

Admin Panel >> Advertising >> Manage Ads >> Add New Add >> (DropDown) Thread >> First Box

I titled mine "tweet", call it as you wish.

Ad HTML >> I suck at code so do bare with me - Perhaps someone can code this up for me a little better than I can, I do apologise:

Code:
<div style="float: left; padding: 0px 3px 0px 0px;"><img src="http://forums.speedysparrow.com/images/ads/arrow-retweet.png" /></div><div style="float: left; padding: 0px 25px 0px 0px;"><p class="tweet-this"><p class="tweet-this"><a href="javascript://">Tweet Thread!</a></p></div>
Configure the options below as you require and save.

That is it!

EDIT:


You can add this to your POSTBIT_LEGACY:

Find:
Code:
<a class="forwardpost" href="{vb:raw post.forwardlink}" rel="nofollow"><img src="{vb:stylevar imgdir_button}/reply_40b.png" alt="{vb:rawphrase forward_message}" /> {vb:rawphrase forward}</a></vb:if>
After Add:
Code:
<div style="float: right; padding: 0px 0px 0px 0px;"><p class="tweet-this"><p class="tweet-this"><a href="javascript://"><img src="http://forums.speedysparrow.com/images/retweet.png" />Re-Tweet This Topic!</a></p></div>
This will add it to your postbit, however, it does add to every thread, if anyone can re-adjust this it would be great.
================================================== ==============
You can edit the header code to change the name of the Tweet-Box Name ie.
Please excuse my bad coding, I am not a developer and this is my first experience with this so if anyone can re-code correctly please do so.

Test This:
http://forums.speedysparrow.com/show...rrow-Promotion

Select TWEET THREAD.
================================================== ==============


EDIT 09/07/10:

Use the following code to hide from PM's:
Code:
<vb:if condition="THIS_SCRIPT == 'showthread'">Code Here</vb:if>
Insert the code within and it should fix those Private Message issues.

Thank you,

Sean

Screenshots

File Type: png 2010-05-13_2204.png (7.9 KB, 0 views)
File Type: png 2010-05-13_2206.png (36.4 KB, 0 views)

Show Your Support

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

Comments
  #12  
Old 05-21-2010, 03:29 PM
dargox dargox is offline
 
Join Date: Apr 2008
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi guys... I can´t find the ADVERTISING option to paste the code, and where is the POSTBIT_LEGACY so I can edit ?

I think those steps are easy but I don´t know about programming so please help me.
Reply With Quote
  #13  
Old 05-23-2010, 12:00 AM
Sparrow-Sean Sparrow-Sean is offline
 
Join Date: May 2010
Location: Canberra
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As a person of lack of intelligence here, there has to be someone who can mimick this code surely to integrate it better in to a forum

Dargox, what version are you running?
Reply With Quote
  #14  
Old 05-23-2010, 06:16 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
<vb:if condition="THIS_SCRIPT == 'showthread'">Code Here</vb:if> 
That will restrict it to only showing when showthread.php is the active script.
Reply With Quote
  #15  
Old 05-24-2010, 08:03 AM
Sparrow-Sean Sparrow-Sean is offline
 
Join Date: May 2010
Location: Canberra
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kall View Post
PHP Code:
<vb:if condition="THIS_SCRIPT == 'showthread'">Code Here</vb:if> 
That will restrict it to only showing when showthread.php is the active script.
Will this prevent it in Private Messages Kall?

Thanks,

Sean
Reply With Quote
  #16  
Old 05-24-2010, 02:43 PM
dargox dargox is offline
 
Join Date: Apr 2008
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sparrow-Sean View Post
As a person of lack of intelligence here, there has to be someone who can mimick this code surely to integrate it better in to a forum

Dargox, what version are you running?
I?m running the 4.0.3
Reply With Quote
  #17  
Old 05-24-2010, 05:19 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sparrow-Sean View Post
Will this prevent it in Private Messages Kall?

Thanks,

Sean
Yes.

Look at the start of the php file, under the block of copyright and stuff, there's a definition of "THIS_SCRIPT". showthread.php = showthread, private.php = private etc.

The template conditional I gave will only activate if the page that the viewer is on is showthread.php (so, not private.php).
Reply With Quote
  #18  
Old 05-26-2010, 05:54 AM
Boko577's Avatar
Boko577 Boko577 is offline
 
Join Date: Dec 2009
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mine looks like this? Any way to bump it up???


http://grab.by/grabs/c01c7f6d95cef17...9766cd8959.png
Reply With Quote
  #19  
Old 05-27-2010, 02:21 AM
Boko577's Avatar
Boko577 Boko577 is offline
 
Join Date: Dec 2009
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Read Above Post!
Reply With Quote
  #20  
Old 05-27-2010, 03:23 AM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boko577 View Post
Read Above Post!
Read This Post!

https://vborg.vbsupport.ru/showpost....98&postcount=6
Reply With Quote
  #21  
Old 05-27-2010, 08:23 AM
ChopSuey ChopSuey is offline
 
Join Date: Jun 2009
Location: Alaska
Posts: 2,140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can just add it into the showthread template.
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 02:23 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.04525 seconds
  • Memory Usage 2,338KB
  • 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
  • (2)bbcode_php
  • (4)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
  • (2)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