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
  #542  
Old 07-16-2009, 12:36 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 barcena View Post
Hum... lenme double check.

Know what I will uninstall and install the product again. Thanks King, I will let you know.

Update:

King bear with me here please (or any other member willing to help me out) as I'm not expert or anything. The file named Upload.. when I try to upload anything from there it will give me an error, it only allows me to upload (trought products and plugins) the XML file. What should I do step by step please?.

Meaning, there's a file named vBTwitter v1.0.4==>Upload file/product XML==>Images/Includes/4 other files==>etcetc

When you say What are the directories? Sorry about my ignorance but I want to learn and do it myself.

Thanks
The upload folder is set up as a root folder. They need to be uploaded looking in the structure. So if you go into your forum root on your site through ftp, the 4 files go there. Then you go into /includes/ and upload those, etc.
Reply With Quote
  #543  
Old 07-17-2009, 01:38 PM
fmckinnon fmckinnon is offline
 
Join Date: Jun 2008
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK - installed, and working perfectly.

Now, please tell us where we can make modifications:
1 - how to change the "Tweet This Post" wording, and/or add a "Tweet This" graphic.
2 - how to change the location of #1 above.
3 - how to change the default "Check this out" text.

Thanks a million!
Reply With Quote
  #544  
Old 07-18-2009, 02:41 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 fmckinnon View Post
OK - installed, and working perfectly.

Now, please tell us where we can make modifications:
1 - how to change the "Tweet This Post" wording, and/or add a "Tweet This" graphic.
2 - how to change the location of #1 above.
3 - how to change the default "Check this out" text.

Thanks a million!
1 & 3 = phrases. Search for phrase varnames starting with twitter_. 2 is a bit harder... It'll be much easier in the next version (right now, it searches the code). You could put the code in manually.
Reply With Quote
  #545  
Old 07-18-2009, 02:25 PM
scottjonesqpr scottjonesqpr is offline
 
Join Date: Mar 2009
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wonder if anyone can help.

I have this installed on my forum but get this

Fatal error: Call to undefined function curl_init() in /home/default/wearetherangersboys.com/user/htdocs/forum/includes/class_twitterOAuth.php on line 115
Reply With Quote
  #546  
Old 07-18-2009, 02:25 PM
scottjonesqpr scottjonesqpr is offline
 
Join Date: Mar 2009
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry, thats what the page shows when i hit "tweet this post"
Reply With Quote
  #547  
Old 07-18-2009, 02:27 PM
fmckinnon fmckinnon is offline
 
Join Date: Jun 2008
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

King - OK, got #1 and #3 done - check it out - I'm using a graphic now, instead of the text:
http://www.theworshipcommunity.com/f...e-million.html.

On #3 - I'm not afraid of tweeking the code to add manually, just now sure where to pull the actual code from, and where to insert it ...

A couple of new questions:
1 - now that I'm authorized, when I tweet a post or thread, I get no confirmation or any indication that it happened. It *DOES* happen, but as soon as I click on "Tweet This ...", the page reloads and there is no confirmation. As a result, I fear that our users will think it's broken, and will keep clicking the "Tweet This" over and over. Where am I supposed to be seeing a confirmation, or is this something that has to be enabled?

2 - because of the way the single post looks - I'd rather ONLY give the option to "tweet this thread" ... how can I change the code so that in the post headers, it's the "tweet this thread" option INSTEAD of the "tweet this post" option?

3 - when I did the initial oauth authorization, I was logged into the wrong twitter account. How can I deauthorize my twitter account with my userID and start over re-authorizing with my other twitter ID?

Thanks in advance!
FRED
Reply With Quote
  #548  
Old 07-18-2009, 02:49 PM
scottjonesqpr scottjonesqpr is offline
 
Join Date: Mar 2009
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd really like some help on this - trying to figure it out on my own but im struggling - i love this feature and it DID work before the upgrade

sorry for being a numpty
Reply With Quote
  #549  
Old 07-18-2009, 03:03 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 scottjonesqpr View Post
Wonder if anyone can help.

I have this installed on my forum but get this

Fatal error: Call to undefined function curl_init() in /home/default/wearetherangersboys.com/user/htdocs/forum/includes/class_twitterOAuth.php on line 115
You don't have cURL installed on your server. COntact your host.

Quote:
Originally Posted by fmckinnon View Post
King - OK, got #1 and #3 done - check it out - I'm using a graphic now, instead of the text:
http://www.theworshipcommunity.com/f...e-million.html.

On #3 - I'm not afraid of tweeking the code to add manually, just now sure where to pull the actual code from, and where to insert it ...

A couple of new questions:
1 - now that I'm authorized, when I tweet a post or thread, I get no confirmation or any indication that it happened. It *DOES* happen, but as soon as I click on "Tweet This ...", the page reloads and there is no confirmation. As a result, I fear that our users will think it's broken, and will keep clicking the "Tweet This" over and over. Where am I supposed to be seeing a confirmation, or is this something that has to be enabled?

2 - because of the way the single post looks - I'd rather ONLY give the option to "tweet this thread" ... how can I change the code so that in the post headers, it's the "tweet this thread" option INSTEAD of the "tweet this post" option?

3 - when I did the initial oauth authorization, I was logged into the wrong twitter account. How can I deauthorize my twitter account with my userID and start over re-authorizing with my other twitter ID?

Thanks in advance!
FRED
Quote:
Originally Posted by fmckinnon View Post
Update on my post above - here's what I did ... I went to twitter.com and logged in as the user I do NOT want the tweets to post to - went to Settings > Connections, and revoked my VBTwitter app.

So now, when logged in as that user, it doesn't post to Twitter because of this, but the userID in vbulletin doesn't "know" it needs to be re-auth with a different account - when I attempt to use the "tweet this" links, I'm wanting to get a new oauth process, but nothing happens - how can I reset that userID in vbulletin to start over w/ oauth?
Well to answer them both. Tweet this post: do you want it as part of the thread? There's a switch for that. For the resetting, I believe you can reauthorize through the settings using the correct user information. Just go to twitter_auth.php again. (Not tested). And nice image. And there's no confirmation in v1.0. It was a dumb design. And in v1.1 I plan on trying to add a little check mark through AJAX.
Reply With Quote
  #550  
Old 07-18-2009, 03:05 PM
fmckinnon fmckinnon is offline
 
Join Date: Jun 2008
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

King,
Thanks ... I just deleted my followup ... I revoked permissions in Settings > Connections on the wrong twitter account, and then manually went into phpmyadmin and deleted the oauth info from my user profile in the mySQL database - maybe that wasn't the easy way, but it worked. Now, I went to tweet it and got the oauth, which i did on my correct account.

Is there a way to make it NOT do the "I have successfully setup ..." tweet on the first post? Users won't understand that they have to do their first "tweet this" twice - once for the oauth, and again for the actual post.
Reply With Quote
  #551  
Old 07-18-2009, 03:08 PM
scottjonesqpr scottjonesqpr is offline
 
Join Date: Mar 2009
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have curl installed appara, i checked and they said 101% i do?

if they're lieing to me (wouldnt surprise me) is there an idiots guide of how to do that?

cheers
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:33 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.08865 seconds
  • Memory Usage 2,375KB
  • 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
  • (6)bbcode_html
  • (2)bbcode_php
  • (5)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
  • (3)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