vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - vBulletin 2 Twitter - Take Your News Straight To Twitter! (https://vborg.vbsupport.ru/showthread.php?t=208488)

ZGeek 04-07-2009 08:17 AM

Quote:

Originally Posted by m0nde (Post 1771684)
Thanks for the prompt reply.

I've set it up to just read my news forum. When I view what is in that feed, I see the following:

http://www.bostonlove.org/forums/external.php?f=28

There's no sign of that "cdata" code in there.

Here's the actual twitter feed:

http://twitter.com/bostonlove

Any fix for this? I am also getting it. My feed http://twitter.com/zgeek

Linux123 04-07-2009 02:35 PM

I cant find the RSS feed url

Where do I go for this.

Brandon Sheley 04-07-2009 03:16 PM

Quote:

Originally Posted by AHealthForum (Post 1778010)
This doesn't limit you to X amount per hour.

Doesn't rely on 3rd party site that could go down

Cheers

ah I see, I've never ran into the limit on my site.
it seems like it would just be spamming twitter if your posting to many

and twitterfeed has never gone done for me, I don't know why anyone would want to make things more complicated :p
cheers dave

Spinball 04-07-2009 06:54 PM

I would rather use this mod than twitterfeed because I don't trust anyone with our twitter login details.
However, I would like it to check for new posts in several of our news forums every hour and post them to twitter. We would end up with maybe one new twitter update every couple of days tops, so it wouldn't be spamming.
If your mod can take the new posts from several forums and not create duplicate twitter updates, I would install it.
I appreciate the mod does what you need so you're not particularly motivated to amend it. But a simple table of posted thread ids would prevent duplicates.
Thanks.

skylab 04-08-2009 11:58 AM

This increased my traffic by SO much. Coming close to 1000 followers by using this and many many new registers. Thanks for the mod!!!

demojames 04-09-2009 03:10 AM

Quote:

Originally Posted by hollosch (Post 1769571)
I'm using zoints-seo, and i get "Error: RSS file not found, dude." when i use the scheduled task...

I'm using vBSEO and getting the same error. :o

Did a test post and nothing. Looked at the RSS feed in a browser it's there, but no updates to Twitter.

AzH 04-09-2009 01:24 PM

Installed and working fine. Thanks!!

Just a couple of questions though. How do I get it to pull from more than one, but not all forums. Currently I'm using .com/forums/external.php?f=4 as my feed, and I want it to be .com/forums/external.php?f=4 + 6, 7, 8, etc (but not all).

Ahh, just one question then. :)

skooby 04-09-2009 03:39 PM

Hey,
I was "sorta" able to get this working...

I did one update yesterday in the forum it is tracking and it worked. Then today I made 3 new topics, and out of the three, two showed up in Twitter. One was the same topic I did yesterday (so it posted that twice on Twitter), and one of the topics I had just made. So out of the 3 topics I made in the forum it is tracking today, 1 showed up, 1 was out of date, and 1 didn't show at all.

All 3 show if I go directly to the RSS feed page (and are the newest in the feed).

Any idea how I can troubleshoot? This tool is great, thanks for working on it.

skylab 04-16-2009 12:38 AM

<a href="https://twitter.com/nightlifevibe" target="_blank">http://twitter.com/nightlifevibe</a>
Getting a few issues
<![CDATA[ error comes up every now and then.
and sometimes duplicate twitter posts some with errors and some not. you can take a look at my twitter to see whats going on.

Flep 04-17-2009 11:25 AM

I get CDATA issue too

A825F933D42B 04-19-2009 03:41 PM

my server does not support curl. Is there a no-curl option?

skylab 04-21-2009 12:32 PM

It's not a huge issue but hopefully the CDATA gets fixed sooner or later.

SBlueman 05-02-2009 05:35 PM

Will this work at all for v3.6.12? I tried it and got the CDATA issue too. Might it have something to do with thread prefixes?

beachinxj 05-03-2009 02:04 PM

Is there any way to make it not do duplicate threads other than increasing the time between script runs?

fbriceno97 05-04-2009 03:05 AM

Got same error:

Error: RSS file not found, dude, when using the scheduled task... external.php is perfectly working as we have it on viigo, php5.... everything is ok, but that error is present.

How do i solve it?

kalliey 05-07-2009 09:21 PM

Hy thanks for this great Hack! :-)

I´ve only one problem, my letters Ö,Ü,Ä dont´t send to twitter, how can i fix this?

sevkotr 05-13-2009 12:59 PM

turkish characters can not be sent to twitter via this mod. is there anything which i can do to fix this?

i changed utf-8 to latin5 but did not worked.

just77me 05-14-2009 09:09 AM

i get many duplicate threads to twitter - whats going wrong there? if there is no solution - i have to uninstall this twitter tool because i dont want to flood twitter with duplicate content and delete ist manual.

any ideas?

thank you

Vanjezi 05-15-2009 03:34 PM

Can u make to all rss?

Its missing a lot threads posts

gordietbh 05-16-2009 05:27 PM

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.

chatzworld 05-17-2009 11:50 AM

i have installed but twitter comes up with ERROR int he updates?

Ohiosweetheart 05-22-2009 02:48 PM

This is a good idea. I'll be trying it out over the weekend.

BackSideSA 05-25-2009 04:12 AM

worked for me!

GrossKopf 05-25-2009 12:25 PM

Well, other people have posted this, but there's been no reply, so I'll post it too.

My RSS feed is correct: http://flotgaming.net/forums/external.php?f=43

If I run the task manually, I get the error: Error: RSS file not found, dude

Any fix for this?

BackSideSA 06-02-2009 04:00 AM

correction... only works some of the times... i sometimes find that a single thread is posted up to 15 times in a row... most of the time it works, just not as frequent as i hoped.

Kolbi 06-06-2009 07:24 AM

When i manually do the cron, I?m getting this failure message:
Quote:

vBulletin to Twitter Task
ASS Stellmotor defekt ? http://tinyurl.com/o25xch
Fatal error: Call to undefined function curl_init() in /mnt/web5/32/91/5940491/htdocs/includes/cron/twitask.php on line 28

SegWayne 06-06-2009 02:31 PM

First, thanks for the mod.

My question is this.. I have 10 different "news forums" segmented by category (see http://www.amiga.org).

ie:
----
Amiga News and Community Announcements (http://amiga.org/forums/external.php?f=2)
- Amiga Events (http://amiga.org/forums/external.php?f=35)
- Amiga.org site announcements (http://amiga.org/forums/external.php?f=16)

.... and so forth.

The problem is that the primary (container) forum is #2, but http://www.amiga.org/forums/external.php?f=2 does not show any of the RSS feeds for its sub-forums.

I need a way to select multiple forum feeds for broadcast to twitter, but NOT have to show all of the forums on the site, since all other forums are used for general discussion.

Thanks,

Wayne Hunt
Amiga.org

SegWayne 06-06-2009 02:41 PM

Quote:

Originally Posted by raaowdot (Post 1769657)
I've resorted to using the twitterfeed.com

Sorry for the off topic here, but I am running 3.8.2 with RSS enabled. That part works, but no matter what I do, I cannot get twitterfeed to "parse the RSS URL". It refuses, no matter whether I use;

http://www.amiga.org/forums/external.php?f=38&type=rss
http://www.amiga.org/forums/external.php?f=38&type=rss2
http://www.amiga.org/forums/external.php?f=38&type=xml

or even

http://www.amiga.org/forums/external.php

Says something about "netscape stopped supporting this DTD in 2007" when I use RSS, otherwise, gives no ideas WHY it won't validate.

If I can't submit multiples through the request above this one, I sure would appreciate some help trying to figure out why twitterfeed hates me :)

Thanks,

Wayne Hunt
Amiga.org

Kolbi 06-08-2009 11:46 AM

Quote:

Originally Posted by Kolbi (Post 1824342)
vBulletin to Twitter Task
ASS Stellmotor defekt ? http://tinyurl.com/o25xch
Fatal error: Call to undefined function curl_init() in /mnt/web5/32/91/5940491/htdocs/includes/cron/twitask.php on line 28

My problem isn?t solved yet.

SegWayne 06-09-2009 10:43 AM

Quote:

Originally Posted by SegWayne (Post 1824493)
First, thanks for the mod.

My question is this.. I have 10 different "news forums" segmented by category (see http://www.amiga.org).

ie:
----
Amiga News and Community Announcements (http://amiga.org/forums/external.php?f=2)
- Amiga Events (http://amiga.org/forums/external.php?f=35)
- Amiga.org site announcements (http://amiga.org/forums/external.php?f=16)

.... and so forth.

The problem is that the primary (container) forum is #2, but http://www.amiga.org/forums/external.php?f=2 does not show any of the RSS feeds for its sub-forums.

I need a way to select multiple forum feeds for broadcast to twitter, but NOT have to show all of the forums on the site, since all other forums are used for general discussion.

Thanks,

Wayne Hunt
Amiga.org

:bump:

SBlueman 06-10-2009 11:05 AM

Quote:

Originally Posted by gordietbh (Post 1811982)
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.

How do you set this to 0?

Bram H 06-11-2009 07:11 AM

Pretty annoying that this message pops up for so many people:
Quote:

Error: RSS file not found, dude
If this mod is supported why isnt there any reply from the dev in months? Don't want to sound ungrateful or something, i respect all that can create such fantastic vB mods, but this sounds like a graveyard modification to me, sorry

***uninstalled***

SBlueman 06-12-2009 12:59 AM

Quote:

Originally Posted by Kolbi (Post 1824342)
When i manually do the cron, I?m getting this failure message:

I am getting the same kind of error:
Quote:

vBulletin to Twitter Task
[Rams] Rams Pass On RB's Edgerrin James, Warrick Dunn? http://tinyurl.com/l4laoz
Fatal error: Call to undefined function curl_init() in /home/sblueman/public_html/forums/includes/cron/twitask.php on line 44
***UPDATE***

I was able to fix this error by adding cURL to apache.

SBlueman 06-12-2009 03:15 AM

I do have another question.....right now the cron job runs once a minute on my site....but it will only post 1 story per minute. There are times on my site that we may break multiple NFL news stories in that time span (we have a staff of news hounds). Is there a way for this modification to make sure it posts ALL missing stories in that minute span?

FYI....I am using the twitask.php file that gordietbh posted on page four of this thread.

Kolbi 06-12-2009 10:23 AM

Quote:

Originally Posted by SBlueman (Post 1828001)

I was able to fix this error by adding cURL to apache.

The problem is that i?m running my board on a hostet package.

A825F933D42B 06-12-2009 08:39 PM

I added the following code:
Code:

$title = utf8_encode ($title); //for the bloody umlaute
just after the lines fixing the CDATA-issue. Now, all Umlaute and special characters will be submitted to Twitter. Just if it helps someone else too

Kolbi 06-13-2009 06:27 AM

Quote:

Originally Posted by A825F933D42B (Post 1828573)
I added the following code:
Code:

$title = utf8_encode ($title); //for the bloody umlaute
just after the lines fixing the CDATA-issue. Now, all Umlaute and special characters will be submitted to Twitter. Just if it helps someone else too

Bist deutsch oder? :)
Welche Datei und welche Zeile?
Ja die Umlaute sind wohl das Problem.

ade5675 06-13-2009 10:11 PM

It works for me so far ...... but I will keep an eye for all those mentioned issues in the next few days.

Nice mod !

ryancooper 06-17-2009 12:48 PM

Quote:

Originally Posted by gordietbh (Post 1811982)
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.

Do you mean the Cache Lifespan? I didn't see a refresh... :confused:

SBlueman 06-18-2009 12:48 PM

Quote:

Originally Posted by GrossKopf (Post 1816798)
Well, other people have posted this, but there's been no reply, so I'll post it too.

My RSS feed is correct: http://flotgaming.net/forums/external.php?f=43

If I run the task manually, I get the error: Error: RSS file not found, dude

Any fix for this?

I moved to a new box and all the setting are completely the same. However, I am now also getting the same error message.


All times are GMT. The time now is 01:33 PM.

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.01500 seconds
  • Memory Usage 1,871KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete