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

  #46  
Old 11 Feb 2011, 13:38
weindians weindians is offline
 
Join Date: Sep 2006
if there a work around to prevent number of tweets resetting to 0 yet??? aslo my facebook share button also resetting to 0 on refresh
__________________
Weindians.net
Reply With Quote
  #47  
Old 11 Feb 2011, 23:00
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by ukindian View Post
if there a work around to prevent number of tweets resetting to 0 yet??? aslo my facebook share button also resetting to 0 on refresh
The only thing to try is to add the data-url line to the code, for example:

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

That helps for some people. Facebook has a similar option I know too, to manually specify the URL to be counted.
__________________
-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
  #48  
Old 21 Feb 2011, 18:37
Levi75 Levi75 is offline
 
Join Date: Aug 2007
why if i tweet a post the count always remains in 0?
__________________
Área Android
Área iOS
Reply With Quote
  #49  
Old 22 Feb 2011, 16:21
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
If you're using the latest code under "NEW UPDATE" in the top thread that should solve issues where the count is wrong.

If you're still having issues it could just be because Twitter isn't great at keeping count, a google search will show lots of bloggers reporting problems with the counts.
__________________
-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
  #50  
Old 22 Feb 2011, 18:42
Levi75 Levi75 is offline
 
Join Date: Aug 2007
do you recommend to use script two to fix this issue?
__________________
Área Android
Área iOS
Reply With Quote
  #51  
Old 22 Feb 2011, 20:49
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
I recommend using this line for the Twitter code, you'll note it has the data-url attribute the original code does not. This will force Twitter to count and link to the page via a single URL- it will not vary based on how the user is browsing the page...


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

__________________
-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
  #52  
Old 18 Mar 2011, 07:51
Judger21 Judger21 is offline
 
Join Date: Aug 2008
Thanks for posting this! Took me awhile to get it where I wanted it (put it in my postbit legacy) and getting it lined up.
Reply With Quote
  #53  
Old 21 Mar 2011, 01:58
SVTCobraLTD SVTCobraLTD is offline
 
Join Date: Jul 2007
How do you install this next to Thread Tools like the Demo Site?
Reply With Quote
  #54  
Old 21 Mar 2011, 02:50
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
To do it next to thread tools like currently in the demo (March 2011):

Edit SHOWTHREAD template...

FIND the code below and ADD the code in RED


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

__________________
-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
  #55  
Old 21 Mar 2011, 03:27
SVTCobraLTD SVTCobraLTD is offline
 
Join Date: Jul 2007
Thank you, got it working.
Reply With Quote
  #56  
Old 06 Jul 2011, 08:34
weindians weindians is offline
 
Join Date: Sep 2006
Originally Posted by BirdOPrey5 View Post
The only thing to try is to add the data-url line to the code, for example:

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

That helps for some people. Facebook has a similar option I know too, to manually specify the URL to be counted.
still count is same 0.. i have vbseo is that coz this workaround not doing anything???
__________________
Weindians.net
Reply With Quote
  #57  
Old 06 Jul 2011, 12:31
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
I don't have access to VBSEO sorry. You can disable the count from showing by changing data-count="horizontal" to data-count="none" in the code. Another option would be to ask in the VBSEO forum if anyone has the tweet button working. This is just the standard install instructions from Twitter, there's not much I can do about it.
__________________
-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
  #58  
Old 17 Jul 2012, 03:40
Froggy32701 Froggy32701 is offline
 
Join Date: Aug 2005
Originally Posted by BirdOPrey5 View Post
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.
BOP5

Doing this is going to post the link for viewing a single post correct?

If yes, is there a way to do this so that you can tweet the single post but instead of the link taking you to the view single post it takes you to the section of the thread that has that post?

Hope that makes sense..

EDIT:

Never mind figured it out on my own..
__________________
.:Froggy:.
pnwham.com

Last edited by Froggy32701; 17 Jul 2012 at 04:06.
Reply With Quote
  #59  
Old 25 Nov 2012, 19:04
al2thero al2thero is offline
 
Join Date: Aug 2008
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 23:55.

Layout Options | Width: Wide Color: