Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Twitter - Tweet Button in SHOWTHREAD Details »
Twitter - Tweet Button in SHOWTHREAD
Mod Version: 1.00, by BirdOPrey5 (IB Staff) BirdOPrey5 is offline
Developer Last Online: Jun 2019 I like it Show Printable Version Email this Page

vB Version: 3.8.x Rating: (5 votes - 4.80 average) Installs: 55
Released: 14 Aug 2010 Last Update: 21 Aug 2010 Downloads: 142
Not Supported Template Edits Re-usable Code Translations External Content  

Twitter released their new TWEET button.

Live Demo: http://www.juot.net/forums/showthread.php?t=41185
(Update I have for the time being replaced the Tweet button with the Add This share button on my live forum. See the screen shots instead.)


I have tested this in latest versions of IE / Firefox / Chrome / Opera / Safari.

This will show you how to add this simple code to your SHOWTHREAD template below the page navigation bar, if visible.

Go to the Admin CP -> Styles & Templates -> Style Manager
Edit your SHOWTHREAD Template

Find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace With:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Change the X, Y, Z in the second line to the forumid's of any private forums you may have. If a guest can't view a forum there is no reason to link a tweet to it. You can add as many or as few forumid's here as you need, just separate each with a comma.
Valid Examples:
<if condition="!in_array($GLOBALS[forumid], array(2, 5, 9))">
<if condition="!in_array($GLOBALS[forumid], array(7))">
<if condition="!in_array($GLOBALS[forumid], array(2, 3, 4, 5, 6, 7, 8))">
If none of your forums are private or you want to enable this in every forum you can remove the lines:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace "YOUR_TWITTER_USERNAME" with your twitter username, it will be referenced in the tweet- but the tweet will not be from YOU, it will be from whoever hits the tweet button.

When you hit the Tweet button you will be given a box to type a message if you're logged in. If you're not logged in you will be asked to login or join, all within the pop-up window.

This button code will count the number of tweets people have made using it. I will add more options in later posts.

Note- My Screenshot also has the Facebook Like button available as a separate mod here by someone else. If you don't have the facebook like button your Tweet button will be on the right of the page. There is also a basic skin screen shot.

Please click Install if you use this.

NEW UPDATE!!!

Use this code instead it will force the correct URL to Twitter and solve the issue with a different URL being tweeted if thread is tweeted as soon as it's posted.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Be sure to replace "YOUR_TWITTER_USERNAME" and "X, Y, Z" as described above.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	ss_twitter.jpg
Views:	1145
Size:	180.2 KB
ID:	120800   Click image for larger version

Name:	ss_twitter_badic.jpg
Views:	892
Size:	82.3 KB
ID:	120801  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Mini Mods Facebook - Linkhay - Tweet - Yahoo Buzz Share with Above Button Cool saviola8x vBulletin 4.x Template Modifications 24 26 Aug 2010 03:46

  #16  
Old 29 Aug 2010, 23:06
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by Eryeal View Post
I have a very odd problem .. The twitter icon doesn't show up in 2 of my forums on any threads .. there is absolutely no difference in these forums in the Forum Manager, or Forum Permissions. They are set up the exact same way - the only difference is the name of the forum that I can tell. The icon just doesn't show up at all. Any ideas?
If you look at the code you use there's this line:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

You need to replace X, Y, and Z with forumid numbers of forums in which you don't want to show the tweet button, like for example:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

or if just 1 forum to not display the button in, for example:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

My guess is the forum's it's not showing for are listed in your IF statement...

If you don't have any forums in which you don't want to display the tweet button I give yo the two lines to remove in the instructions.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #17  
Old 04 Sep 2010, 11:35
metalguy639 metalguy639 is offline
 
Join Date: Jan 2009
Thanks this is cool. I instantly got traffic when I tweeted my threads. not sure if they are bots or real people but at least the links are getting out there
Reply With Quote
  #18  
Old 05 Sep 2010, 23:38
Prisoner Prisoner is offline
 
Join Date: Aug 2005
I added this and the Facebook button at the same time and people freaked out at seeing their Facebook (Real) name on the forum. Even though only their friends can see that, it made them uncomfortable.

I may add the Tweet button back on.
Reply With Quote
  #19  
Old 05 Sep 2010, 23:55
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by Prisoner View Post
I added this and the Facebook button at the same time and people freaked out at seeing their Facebook (Real) name on the forum. Even though only their friends can see that, it made them uncomfortable.

I may add the Tweet button back on.
Some people will complain about anything- if they really understood that only people who ALREADY knew their name would see their name they'd have nothing to complain about... but that said the Twitter button doesn't show any personal info to anyone besides the twitter account of the forum admin which you want people to know.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #20  
Old 06 Sep 2010, 00:04
Prisoner Prisoner is offline
 
Join Date: Aug 2005
I know and I tried to explain it, but I know that if they aren't comfortable with it, they won't use it.

On my forum, there are a lot of local teachers and city workers who post about their jobs and they are just paranoid that their bosses and co-workers will be able to identify them. If the Facebook note showed that their Username liked it, they would probably be ok with it.

I was hoping to use it to generate traffic to the site.

Adding the Tweet link back now.

Thanks
Reply With Quote
  #21  
Old 07 Sep 2010, 08:56
rtyagis rtyagis is offline
 
Join Date: Feb 2009
Question

How to show 'tweet' button on forum home as in forums.digitalpoint.com?
Have anybody checked this in VB 4.0.6?
__________________
PolicyWala | Forum
Reply With Quote
  #22  
Old 07 Sep 2010, 17:08
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
The 4.0.x version of this mod is here: http://www.vbulletin.org/forum/showthread.php?t=248569

Digitalpoint looks like they added the twitter code to one of their breadcrumb templates...

You can add it directly below "Forum" (on their page) by adding the code to FORUMHOME template right below the navbar code- so something like:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

But again this is for 4.x version only, not relevant to people using this on 3.8. Please continue the discussion in the 4.x thread.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #23  
Old 07 Sep 2010, 19:44
rtyagis rtyagis is offline
 
Join Date: Feb 2009
Thumbs up

Thanks Mate !
__________________
PolicyWala | Forum
Reply With Quote
  #24  
Old 01 Oct 2010, 18:49
Shazan Shazan is offline
 
Join Date: Jul 2008
Real name: Rafael
Is there a way to add this on postbit_legacy?
Reply With Quote
  #25  
Old 02 Oct 2010, 00:18
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
If you add this to postbit legacy you'd be tweeting single posts, not threads... but if you really want to...

In Postbit Legacy Find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And directly below it add:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Change http://www.juot.net/forums/ to your forum's URL, whatever would come before showpost.php... and change YOUR_TWITTER_USERNAME to your twitter username... this will put the tweet button right next to the Quote button and it lines up well, I tested it. It also sends the right URL to twitter.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #26  
Old 06 Oct 2010, 10:48
astdirect astdirect is offline
 
Join Date: Dec 2009
Using 3.8.4 and the Tweet counter doesn't work. I also get an error :

"stack overflow : Line 1" when putting on but i just click ok and the error goes away.

How would you add these buttons to forum home on 3.8.x ?

Great addition and great for driving free traffic
Reply With Quote
  #27  
Old 07 Oct 2010, 18:31
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Where are you getting that error?

As for the counter not working I'm guessing it's because the URL is different when you first submit a new thread or past than it is when you browse to the thread later, so twitter is counting it a different URL. I'm working on a fix for this.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #28  
Old 08 Oct 2010, 06:07
chocolate angel's Avatar
chocolate angel chocolate angel is offline
 
Join Date: Dec 2007
hi. thank you so much for posting this.

i just installed this and i am trying to get the twitter button beside my fb button..here is my code. what did i do wrong? thanks


<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="Billyne">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</td></td>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.nailtechalley.com/forums/showthread.php$session[sessionurl]?t=$threadid" &amp;show_faces=false&amp;width=350&amp;action=like&amp;colorscheme=dark&amp;hei ght=30" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:350px; height:30px;" allowTransparency="true"></iframe>
</td></tr></table>
</if>
</td>
<!-- / controls above postbits -->
Reply With Quote
  #29  
Old 08 Oct 2010, 07:31
astdirect astdirect is offline
 
Join Date: Dec 2009
@birdofprey - iget that error when the tweet page pops up. I tried on laptop and i dont get that error, only on my main pc. Main PC is running XP and IE7 and laptop is running Vista and IE8. Not sure if thats anything to do with it.

Tweet button now counting tweets though after i moved it from postbit_legacy to showthread.

Brilliant addition !!
Reply With Quote
  #30  
Old 08 Oct 2010, 08:23
Hagalepues Hagalepues is offline
 
Join Date: Aug 2009
Re

I do not understand why the button is down the pages.

How do I place above them?

Image:

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 12:34.

Layout Options | Width: Wide Color: