vBulletin Mods

The Official vBulletin Modifications Site
http://www.vbulletin.org/forum/showthread.php?t=204694

vBTwitter
by King Kovifor
09 Feb 2009 00:51

3 Attachment(s)
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
  1. Upload files in the /upload/ folder of the .zip into the directories as is.
  2. Install product file.
  3. Register an OAuth Application here, using:
  4. Click Install on vB.org
  5. Tell Your users.
  6. Enjoy
Upgrading to v1.0.4
  • Upload all files, overwrite everything.
  • Install product file.
  • Register an OAuth Application here, using:
  • Gain and copy the Consumer Key & Secret into vBulletin Options.
Upgrading to v1.0.3 or before.
  • Upload all files, overwrite everything.
  • install product file.
  • Remove template edits. For the record, they are here:
    • Open the postbit or postbit_legacy template (depending on what you use). Find:

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

      Add before that:

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

    • Open the SHOWTHREAD template.
      Find:

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

      Add After:

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

      Find:

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

      Add After:

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

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:


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

Change that line to this:


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


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!

King Kovifor 09 Feb 2009 00:52

Change Log
  • v1.0.0 - February 8, 2009
    • Initial Release
  • v1.0.1 - February 16, 2009
    • Bug Fixes
      • Ability to uninstall (I fixed the SQL query)
      • Added missing ; in the Tweet this Thread!
      • Fixed bug within the Twitter class that blocked authentication.
    • Completely phrased.
    • New vBTwitter source parameter, any tweets show as coming from this mod (instead of web).
    • Removed extra query on updating options.
    • mcrypt integration (encrypted password)
    • Automatic Template Edits!
    • Image in Tweet this Thread!
  • v1.0.2 - February 21, 2009
    • Bug Fixes
      • Multiple "Tweet this Post" links.
      • Mcrypt decryption errors.
    • Switch for tp.php to redirect to showthread.php or showpost.php.
  • v1.0.3 - March 4, 2009
    • Crucial Bug Fix: New Verification Method!
  • v1.0.4 - July 14, 2009
    • OAuth integration!
    • Shows links to all (including guests for now).
    • Requires setup.

Floris 09 Feb 2009 00:58

Thanks @KingKovifor, via @Floris

LOL

Dream 09 Feb 2009 01:04

Nice, just worried about storing twitter passwords... I take it they are not md5ed so to use them on twitter.

I think I'd rather use a popup asking username and password.

King Kovifor 09 Feb 2009 01:16

Quote:

Originally Posted by Floris (Post 1738174)
Thanks @KingKovifor, via @Floris

LOL

LOL. You got to hear about my development woes!

Quote:

Originally Posted by Dream (Post 1738181)
Nice, just worried about storing twitter passwords... I take it they are not md5ed so to use them on twitter.

I think I'd rather use a popup asking username and password.

I was worried about that too but I need to authenticate and don't know where or how to authenticate without storing it. Pop up would work, but I am thinking of ease of use. Any suggestions?

Dream 09 Feb 2009 01:34

I'd guess another version of this mod could be made, where anyone can twit anything clicking on "Twit This" that opens a popup window that asks username, password and text to append before URL. I could do it but *yawn* not sure how integration with twitter works. It would be just one php file and one template edit. Also not sure if you can twit posts, or just threads would make more sense. But your idea of twitting not the post text, but a link to the forum is nice.

dirtycrow 09 Feb 2009 01:35

awesome!

King Kovifor 09 Feb 2009 01:43

Quote:

Originally Posted by Dream (Post 1738211)
I'd guess another version of this mod could be made, where anyone can twit anything clicking on "Twit This" that opens a popup window that asks username, password and text to append before URL. I could do it but *yawn* not sure how integration with twitter works. It would be just one php file and one template edit. Also not sure if you can twit posts, or just threads would make more sense. But your idea of twitting not the post text, but a link to the forum is nice.

I can add that as a product tomorrow. Admin set option for on / off?

This allows you to tweet posts and threads. My next major feature release plans on adding things that would require edits like it.

KevinL 09 Feb 2009 01:51

You guys are too much I love it.

After that thread I knew this was coming! Great work!

King Kovifor 09 Feb 2009 02:06

Quote:

Originally Posted by KevinL (Post 1738231)
You guys are too much I love it.

After that thread I knew this was coming! Great work!

What thread?

KevinL 09 Feb 2009 02:27

The twitter thread...

ArnyVee 09 Feb 2009 02:47

Okay....so, will this allow us to send a Twitter (or a Tweet or whatever it's called! :) ) message to our vB profile? I'm a little confused (although that's not a big surprise ;) ) about what the dilly yo'. :D

King Kovifor 09 Feb 2009 03:06

It creates a tweet that includes a URL to the specified Post / thread with the default words "check this out" to your Twitted profile. Each user sets up their own profile for this to work.

Wayne Luke 09 Feb 2009 03:08

Quote:

Originally Posted by King Kovifor (Post 1738196)
I was worried about that too but I need to authenticate and don't know where or how to authenticate without storing it. Pop up would work, but I am thinking of ease of use. Any suggestions?

Use mcrypt and have the site owner enter a secret phrase in the config.php file (best place for it)... You can then take the secret phrase and generate a seed value that encrypts the login information. Not foolproof since it will be necessary to decrypt the information but should provide enough basic protection.

King Kovifor 09 Feb 2009 03:16

Quote:

Originally Posted by Wayne Luke (Post 1738278)
Use mcrypt and have the site owner enter a secret phrase in the config.php file (best place for it)... You can then take the secret phrase and generate a seed value that encrypts the login information. Not foolproof since it will be necessary to decrypt the information but should provide enough basic protection.

Thanks! I'll look into that! And i'm looking at HTTP Basic Auth as the example show it encrypted so if I can figure that out I'll store that.


All times are GMT. The time now is 01:49.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©2001 - , vbulletin.org. All rights reserved.