Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vBTwitter Details »»
vBTwitter
Version: 1.0.4, by King Kovifor King Kovifor is offline
Developer Last Online: Aug 2015 Show Printable Version Email this Page

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
  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:
      HTML Code:
      <if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a></if>
      Add before that:
      HTML Code:
      <if condition="$post['twitter_username']"><a href="tweet.php?do=post&amp;id=$post[postid]&amp;c=$post[postid]">Tweet this post!</a></if>
    • Open the SHOWTHREAD template.
      Find:
      HTML Code:
      	<if condition="$show['addpoll']">
      	<tr>
      		<td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/addpoll.gif" alt="$vbphrase[add_a_poll]" /> <a href="poll.php?$session[sessionurl]do=newpoll&amp;t=$threadinfo[threadid]">$vbphrase[add_a_poll_to_this_thread]</a></td>
      	</tr>
      	</if>
      Add After:
      HTML Code:
      	<if condition="$vbulletin->userinfo['twitter_username']">
      	<tr>
      		<td class="vbmenu_option">
      			<a href="tweet.php?do=thread&ampid=$threadinfo[threadid]">Tweet This  Thread!</a>
      		</td>
      	</tr>
      	</if>
      Find:
      HTML Code:
      		<if condition="!$show['search_engine']">
      
      			<div><img class="inlineimg" src="$stylevar[imgdir_button]/printer.gif" alt="$vbphrase[show_printable_version]" vspace="1" /> <a href="printthread.php?$session[sessionurl]t=$threadid" rel="nofollow">$vbphrase[show_printable_version]</a></div>
      			<div><img class="inlineimg" src="$stylevar[imgdir_button]/sendtofriend.gif" alt="$vbphrase[email_this_page]" vspace="1" /> <a href="sendmessage.php?$session[sessionurl]do=sendtofriend&amp;t=$threadid" rel="nofollow">$vbphrase[email_this_page]</a></div>
      		</if>
      Add After:
      HTML Code:
      		<if condition="$vbulletin->userinfo['twitter_username']"><a href="tweet.php?do=thread&amp;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!

Download Now

File Type: zip vBTwitter v1.0.4.zip (13.2 KB, 1233 views)

Screenshots

File Type: jpeg tweet1.jpg.jpeg (81.8 KB, 0 views)
File Type: jpeg tweet2.jpg.jpeg (89.5 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #462  
Old 06-12-2009, 02:35 PM
Ohiosweetheart Ohiosweetheart is offline
 
Join Date: Dec 2005
Location: N.E. Ohio
Posts: 2,291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks sweetie.
Reply With Quote
  #463  
Old 06-13-2009, 02:22 PM
King Kovifor's Avatar
King Kovifor King Kovifor is offline
 
Join Date: Nov 2004
Location: PA
Posts: 3,872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by fmckinnon View Post
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]&amp;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 View Post
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 View Post
"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.
Reply With Quote
  #464  
Old 06-14-2009, 01:42 AM
accludetuner accludetuner is offline
 
Join Date: Jun 2009
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #465  
Old 06-14-2009, 01:46 AM
King Kovifor's Avatar
King Kovifor King Kovifor is offline
 
Join Date: Nov 2004
Location: PA
Posts: 3,872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you have any other twitter modifications installed.
Reply With Quote
  #466  
Old 06-14-2009, 02:30 AM
mykkal's Avatar
mykkal mykkal is offline
 
Join Date: May 2007
Location: Atlanta, GA
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by King Kovifor View Post
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?
Reply With Quote
  #467  
Old 06-14-2009, 02:43 AM
accludetuner accludetuner is offline
 
Join Date: Jun 2009
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by King Kovifor View Post
Do you have any other twitter modifications installed.
I do have one mod that sorta touches on twitter - OpenInviter: https://vborg.vbsupport.ru/showthrea...hlight=twitter

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.
Reply With Quote
  #468  
Old 06-16-2009, 12:05 AM
King Kovifor's Avatar
King Kovifor King Kovifor is offline
 
Join Date: Nov 2004
Location: PA
Posts: 3,872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by accludetuner View Post
I do have one mod that sorta touches on twitter - OpenInviter: https://vborg.vbsupport.ru/showthrea...hlight=twitter

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.
Reply With Quote
  #469  
Old 06-16-2009, 01:20 AM
accludetuner accludetuner is offline
 
Join Date: Jun 2009
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Email sent
Reply With Quote
  #470  
Old 06-18-2009, 03:44 AM
swiftor's Avatar
swiftor swiftor is offline
 
Join Date: Nov 2008
Posts: 118
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #471  
Old 06-18-2009, 12:28 PM
mykkal's Avatar
mykkal mykkal is offline
 
Join Date: May 2007
Location: Atlanta, GA
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.

has anyone used this new one? https://vborg.vbsupport.ru/showthread.php?t=216346
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 08:24 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09018 seconds
  • Memory Usage 2,376KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (6)bbcode_html
  • (2)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete