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

  #31  
Old 08 Oct 2010, 14:19
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by chocolate angel View Post
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 -->
There's a couple things that need to be moved and your IF statement seems in the wrong place though you didn't post the beginning of it - so I'm giving you all the code between <!-- controls above postbits --> and <!-- /controls above postbits --> you can see where yours is different an change it... You just need to update the IF statement to exclude the forumid's of your forums you don't want to show either button for.


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

Please backup your original template to a text file before changing just in case something goes wrong.
__________________
-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
  #32  
Old 08 Oct 2010, 14:29
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by astdirect View Post
@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 !!
Glaf your counter is working. It's much better in showthread because in postbit it will show up per post but as-is it won't tweet each post just the entire page/thread so it would get confusing to people anyway.

Unfortunately the error you're getting in your main pc sounds like an issue local to your system- I'd recommend upgrading to the latest IE... It's also possible firewall or anti-malware software you may be running is blocking part of the script and causing the error- it could be anything.

Originally Posted by Hagalepues View Post
I do not understand why the button is down the pages.

How do I place above them?

Image:

It's below the page navigation because that's where I wanted it. You can move it above the page navigation by changing the location of the template edit.

If you want to try, experiment with putting the twitter code before the line:

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

You might need to align it or whatnot but no reason it shouldn't work.
__________________
-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
  #33  
Old 08 Oct 2010, 22:06
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
I've added updated code to the first post that will fix the counter issue/wrong URL issue.
__________________
-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
  #34  
Old 12 Oct 2010, 04:34
chocolate angel's Avatar
chocolate angel chocolate angel is offline
 
Join Date: Dec 2007
thanks!
Reply With Quote
  #35  
Old 17 Oct 2010, 23:04
Tanapangarap's Avatar
Tanapangarap Tanapangarap is offline
 
Join Date: Dec 2007
Real name: Kevin
Hi.

How do I place the tweet button beside the page navigation? (so that [tweet button] [page navigation])
__________________
Join The Infinity Program, my den of villains and swashbucklers.

My latest article: "The effects of a shoutbox on a forum community."
Reply With Quote
  #36  
Old 18 Oct 2010, 01:54
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
I never really tried that but I'll play with it and let you 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
  #37  
Old 18 Oct 2010, 02:20
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
OK for Next to the Page Nav menu do the following.

In SHOWTHREAD find the line:

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

And Replace with:

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

Follow all the other instructions in the top post including changing "X, Y. Z" to forumids of forums you don't want to show the TWEET button in and replacing YOUR_TWITTER_USERNAME with your twitter username.
__________________
-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
  #38  
Old 18 Oct 2010, 04:00
Tanapangarap's Avatar
Tanapangarap Tanapangarap is offline
 
Join Date: Dec 2007
Real name: Kevin
Very awesome. Thank you very much, BirdOPrey.
__________________
Join The Infinity Program, my den of villains and swashbucklers.

My latest article: "The effects of a shoutbox on a forum community."
Reply With Quote
  #39  
Old 12 Jan 2011, 19:54
DJDynasty239 DJDynasty239 is offline
 
Join Date: Jul 2008
BirdOPrey, I really wanna get that facebook LIKE link next to the Twitter one, and placed where you have them because those are the best spots IMO, I have the Twitter one in place but not sure what coding needs to be placed to do so.
Reply With Quote
  #40  
Old 12 Jan 2011, 21:49
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by DJDynasty239 View Post
BirdOPrey, I really wanna get that facebook LIKE link next to the Twitter one, and placed where you have them because those are the best spots IMO, I have the Twitter one in place but not sure what coding needs to be placed to do so.
This is my code for both the twitter and facebook button like in the screen shot:


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

Actually it looks even better than the screen shot, I managed to get them lined up properly.

You'll have to customize the forumids and the twitter specifics and add your facebook like code to "FACEBOOK LIKE CODE HERE" but it will look good.
Attached Images
File Type: jpg ss_fbtwitter38.jpg (38.6 KB, 25 views)
__________________
-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
  #41  
Old 13 Jan 2011, 00:12
DJDynasty239 DJDynasty239 is offline
 
Join Date: Jul 2008
Originally Posted by BirdOPrey5 View Post
This is my code for both the twitter and facebook button like in the screen shot:


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

Actually it looks even better than the screen shot, I managed to get them lined up properly.

You'll have to customize the forumids and the twitter specifics and add your facebook like code to "FACEBOOK LIKE CODE HERE" but it will look good.

Awesome, I got it thanks man...Anyway to change the font on the facebook to white by any chance that you know of? I've been looking and I'm not finding much, could be looking in the wrong areas though
Reply With Quote
  #42  
Old 13 Jan 2011, 00:50
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
You can customize your like button and get code directly from facebook here:
http://developers.facebook.com/docs/...e/plugins/like
__________________
-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
  #43  
Old 14 Jan 2011, 18:39
RK KINGKONG RK KINGKONG is offline
 
Join Date: May 2010
Real name: ROBB
Question HELP im totally new to this

I have lil knowledge on how to work my VB , currently my Facebook button is to the far right next to logout , i want it to the left infront of the welcome .
where do i edit this ? how ? and what code do i replace , when i move it whats the proper place to move it to within the template ?

2} question i hope you can help me with is , I have a facebook like button that was put in as a AD where the yellow box is in this pic http://i924.photobucket.com/albums/a...Untitled-3.jpg
I know how to take it out..
how can i add facebook like & twitter like in this pic , ive looked in showthread using ctrl F to search the :
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

but i cant find it for the life of me.... I am running VB 4.1 patch 2 fi that matters
http://i924.photobucket.com/albums/a...ICTURES/45.jpg

right above the thread bar is where i want it just like in this picture ... thanking you in advance been looking around seen alot of threads but none that helped .
Reply With Quote
  #44  
Old 14 Jan 2011, 19:32
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
RK KING KONG,

You have VB4, this thread is only for the VB3 mod.
The VB4 version is here: http://www.vbulletin.org/forum/showthread.php?t=248569

In that thread I discuss how to place the twitter button next to Facebook
like on VB4.
__________________
-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
  #45  
Old 09 Feb 2011, 14:04
Artes_Marciales Artes_Marciales is offline
 
Join Date: Jun 2007
Installed!
Thanks!!!
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 01:41.

Layout Options | Width: Wide Color: