The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Twitter - Tweet Button in SHOWTHREAD Details »» | |||||||||||||||||||||||||||||||||
Twitter - Tweet Button in SHOWTHREAD
Developer Last Online: Aug 2023
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: Code:
<if condition="$show['pagenav']"><td align="$stylevar[right]">$pagenav</td></if> Code:
<td align="$stylevar[right]"><if condition="$show['pagenav']">$pagenav</if> <if condition="!in_array($GLOBALS[forumid], array(X, Y, Z))"> <table border="0"> <tr><td> <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> </td></tr></table> </if> </td> 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: Code:
<if condition="!in_array($GLOBALS[forumid], array(X, Y, Z))"> and </if> (The second one) 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. Code:
<td align="$stylevar[right]"><if condition="$show['pagenav']">$pagenav</if> <if condition="!in_array($GLOBALS[forumid], array(X, Y, Z))"> <table border="0"> <tr><td> <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME" data-url="$vboptions[bburl]/showthread.php?t=$thread[threadid]">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> </td></tr></table> </if> </td> Download Now
Screenshots
Show Your Support
|
Благодарность от: | ||
mary_rose082198 |
Comments |
#42
|
|||
|
|||
Quote:
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 |
#43
|
||||
|
||||
You can customize your like button and get code directly from facebook here:
http://developers.facebook.com/docs/...e/plugins/like |
#44
|
|||
|
|||
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 : PHP Code:
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 . |
#45
|
||||
|
||||
RK KING KONG,
You have VB4, this thread is only for the VB3 mod. The VB4 version is here: https://vborg.vbsupport.ru/showthread.php?t=248569 In that thread I discuss how to place the twitter button next to Facebook like on VB4. |
#46
|
|||
|
|||
Installed!
Thanks!!! |
#47
|
|||
|
|||
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
|
#48
|
||||
|
||||
Quote:
Code:
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME" data-url="$vboptions[bburl]/showthread.php?t=$thread[threadid]">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> |
#49
|
|||
|
|||
why if i tweet a post the count always remains in 0?
|
#50
|
||||
|
||||
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. |
#51
|
|||
|
|||
do you recommend to use script two to fix this issue?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|