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!
This seems to be the most promising "Tweet This" plugin yet. Can it not be somewhat similar to the "Tweet This" wordPress plugin, that essentially doesn't require anyone to store their userID/password - rather, it simply pulls a link.
Not sure how the variables would play out - but I'd think you could smack the code down in the SHOWTHREAD template.
An example (from how to make a easy "Tweet This" link in WordPress) is simply adding this:
Code:
<a href=?http://twitter.com/home?status=I just read <?php the_permalink(); ?> on your site name here!? title=?Send this Post to Twitter!? target=?_blank?>Tweet This Post on Twitter!!!</a>
Of course, the <?php the_permalink(); ?> is pulling the WordPress's blog URL ... but would there be a way to simply add this type of line in the template, and pull the correct code that vbulletin uses (ie. threadid=$threadinfo[threadid]&p=$postid) type info???
Just curious. If you knew PHP and could understand this hack to easily use "TweetThis" in WordPress, looks like it could port over to VBulletin easily?
No, I will always require some kind of user data, but we are working on an OAuth integration where each site will become an "application" and users authorize sites to read and write to their account, so they will not need to add their password, the plugin will store a key supplied by Twitter.
Quote:
Originally Posted by fmckinnon
Thanks - if you nail it, let us know. I'm not excited about the users having to add the info to their UserCP - for all the existing users, they'd have to go back and add it after-the-fact, and it seems kinda out of the way. Would be better if anyone (even if not a registered member) could tweet a thread ... and I'd think you could just manually throw some of that code in there (assumingly, on the SHOWTHREAD template)?
Reference the above answer.
Quote:
Originally Posted by gabrielbulletin
"1. Upload files in the /upload/ folder of the .zip into the directories as is."
Which directory?
As Peggy has said, the upload folder is the forum root and the directory structure matches the structure of a non-modified vBulletin set up, so the sub directories represent where files go.
Searched and didn't see anyone with the same issue. I'm getting the following error once you click the "Tweet This Thread' link:
Code:
Fatal error: Cannot redeclare class Twitter in /path/to/my/forum/includes/twitter.php on line 27
Starting at line 27 of twitter.php:
Code:
class Twitter {
/* Username:password format string */
private $credentials;
/* Contains the last HTTP status code returned */
private $http_status;
/* Contains the last API call */
private $last_api_call;
/* Contains the application calling the API */
private $application_source;
/* Include Source */
private $include_source;
Re-uploaded files and reinstalled allowing overwrite and still same issue. PHP5.2 installed.
No, I will always require some kind of user data, but we are working on an OAuth integration where each site will become an "application" and users authorize sites to read and write to their account, so they will not need to add their password, the plugin will store a key supplied by Twitter.
So there has been real progress for this? The new version?
So after changing the class "Twitter" to "TweetThis" in twitter.php and tweet.php it is attempting to send the tweet which is definitely one step up. Now I'm getting the "We're sorry, but the Username and Password provided within your User CP could not be authenticated. Please modify either your Username or Password to match your current Twitter Username / Password and try again." error with mcrypt. I have 2.5.8 installed and enabled so I'll try messing with some things to see if I can get it worked out.
So after changing the class "Twitter" to "TweetThis" in twitter.php and tweet.php it is attempting to send the tweet which is definitely one step up. Now I'm getting the "We're sorry, but the Username and Password provided within your User CP could not be authenticated. Please modify either your Username or Password to match your current Twitter Username / Password and try again." error with mcrypt. I have 2.5.8 installed and enabled so I'll try messing with some things to see if I can get it worked out.
Would you mind emailing me, as your problem seems unique enough that it isn't necessarily a problem on my end, but a conflict.
So the Tweet this Post option will only appear on posts made by people who have populated their twitter credentials? Anyway so that it appears next to every post? or at least every first post?
has anyone looked at this mod? Does it do the same as this one? I want to use vb_twitter but there seems to be no progress so far on the release which is promised to remove the "check this out" option. But I don't know really.