vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Show Thread Enhancements - retweet thread (https://vborg.vbsupport.ru/showthread.php?t=221510)

wolfstream 08-21-2009 10:00 PM

retweet thread
 
1 Attachment(s)
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!

Brandon Sheley 08-22-2009 10:12 PM

great mod!
is there any way we can change the @tweetme username or own as the forum owner?

thanks, installing

ps.. you can wrap the code with this condition to show on the first post only
Code:

<if condition="!$GLOBALS['FIRSTPOSTID']"></if>
Here is a demo

wolfstream 08-22-2009 10:37 PM

There are a number of options you can add to the button, but I don't see anything allowing you to change the username. My bet is that it is done this way deliberately to track the tweets through tweetmeme.com

Brandon Sheley 08-22-2009 10:44 PM

Quote:

Originally Posted by wolfstream (Post 1872349)
There are a number of options you can add to the button, but I don't see anything allowing you to change the username. My bet is that it is done this way deliberately to track the tweets through tweetmeme.com

Thanks, I'll check it out

As for not being able to change the @tweetme, I know their wordpress plugin allows it, that what I use on TopekaTweetup
It also allows you to use other URL shortners, bit.ly, cli.gs and a few others

I'll play around with the link, thanks for the info :)
Once I added this to our blog, I've wanted to add it to the form but never took the time to look for the code :rolleyes:

lm3a.net 08-23-2009 09:09 AM

Nice mod,

thanks

ArnyVee 08-23-2009 12:31 PM

Specifying a different source

By default the retweet button will be in the format of “RT @tweetmeme <title> <link>”. You can, however change the button to retweet your user account. By specifying the ‘tweetmeme_source’ parameter in the JavaScript you can change the format to “RT @yourname <title> <link>”.

Code:

<script type="text/javascript">
tweetmeme_url = 'http://yoururl.com';
tweetmeme_source = 'TheWDBoards';
</script>

<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>


The example above would retweet in the format of “RT @TheWDBoards <title> <link>”. :up:

Edited: I decided to use the compact version of the button to save space on my already busy postbit. Simply went with "tweetmeme_source = 'TheWDBoards'; and then "tweetmeme_style = 'compact';" to show the smaller version of the button and my own source Twitter username.

Example: http://www.waltdisneyboards.com/othe...l-orlando.html

ArnyVee 08-23-2009 05:52 PM

Here's what I did (with some help from a friend over at vBulletinsetup.com :up: ) to have it shown to the right of the title portion of the message area rather than the postbit....

Code:

<span style="float: right;" class="smallfont"><script type="text/javascript">
tweetmeme_style = 'compact';
tweetmeme_source = 'TheWDBoards';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script></span>


....I like the way that it displays in the message area with the compact button! :)

ArnyVee 08-26-2009 11:31 PM

I've been getting some white screens after someone replies to a thread. Anyone experience this and, more importantly, were you able to fix it?

TheLastSuperman 08-27-2009 12:46 AM

Quote:

Originally Posted by ArnyVee (Post 1875083)
I've been getting some white screens after someone replies to a thread. Anyone experience this and, more importantly, were you able to fix it?

So they post then it goes to white screen and if you click on screen hit F5 it will only refresh the blank page but if you go up top and click behind (I presume it listed the new url as if it was going to redirect) the url and hit enter it will then show?

If that is the case make sure Arny you don't have ANY old style codes that your browsers might not like AND update your Java, been a few problems with some forums I work and help on since updating to 3.8.3 then to 3.8.4.

Also was it just Firefox users or Internet Explorer or Both?

PM me if I don't make it back to this thread anytime soon, I had the white pages after posting and it was some old code in a template, it was fine before the update to 3.8.3 but after that white pages and 9+ hours hunting it down :p

S-MAN

wolfstream 08-27-2009 12:56 AM

This shouldn't really be caused by this mod, the mod is pretty basic, and only calls one thing.


All times are GMT. The time now is 03:17 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.01255 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete