Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
retweet thread Details »»
retweet thread
Version: 1.00, by wolfstream wolfstream is offline
Developer Last Online: Sep 2009 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.3 Rating:
Released: 08-21-2009 Last Update: Never Installs: 18
Re-useable Code Translations  
No support by the author.

I'm not sure this would be a "mod", more of a howto, as it is incredibly easy to do. If it's thought of as more of a howto, one of the mods can move it to the appropriate section.

This "mod" will allow your members to retweet your threads without leaving the forum page itself, and show a count of how many times the thread has been "tweeted" . It involves adding one line to 2 templates, that's it.

in postbit (and postbit_legacy), look for
Code:
$template_hook[postbit_userinfo_left]
and after, add
Code:
<if condition="!$GLOBALS['FIRSTPOSTID']">
<br /><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
</if>
This will put this directly UNDER the username, which should work for most.

Demo of how this works? See this page. Look right under the username.

Updated to show under only the first post!

Screenshots

File Type: jpg retweet.jpg (105.8 KB, 0 views)

Show Your Support

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

Comments
  #22  
Old 01-13-2010, 10:26 PM
gordietbh gordietbh is offline
 
Join Date: Feb 2009
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if you use the following:

Code:
<if condition="!$GLOBALS['FIRSTPOSTID']">
<span style="float: left;" class="smallfont"><script type="text/javascript">
tweetmeme_style = 'compact';
tweetmeme_source = 'TwitterUsername';
tweetmeme_url = 'http://www.yourURL.com/vb/showthread.php?t=$thread[threadid]';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script></span>
</if>
it will only display the link for the first post in each thread.

setting "showthread.php?t=$thread[threadid]" will use the thread ID for each twitter post instead of the URL of the page being viewed.

The benefits of this are that if somebody views a thread by showthread.php?p=1234 or showpost.php?p=1234 they will all get classified under the same tweet. Otherwise you will have different counts depending on which URL a user uses to view the page.
Reply With Quote
  #23  
Old 01-13-2010, 10:29 PM
gordietbh gordietbh is offline
 
Join Date: Feb 2009
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Loco.M View Post
Some of my members have been asking, but does anyone know the correct condition to not show the tweetme button in pm's?
since it would be pointless to have it in pms
You can wrap it in this:

Code:
<if condition="!$post['forwardlink']"></if>
Reply With Quote
  #24  
Old 01-14-2010, 03:22 PM
a9eel a9eel is offline
 
Join Date: Oct 2007
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
Reply With Quote
  #25  
Old 02-13-2010, 06:47 PM
DoubleGlasses DoubleGlasses is offline
 
Join Date: May 2008
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this be made available for Vbulletin 4.0?
Reply With Quote
  #26  
Old 02-13-2010, 10:30 PM
MagicThemeParks's Avatar
MagicThemeParks MagicThemeParks is offline
 
Join Date: Sep 2009
Posts: 850
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gordietbh View Post
You can wrap it in this:

Code:
<if condition="!$post['forwardlink']"></if>
That worked for me! Thanks!
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 11:50 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.04170 seconds
  • Memory Usage 2,281KB
  • Queries Executed 23 (?)
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_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
  • (2)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (1)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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