Version: 1.0.4, by King Kovifor
Developer Last Online: Aug 2015
Category: Integration with vBulletin -
Version: 3.8.x
Rating:
Released: 02-08-2009
Last Update: 07-13-2009
Installs: 402
DB Changes Uses Plugins Auto-Templates
Additional Files Translations
No support by the author.
Description
This modification adds basic Twitter integration to vBulletin. Once a user defines their Twitter username & password within their vB Options (User CP -> Edit Options), the Tweet This X links will appear.
It automatically adds a tweet to their account with the default text of "Check this out! " (which can be edited editing the "twitter_checkout" phrase) and uses your forum URL with either tp or tt.php as the link. These redirect to the thread / post that was tweeted.
Installation
Upload files in the /upload/ folder of the .zip into the directories as is.
<if condition="$vbulletin->userinfo['twitter_username']"><a href="tweet.php?do=thread&id=$threadinfo[threadid]">Tweet This Thread!</a></if>
Requirements
THIS MODIFICATION REQUIRES PHP 5 DUE TO THE CLASS THAT IS USED!
PHP'S CURL EXTENSION IS ALSO USED! THE API CALLS ARE COMPLETELY DEPENDENT ON THEM!
This modification should work on vBulletin v3.5+, but was only tested on a vB 3.8 install.
Using the "tp.php" switch added in v1.0.2
With the release of v1.0.2, a switch between showpost.php?p=ID&postcount=COUNT and showthread.php?p=ID#postID has been added. Using it is simple, but requires a code edit (Note: This is a SUPPORTED code edit!). Open up tp.php and find this line:
PHP Code:
define('SHOWPOST', true);
Change that line to this:
PHP Code:
define('SHOWPOST', false);
This will automatically trigger the change any time it is loaded. This works retroactively and any links will automatically use the new settings once changed!
In your first one, you have $post to $vbulletin. Remove "$post to" and it should work.
D'oh. That was a typo on my part. I copied+pasted what you told us to add and I accidentally copied the "to" :-P Let me try that...
So, now it's set as:
PHP Code:
<if condition="$vbulletin->userinfo['twitter_username']"><a href="tweet.php?do=post&id=$post[postid]&c=$post[postid]">Tweet this post!</a></if>
Which looks funky. Shouldn't it go to forums/showthread.php?p=414&postcount=414 so that it shows the thread and just automatically scrolls to that post? It just makes my style look funky lol you can check it out.
It would look fine if the link I clicked from Twitter opened in a new window that sized itself, but it opens as a new tab and it kind of messes up the width on the tables cause it's not meant to be that wide. See what I mean?
Yes, that code is correct. Also, it was designed to use the single post view. Since (1) it gives you the content you wanted and (2) it includes a link to the original thread. Of course, you could set it up to redirect to the thread view instead.
Yes, that code is correct. Also, it was designed to use the single post view. Since (1) it gives you the content you wanted and (2) it includes a link to the original thread. Of course, you could set it up to redirect to the thread view instead.
Ah, you're right. I wish I knew more about coding :-P I am slowly learning though. Alright, I will stop bugging you now! Thanks again King Kovifor.
But, as you can see, it doesn't put a space after the "!" and therefore, the link isn't clickable. I only added the text change - and nothing more...then, I tried putting a space after. Thanks for all your help!
But, as you can see, it doesn't put a space after the "!" and therefore, the link isn't clickable. I only added the text change - and nothing more...then, I tried putting a space after. Thanks for all your help!
You should place a space after the "!" in the phrase so it reads: "This is a great read in our forums! ". I purposely didn't place a space in the code, that's located inside of the phrase.
Quote:
Originally Posted by dvsDave
Could you add support for a hashtag that the admin can define so we can find the tweets in the twitterverse ?
I will see about that. Added to the feature tracker.
EDIT: After second thought, though I don't have this as a specific feature, you can do this by adding a hash tag into the phrase.