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.

mikeo9043 08-27-2009 03:04 AM

How do I put it into the Signature like you did on the demo site?

ArnyVee 08-29-2009 12:25 AM

Quote:

Originally Posted by TheLastSuperman (Post 1875099)
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

PM sent! :up:

wolfstream 08-29-2009 12:35 AM

Quote:

Originally Posted by mikeo9043 (Post 1875139)
How do I put it into the Signature like you did on the demo site?

I'll have the code updated for that in a bit. I'm still trying to work through some bugs.
I was using the postbit for a while, but found that when ranks were added, this made it way too busy, so, I moved the button down to the thread tools (not sig), with reply, edit, etc.

rockinaway 08-29-2009 01:37 PM

I am getting the same problem with the page going to a white screen when replying. Also, the tweets don't update (i.e. the counter doesn't change).

wolfstream 08-29-2009 03:05 PM

The white page issue isn't an issue with this mod, since it's just a one line addition to the template. There's something wrong with your template.

The tweet counters should update just fine, I've never had an issue with them not doing so. Perhaps there's an issue between your server and tweetmeme

Brandon Sheley 09-20-2009 06:36 PM

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 :D

jamhind 10-09-2009 08:37 AM

Excuse my lack of computer knowledge but does this mod give you the little "retweet" button I saw half way down the sample page?
If so, what pages does it appear on in the forum, and where on the page does it appear?

Thanks
Julie-Ann
www.decoratingforum.com.au

jamhind 10-11-2009 09:47 AM

Quote:

in postbit (and postbit_legacy), look for

Block Disabled: (Update License Status)

Suspended or Unlicensed Members Cannot View Code.


and after, add

Block Disabled: (Update License Status)

Suspended or Unlicensed Members Cannot View Code.
Where would I find postbit to add this text?

thanks
Julie-Ann

jamhind 10-27-2009 04:52 AM

Hi
I installed the button on my vbulletin forum but have a button with a ? and a green box below. When you press the button I received an error message.
I am the Administrator of the forum http://www.decoratingforum.com.au
Can you help me to get this working.
I am not a computer person so excuse my ignorance if I am doing something basic wrong

hydn 01-13-2010 09:09 AM

Works great but cant get it working on vbadvanced front page.

Anyone else have this working with vbadvanced?

gordietbh 01-13-2010 10:26 PM

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.

gordietbh 01-13-2010 10:29 PM

Quote:

Originally Posted by Loco.M (Post 1888132)
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 :D

You can wrap it in this:

Code:

<if condition="!$post['forwardlink']"></if>

a9eel 01-14-2010 03:22 PM

thanks

DoubleGlasses 02-13-2010 06:47 PM

Will this be made available for Vbulletin 4.0?

MagicThemeParks 02-13-2010 10:30 PM

Quote:

Originally Posted by gordietbh (Post 1954928)
You can wrap it in this:

Code:

<if condition="!$post['forwardlink']"></if>

That worked for me! Thanks! :)


All times are GMT. The time now is 05:50 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.01295 seconds
  • Memory Usage 1,792KB
  • 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
  • (8)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete