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
vBulletin 2 Twitter - Take Your News Straight To Twitter! Details »»
vBulletin 2 Twitter - Take Your News Straight To Twitter!
Version: .1b, by AHealthForum AHealthForum is offline
Developer Last Online: Jul 2012 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.8.1 Rating:
Released: 03-15-2009 Last Update: 03-15-2009 Installs: 132
Additional Files  
No support by the author.

vBulletin2 Twitter Courtesy A Health Forum http://ahealthforum.com
Special Thanks to Jarvis From http://seovb.com for help
vbtotwitt.php copyright Vojtech Semecky released under the terms of GPL
================================================== =========

This modification will take one of your latest news threads and post it directly to your twitter account. You must have RSS enabled for this modification to work. You can specify a forum to pull the content from using external.php?f=FORUMID

The RSS feed will post your thread title directly into your Twitter account, and then create a link back using TinyURL. The links are automatically converted into tinyurl.com links via the TinyURL API


Install instructions

1. Upload the includes folder into your forum root. This will automatically place the 2 scripts need to operate this into the "includes/cron/" folder
2. Install the product-ahealthforumcomvbtwit.xml file via the Product Manager in your adminCP
3. Navigate to vBulletin Options -> vBulletin Options -> vBulletin 2 Twitter and enter your name and password.
4. Hit Save and Wait 2 minutes
5. View your twitter account to confirm that an update was posted.
6. Enter the URL to your forum feed.

Notice: By default for testing purposes this makes one tweet announcing you've installed vB2Twitter You are free to delete this tweet as it is for testing purposes only!!!!

================================================== =============

vBulletin 2 Twitter Options

1. Twitter Username: This is your Twitter.com username. If you don't have one yet, you can get one for free at http://twitter.com

2. Twitter Password: This is your password for your twitter account. Notice that its not hashed or encypted so anyone with adminCP access can view it. If you can't trust those who have your AdminCP information with such details, then this mod isn't for you sorry.

3. Feed URL: This can be to any sites feed if you want, but I suggest pointing it to your news forum and creating a prefix such as [Breaking News] to make the most of this. Your twitter posts will then be prefixed with [Breaking News] Thread Title link to thread.

================================================== ===========


Again, this modification will take the latest thread from the forum RSS feed you specify. I don't beleive in spamming on twitter with useless crap, so I've made this modification to only take one thread at a time from your forums RSS feed.


Trouble Shooting:

If it does not automatically update to your account. Go into the scheduled tasks manage and run the task manually.

external.php gives a blank page. Enable RSS from your vBulletin Admin Control Panel.

Download Now

File Type: zip vBulletin2Twitter.zip (5.8 KB, 1254 views)

Show Your Support

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

Comments
  #102  
Old 01-31-2010, 02:38 PM
MotMann MotMann is offline
 
Join Date: Jan 2006
Location: Germany
Posts: 333
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AHealthForum View Post
AdminCP -> vBulletin Options -> External Data provider
WExternal Dat provider? I don't found that.. just "Feed- RSS, Java" Feeds settings

And what i can do, that linkbacks still be working? if i click ob linkback, then the URL goes back to my Forum.
Reply With Quote
  #103  
Old 02-16-2010, 03:28 AM
dd009 dd009 is offline
 
Join Date: Dec 2009
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hollosch View Post
thanx for this.

-1 cron-job in my vB
I am not able to download this
Reply With Quote
  #104  
Old 04-03-2010, 07:34 PM
KDawg08 KDawg08 is offline
 
Join Date: Nov 2008
Location: Washington State
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any reason it is doing this?

<![CDATA[BTN IE/FF Toolbar 2 minutes ago via API

It shows the TITLE of the update, but the title was "BTN IE/FF Toolbar" not the <!CDATA[ part...
Reply With Quote
  #105  
Old 04-23-2010, 07:59 PM
A825F933D42B A825F933D42B is offline
 
Join Date: Dec 2007
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

use my updated code so it checks if the post has already been tweeted.
Reply With Quote
  #106  
Old 05-18-2010, 10:32 AM
sweetguy2004's Avatar
sweetguy2004 sweetguy2004 is offline
 
Join Date: Feb 2007
Location: uk
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks interesting but i cannot use it coz posting adult twits i can get ban
Reply With Quote
  #107  
Old 06-13-2010, 10:51 PM
Nano_ Nano_ is offline
 
Join Date: May 2006
Location: Rio de Janeiro - Brasil
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works in 4.0.3PL1?
Reply With Quote
  #108  
Old 07-15-2010, 04:59 AM
NAZIA's Avatar
NAZIA NAZIA is offline
 
Join Date: Feb 2008
Location: Multan Pakistan
Posts: 322
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KDawg08 View Post
Any reason it is doing this?

<![CDATA[BTN IE/FF Toolbar 2 minutes ago via API

It shows the TITLE of the update, but the title was "BTN IE/FF Toolbar" not the <!CDATA[ part...
same problem is here with me.. is there any solution for this?

lol
even this bug is also there in the developer twitter

Reply With Quote
  #109  
Old 07-15-2010, 05:45 AM
NAZIA's Avatar
NAZIA NAZIA is offline
 
Join Date: Feb 2008
Location: Multan Pakistan
Posts: 322
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gordietbh View Post
here is the code I've implemented to get around the duplicate issue.

The issue arose when the latest thread was not the current status of the twitter account, so I updated the code to search the entire feed page for the thread title. It now checks the contents of your twitter page and looks for a match with the title of the first item in the RSS feed, if it finds it it does not try to repost. If it does not find a match it will call the twitter API and submit the message.

I then had an issue where it was posting <![CDATA[thread title]]. I discovered that this only occurred when there was an apostrophe in the thread title, so I added a replace command to strip out the CDATA text.

There was also an issue where if your server did not receive a response from the twitter page in a timely fashion the script would not find a match for the latest title thread and would repost. I added a line in the script to search for your account name in the page, and if it finds it then call the twitter API. This ensures that there is no more double posting.

You need to replace the contents of the twitask.php file in the includes\cron folder with the script below. You need to replace the ACCOUNTNAME text in the line http://twitter.com/ACCOUNTNAME with the name of your twitter account. this needs to be in the same case as the account name appears on your twitter page.

PHP Code:
<?php
// vBulletin2Twitter Provided Via http://ahealthforum.com
// Inspiration from Reuqests and various free open source scripts
// twitask.php may not be reproduced without prior written permission
// See vbtotwitt.php for open source script usage
// 
// Set error status
error_reporting(E_ALL & ~E_NOTICE);

// Check database connection
if (!is_object($vbulletin->db))
{
    exit;
}
include_once(
'vbtotwitt.php');
$u $vbulletin->options['vb2twitter_u'];
$p $vbulletin->options['vb2twitter_p'];
$twurl 'http://twitter.com/statuses/update.xml';
$f $vbulletin->options['vb2twitter_f']; 
$rss = new lastRSS;
if (
$rs $rss->get($f)){
    
$title $rs[items][0][title];
    
$url $rs[items][0][link];
} else { die(
'Error: RSS file not found, dude.'); }

$title str_replace("<![CDATA[""""$title"); 
$title str_replace("]]>""""$title"); 
$title str_replace("&""and""$title"); 

$tiny_url =  file_get_contents("http://tinyurl.com/api-create.php?url=" $url);
$status $title " " $tiny_url;
echo 
$status//just for status if you are directly viewing the script

$twitterfeed file_get_contents("http://twitter.com/ACCOUNTNAME");

$stringtocheckfor $title;
if(
strstr($twitterfeed,$stringtocheckfor)) {
    echo 
"<br />status update already exists";
} else {

    
$accountstring $vbulletin->options['vb2twitter_u'];
    if(
strstr($twitterfeed,$accountstring)) {

        
$curl_handle curl_init();
        
curl_setopt($curl_handle,CURLOPT_URL,"$twurl");
        
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);
        
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
        
curl_setopt($curl_handle,CURLOPT_POST,1);
        
curl_setopt($curl_handle,CURLOPT_POSTFIELDS,"status=$status");
        
curl_setopt($curl_handle,CURLOPT_USERPWD,"$u:$p");
        
$buffer curl_exec($curl_handle);
        
curl_close($curl_handle);
        if (empty(
$buffer)){echo '<br/>message';}else{echo '<br/>success';}
    
        
// log message
        
$logmsg 'Twitter Update';

        
// Output Log Status
        
log_cron_action($logmsg$nextitem);
    } else {
        echo 
'<br />twitter page not found';
    }
}


?>
If you have $cronimage in your footer template and have the twitter scheduled task set to run every minute each time a new thread is started the title will be updated. You will also need to set the refresh time on your RSS feed in vboptions to 0 if you want to ensure that every new thread is updated to your twitted feed. If the refresh time is 60 minutes you will only have the latest thread submitted every hour when the RSS cache is refreshed.

I've been running with the above script and options for the last several days and have eliminated the duplicate posting issues.
Nice work... working fine for me...
thanks a lot..

do you have any idea about the plain text password?
why we can not use

HTML Code:
  <input type="password">
in Admin Cp.
Any idea please
Reply With Quote
  #110  
Old 09-13-2010, 12:23 AM
NAZIA's Avatar
NAZIA NAZIA is offline
 
Join Date: Feb 2008
Location: Multan Pakistan
Posts: 322
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Loco.M View Post
btw, how is this different than using twitfeed?
http://twitterfeed.com/

cheers
good idea. just added my feed here... hope will work,,

Actually this mod stopped publishing feeds on twitter by 1st September. may be due to change in Twitter policies, what ever i dont know
Reply With Quote
  #111  
Old 09-13-2010, 02:36 AM
Smitty's Avatar
Smitty Smitty is offline
 
Join Date: Sep 2002
Location: Southern Ohio
Posts: 385
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Loco.M View Post
btw, how is this different than using twitfeed?
http://twitterfeed.com/

cheers
Been using twiterfeed for quite a while now. It works. Not every post is tweeted in big, active forums, but it is a very good automatic twitter feed. I have no use for twitter, but for 'SEO' purposes one should have a twitter account.
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 11:41 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04937 seconds
  • Memory Usage 2,372KB
  • Queries Executed 26 (?)
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
  • (1)bbcode_code
  • (1)bbcode_html
  • (1)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)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