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
  #312  
Old 03-27-2009, 11:30 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 taytaysdad View Post
I upgraded to 1.03 and followed directions minus

the code edits and everything seems to be linked up and working

Do I need to do the edits?

Also do I need to edit any other code?

site is www.bud101.com
Nope.

Quote:
Originally Posted by indie2industry View Post
Ok, here's the Million dollar question (literally).

I notice when you "Tweet this post", on twitter is says "Check this out!" (which I modified) and a tinyurl.com link to the post.

Is there a way to make it work with this linkbee mod:

https://vborg.vbsupport.ru/showthread.php?t=192044

So instead of converting to tinyurl.com links, they become your Linkbee.com links?
The million dollar answer is I don't do any converting once so ever. That tinyurl converting is not done by my modification.

Quote:
Originally Posted by plumbingskool View Post
Hi ,

Can I just make a simple suggestion?

Hope about just doing something like this:

PHP Code:
<a href="http://twitter.com/home?status=Currently reading <?php the_VB THREAD FUNCTION(); ?>" title="Click 
to send this page to Twitter!" target="_blank">Share on This On Twitter!</a>
AND THEN

that will bring them to twitter and they can login or it will post the message if they are already logged in as most people are all day long anyhow.

I think trying to bridge the log in is just way over board for a simple "twitter"

I love the module though, and I would just just the above to keep it simple
That won't be done as it'll be bridged in several new ways in the next update.

Quote:
Originally Posted by member007 View Post
I installed this and test it out on twitter and it posts a link to Check this out! http://tinyurl.com/dxk7kq . When I click on this link my spyware blocks it said this site is a spy site. Beware.
That's the fault of either (a) your site being considered spam or (b) tinyurl is considered SPAM. It's not my modification.
Reply With Quote
  #313  
Old 03-28-2009, 02:16 PM
jdougher jdougher is offline
 
Join Date: Jan 2007
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lima Bean View Post
With all due respect to the coder, please take my comments as intended and not as a personal attack against you or the vbTwitter mod - but really, what's the point?

I can see no point in a forum's users littering their twitter pages with a stream of Check This Out text with no description in the links of what the potential visitor might be looking at? I can't speak for other web users out there, but I don't have a tendancy to click on links just because they tell me to click here or to check this out. If you could find a way to form a better link, perhaps by pulling in the post/thread title, then this mod could be mildly useful.

Until then, I am uninstalling this mod. I wish you success as you try to get this worked out, and I would revisit this mod if you can communicate better to users what exactly the link is going to be about.

Regards,
Lima Bean

Good points.
Reply With Quote
  #314  
Old 03-28-2009, 02:34 PM
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Location: Google Kansas
Posts: 4,678
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

still didn't work for me, even on the default style
oh well, I'll try the next update
Reply With Quote
  #315  
Old 03-28-2009, 06:23 PM
Remington Remington is offline
 
Join Date: Jan 2007
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I click to Tweet a message and get this:

Quote:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/password/public_html/forums/includes/twitter.php on line 29
It appears as though I have all my requirements installed on the server.
Reply With Quote
  #316  
Old 03-28-2009, 07:11 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 Remington View Post
I click to Tweet a message and get this:



It appears as though I have all my requirements installed on the server.
Hm. Odd, as it is running on my site without problems. Mind emailing me your /includes/twitter.php file? doglover3049 @ gmail.com without spaces.
Reply With Quote
  #317  
Old 03-28-2009, 08:05 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 mykkal View Post
Hey King, how are you?

Please, if you know...I'm just wondering if you know what code I need to change so that the "tweet" title reflects the title of the post "tweeted".
For the record, this took 69 lines of code in a preliminary testing stage. With error checking it does error checking in several steps:
  1. Format Tweet with post title.
  2. Find length of tweet + link, if under 140, skip to the last number.
  3. If above 140, it uses the TinyURL API to create a shortened link and recreates the Tweet.
  4. Rechecks length, if under 140 skip to the last step.
  5. If above 140, it takes the post title and shrinks it so that the tweet is exactly 140 characters and adds a '...' to the end of the chopped off title.
  6. Send Tweet
This needs to be coded for thread titles, so it'll be at least another 69 lines of code, compared to the 10 it was before this detailed tweet functionality.
Reply With Quote
  #318  
Old 03-28-2009, 08:56 PM
mykkal's Avatar
mykkal mykkal is offline
 
Join Date: May 2007
Location: Atlanta, GA
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh i see. is it possible to release a patch for this version with this functionality?
i know the members are burning for it. It's just that 1.1 is feature packed. I wonder if it will take a good deal of time to code and debug. I realize you do this for free so your time and availability has to be considered to.

That's a major feature I'm quickly depending on your mod.
Reply With Quote
  #319  
Old 03-28-2009, 09:25 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 mykkal View Post
oh i see. is it possible to release a patch for this version with this functionality?
i know the members are burning for it. It's just that 1.1 is feature packed. I wonder if it will take a good deal of time to code and debug. I realize you do this for free so your time and availability has to be considered to.

That's a major feature I'm quickly depending on your mod.
I am no longer developing 1.0.x; it would require fundamental changes to how the plugin works, which is why I am saving it for 1.1 / 2.0.
Reply With Quote
  #320  
Old 03-28-2009, 10:38 PM
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
I am no longer developing 1.0.x; it would require fundamental changes to how the plugin works, which is why I am saving it for 1.1 / 2.0.
aah.. understood. I will shut up and wait.

Unless you need comic relief in the thread.
Reply With Quote
  #321  
Old 04-01-2009, 04:01 AM
vidan vidan is offline
 
Join Date: Feb 2008
Location: texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is it right to be posted with link not by title?
my title is only "introduce yourself" why its posted as a link in twitter? Check this out! http://myurl/tt.php?i=14444

cant change to Check this out! Introduce yourself

and the last one, why it has to be with this ess than 5 seconds ago from vBTwitter
can i change vbtwitter to WEB or myurl? i dont want ppl mislink to here.
thanks for this great mod kovivor
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 02:31 AM.


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.05218 seconds
  • Memory Usage 2,380KB
  • 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
  • (3)bbcode_php
  • (10)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