vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   NEW Modified RSS News Feed Hack (https://vborg.vbsupport.ru/showthread.php?t=63798)

Deimos 06-29-2004 01:22 AM

Fixed it, for some reason it didn't like my user id being the reporter, as soon as I set it to a new user I setup, it started posting ok.

I now have a new problem (yay...)
I accidently overwrote my forum index file with the one from the vbadvanced page...no problem, I restored it
But as soon as I load the forums, I get....

Quote:

Deimos: Fatal error: Call to undefined function: build_new_post() in /home/deimos/public_html/forums/includes/RSS/rss_update.php on line 103
Anyone know why? I haven't changed any files
If I disable the news bots, it loads ok, but if I enable it, it breaks
Er...

Slapyo 06-29-2004 01:52 AM

ya, like gmtalk said ... sometimes the news feeds are not updated very often, maybe once or twice a week. what is the rss feed you are using. which website is it coming from?

Slapyo 06-29-2004 01:54 AM

hrm trying getting a new copy of /includes/functions_newpost.php and re-editing the files.

Deimos 06-29-2004 02:22 AM

Thanks slap, it was my mistake, I uploaded an old version of the index file which called the rss_update file

Btw, I have a question for you
I've installed or setup an RSS type news ripper, which grabs news from a URL..
It then puts this info into an RDF file
I've tried pointing the RSS news feed to this file, but it doesn't add the contents to the forum
The layout of the RDF file is....

Quote:

Content-Type: text/html

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://my.netscape.com/rdf/simple/0.9/">

<channel>
<title>ORIGIN - Ultima Online - Main</title>
<link>http://update.uo.com/fyi.html</link>
<description>FYI</description>
</channel>
<item>



&nbsp; <b>Ultima Registration Server Downtime</b>


Jun 25 2004 6:02PM CST (GMT -06:00)&nbsp;


<item>



Beginning at 10:00PDT on Friday, June 25th the Ultima Registration and account management servers may experience approximately 1 hour of downtime for maintenance.



</rdf:RDF>
The script i'm using to grab the news is....

http://www.openconcept.on.ca/guide-html2rdf.phtml

Now, i'm guessing it doesn't like the layout of the RDF file somehow, as it just won't add what's in there to my forum
The RSS does work aok for other news things like yahoo news etc, but not this custom thing.....

Any ideas ?

Deimos 06-29-2004 02:26 AM

By the way, if i'm asking for to much, I apologise

rsuplido 06-29-2004 03:05 PM

Have you all tried adding a feed coming from a VB3 RSS2 feed? It can't extract it. :( Any workaround?

rsuplido 06-29-2004 05:01 PM

Quote:

Originally Posted by Deimos
Thanks slap, it was my mistake, I uploaded an old version of the index file which called the rss_update file

Btw, I have a question for you
I've installed or setup an RSS type news ripper, which grabs news from a URL..
It then puts this info into an RDF file
I've tried pointing the RSS news feed to this file, but it doesn't add the contents to the forum
The layout of the RDF file is....



The script i'm using to grab the news is....

http://www.openconcept.on.ca/guide-html2rdf.phtml

Now, i'm guessing it doesn't like the layout of the RDF file somehow, as it just won't add what's in there to my forum
The RSS does work aok for other news things like yahoo news etc, but not this custom thing.....

Any ideas ?

I'm getting the same problem and it seems like the includes\class.RSS.php file, supports only RSS 0.91. Also, if you look at your example, <channel> and </channel> is declared above. Usually <item></item> are in between the <channel></channel> tags. You might want to do some tweaking on the class.RSS.php file and remove the <channel> test.

Regards.

Deimos 06-29-2004 08:18 PM

Remove the channel test? hmm

Slapyo 06-29-2004 10:16 PM

goes like this:

Code:

<channel>
        <item>
                <title></title>
                <link></link>
                <pubDate></pubDate>
                <description></description>
        </item>
</channel>

that is the format that it follows, if there are more items, they go between the <channel> tags.

for now, this is just a RSS feed. i haven't had time to look into adding different kinds of feeds like RDF or ATOM. i might if i get some time.

Deimos 06-30-2004 08:44 AM

Thanks Slap, it'd be awesome if you could..

Bobby S 07-01-2004 09:17 PM

Quote:

Originally Posted by Deimos
Thanks Slap, it'd be awesome if you could..

Slapyo,

Just to let you know that I can know pick up the Scotsman feeds that were previously a problem - the ones with the ' in them. It doesnae remove the spurious characters, but it doesnae duplicate, and it picks up the new items. Godsend and Top work fellow!

I'm now having problems with other feeds not adding anything new in. I know there could be a million reasons for this, so I'll report back when I've investigated a bit more so as not to waste your time.

Thanks again, an appreciative php tube :)

Slapyo 07-01-2004 09:35 PM

bobby, go ahead and post the links. maybe someone else will know or can look at it, or i can check it out as well. get a few heads in on this thinking about it.

gmtalk 07-02-2004 03:09 AM

I have been playing around and testing this. For the longest I was not having duplicate posts/threads for certain feeds and was only having problems with one feed duplicating. Now it is going nuts. I downloaded the latest version, removed the version that was in there and put in this latest one.

Feeds I am having issues with.

http://rss.crash.net/crash_1.xml (F1 Racing feed)

and

http://www.just-auto.com/affiliates/features_rss.asp

Now I have had issues with that just auto feed before and it cleared up, but now just came back last night. The crash.net feed is wierd. I have 4 other crash feeds that are not having any issues and have updated through out the day. It is only screwing up on the one listed above and only repeating one thread over and over, not everyone off that feed. The one repeating has not been updated on their site at all and is actually a few days old.

Natch 07-02-2004 03:52 AM

Do other RSS readers have the same problem ? with it constantly updating ?

gmtalk 07-02-2004 05:39 AM

Quote:

Originally Posted by Natch
Do other RSS readers have the same problem ? with it constantly updating ?


I have been testing that out and I would have to say no on the crash.net. The Just-auto did it only 2 times in the last week(checked for updates hourly just like the forum), but on my test forums it hit every call.

Deimos 07-02-2004 08:57 AM

Has anyone else had a problem where the rss just stops updating?
It was working ok, then suddenly it stopped reporting on the 29th of June, yet nothing has changed?
The news feed I was getting was the bbc one.

sjau 07-02-2004 11:25 AM

Where can I actually change the "View the entire article" to something else?

Bobby S 07-02-2004 02:00 PM

Quote:

Originally Posted by Slapyo
bobby, go ahead and post the links. maybe someone else will know or can look at it, or i can check it out as well. get a few heads in on this thinking about it.

I've added seperate users for each newsfeed [a list of ex girlfriends, top idea I thought] and the all post into my forum here:

http://www.masshibsteria.com/vb/forumdisplay.php?f=2

Now the Scotsman feed [Gillian] works perfectly http://www.masshibsteria.com/vb/showthread.php?t=7560
http://sport.scotsman.com/football_h...cfm?format=rss

*since the last updated release, it duplicated prior to that

The Official Hibs website feed [Caroline] used to work perfectly, but since the file update it doesnae work. I ran the first cron job and it took the feeds, but since then nothing
http://www.masshibsteria.com/vb/showthread.php?t=7504
http://www.hibs.org.uk/news/index.xml

I've also added a bbc feed [Belinda] which has the same problems as the Official feed.
http://www.masshibsteria.com/vb/showthread.php?t=7496
http://news.bbc.co.uk/rss/sportonlin...ian/rss091.xml

****Now I think about it, I edited some code earlier in the thread, so as not to check for time: That might be the problem, so I'll go back and change it.******

Edit: I don't think that's the problem https://vborg.vbsupport.ru/showpost....&postcount=272 - I've overwritten that file with the new one. :(

Slapyo 07-05-2004 08:41 PM

been busy this weekend, will have a better chance to look at all this on tuesday sorry.

Bobby S 07-06-2004 07:38 AM

Quote:

Originally Posted by Slapyo
been busy this weekend, will have a better chance to look at all this on tuesday sorry.

No rush Donnie: if you can when you can would be most appreciated.

Getting the scotsman one to work was a BIG help for me, thank yous.

Slapyo 07-07-2004 02:25 PM

ok bobby, i have looked at the feeds. the 2 that are not working do not have a pubDate field. the new code in 1.26 changed how a news feed was marked as "old". instead of having to match the pubDate AND the title. now it has to match the pubDate OR the title. so if there is no pubDate, no worries...it can still match the title.

it could be that those news feeds aren't updated frequently? not sure. the only thing i noticed was that the feeds not having pubDate.

scottct1 07-07-2004 07:33 PM

Ok I need help...

I run a SatelliteTV related Website, I only want to pull news relating to SatelliteTV, so in this regard lets say we want news on DirecTV.

I found the following search below which pulls all the DirecTV news.

http://www.rocketnews.com/news/Rocke...=directv&age=0

The problem is it does not pull the description, instead all's that I see in the message is VIEW THE ENTIRE ARTICLE.

How do I get it to show the descrption that is included.

Thanks

Slapyo 07-08-2004 12:45 AM

that is using rss 2.0 and i think the version of rss that is supported in the script right now is .91.

rss .91:
Code:

<channel>
        <item>
                <title></title>
                <link></link>
                <pubDate></pubDate>
                <description></description>
        </item>
</channel>

rss 2.0:
Code:

<channel>
        <item>
                <title></title>
                <link></link>
                <pubDate></pubDate>
                <description><![CDATA[    ]]></description>
        </item>
</channel>

although it should still work and your description would include CDATA stuff in them. not sure why the description is not coming up.

Bobby S 07-08-2004 10:36 AM

Quote:

Originally Posted by Slapyo
ok bobby, i have looked at the feeds. the 2 that are not working do not have a pubDate field. the new code in 1.26 changed how a news feed was marked as "old". instead of having to match the pubDate AND the title. now it has to match the pubDate OR the title. so if there is no pubDate, no worries...it can still match the title.

it could be that those news feeds aren't updated frequently? not sure. the only thing i noticed was that the feeds not having pubDate.

Both feeds are updated daily, almost without fail. I'll have a look into anything I may have changed that might affect them.

Cheers D.

:up:

Slapyo 07-08-2004 02:38 PM

lemme know if you figure anything out. i'll keep lookin at it as well.

sjau 07-10-2004 07:30 AM

Quote:

Originally Posted by Deimos
Has anyone else had a problem where the rss just stops updating?
It was working ok, then suddenly it stopped reporting on the 29th of June, yet nothing has changed?
The news feed I was getting was the bbc one.

Mine stopped also. It displays: Next update on July 08 2004 12:45

What message should appear if you run it manually from the admincp?

And where can I change that "View entire article"?

notorious 07-10-2004 03:22 PM

Would someone be able to help with this:
I'm getting the following errors whe I tr to run the schedule task:

Warning: main(./rss.php): failed to open stream: No such file or directory in /homepages/4*/d********/htdocs/forum/admincp/cronadmin.php on line 56

Fatal error: main(): Failed opening required './rss.php' (include_path='.:/usr/local/lib/php') in /homepages/4*/d*******/htdocs/forum/admincp/cronadmin.php on line 56

This is what I have on line 56:
require_once($nextitem['filename']);

and I'm getting this on the rss.php:

Fatal error: Call to undefined function: log_cron_action() in /homepages/4*/d********/htdocs/forum/Rss.php on line 7

Which is:
log_cron_action('RSS News Feed Posted', $nextitem);

Any Help would be appriciated

smsmasters 07-10-2004 04:43 PM

Quote:

Originally Posted by sjau
Mine stopped also. It displays: Next update on July 08 2004 12:45

What message should appear if you run it manually from the admincp?

And where can I change that "View entire article"?

Same here, I've checked the BBC news feeds url manually and there are new news on it. However the news feed bot doesnt update, it's been 1 week now! The yahoo news feed works ok tho.

RS25com 07-11-2004 09:54 PM

So does this work on 3.03? I'm thinking about installing, but want to be sure before I do! :D

Slapyo 07-12-2004 03:27 PM

check to see if the BBC news feed changed their format. if they have that might be the cause of the problem.

@notorious, the only thing i can tell you is to double and triple check that you uploaded the files to the proper locations as well as made the proper file edits.

@RS25.com, it should work on 3.03 ... as long as there are no major changes to the forum it should work on any 3.x i'm thinking.

sjau 07-12-2004 03:32 PM

@ slapyo

all I can say is that it fetched the first time data from "my" news feed and never since on 3.0.2. Not even when triggered manually from the admin center.
Furthermore where can I change that text "View entire article?"?

mrboz 07-12-2004 09:41 PM

i have the same problem with it not updating too.

i have tried 2 different feeds from the bbc news website and another feed from a different site.

the first time you get the news it works very well, but it doesn't update anymore. i have checked the bbc feeds and they have been updated and i tried another feed with news on it and that didn't work at all.

Slapyo 07-13-2004 01:14 PM

hrm, i'm not sure. everything should be working fine as no major updates have been done to anything that would affect the script. i'll look at it some more.

@sjau, you can edit the View entire article in rss_update.php

rsuplido 07-13-2004 03:08 PM

Here's a workaround that I did to parse VB RSS2 streams (item titles with CDATA):

Open <forum dir>/includes/RSS/class.RSS.php (please backup original first)

Look for:
Code:

$channelCount = preg_match_all("|<channel>(.*)</channel>|iUs",$data,$channels,PREG_SET_ORDER);
Replace with:
Code:

$channelCount = preg_match_all("|<channel*>(.*)</channel>|iUs",$data,$channels,PREG_SET_ORDER);
Look for :
Code:

                        if(preg_match_all("|<title>(.+)</title>|iUs",$itemData,$match,PREG_SET_ORDER))
                        {
                                $title = $match[0][1];
                                $this->CHANNELS[$channelID]['ITEMS'][$itemID]['TITLE'] = "$title";
                        } else {
                                $this->CHANNELS[$channelID]['ITEMS'][$itemID]['TITLE'] = "";
                        }

Replace with:
Code:

                        if(preg_match_all("|<title><\!\[CDATA\[(.+)\]\]></title>|iUs",$itemData,$match,PREG_SET_ORDER))
                        {
                                $title = $match[0][1];
                                $this->CHANNELS[$channelID]['ITEMS'][$itemID]['TITLE'] = "$title";
                        } else {
                                if(preg_match_all("|<title>(.+)</title>|iUs",$itemData,$match,PREG_SET_ORDER))
                                {
                                        $title = $match[0][1];
                                        $this->CHANNELS[$channelID]['ITEMS'][$itemID]['TITLE'] = "$title";
                                } else {
                                        $this->CHANNELS[$channelID]['ITEMS'][$itemID]['TITLE'] = "";
                                }
                        }

Look for:
Code:

$itemCount = preg_match_all("|<item>(.*)</item>|iUs",$channelData,$items,PREG_SET_ORDER);
Replace with:
Code:

$itemCount = preg_match_all("|<item*>(.*)</item>|iUs",$channelData,$items,PREG_SET_ORDER);
I did the these changes to parse another VB3 enabled site and it's been working for several weeks now.

Regards.

mrboz 07-13-2004 07:04 PM

it seems to be only "BBC News" feeds that are not updating. i'm using a reuters feed now and it's working perfectly

jribz 07-14-2004 01:46 AM

Hello,

First I'd like to thank everyone invoilved in this hack, very nice work.

Secondly I have a question. I am using the hack flawlessly to post from a custom rss feed from my own site which delivers the entire article, not just a link to it.

The problem is the bot delivers the article in one large block of text without formatting it onto paragraphs and line breaks. When the rss feed is viewed in a reader such as Sharpreader it formats fine.

Is there any way to get this to format in a more user friendly fashion for those us of who actually have live rss feeds with the entire story inside them?

If someone is willing to take a look I will PM the feed url to you as well as my site url.

Thanks for your time.

Slapyo 07-14-2004 02:47 AM

you can PM me the feed if you like or you can just post it on here. i'm sure anyone that can help will.

jribz 07-14-2004 03:11 AM

OK, thanks for the reply.

Rather than get into a PM exchange, I'll just post the info here since it may help others as well. :nervous:

The site I run is Xbox Solution located at http://www.xboxsolution.com

We have two rss feeds, one that will post a link and another that will write out the story.

First RSS Feed (Link Only): http://www.xboxsolution.com/backend.php

Second RSS Feed (Full Story):http://www.xboxsolution.com/index.rss

I am using the second RSS feed for the bot - and all is well except that when the bot posts the story it posts everything in one block, no line breaks.

If you point an rss reader such as Sharpreader to http://www.xboxsolution.com/index.rss you will see that the output is fine, with line breaks where needed,

Just wondering if there is any way to resolve this.

The forum that my bot posts in is here: http://talk.xboxsolution.com/forumdisplay.php?f=48

The bot's user ID is here: http://talk.xboxsolution.com/member.php?userid=28095

Thanks for the help!

Slapyo 07-14-2004 06:22 AM

here is where i ran into the same problem when coding this. i couldn't find out how to insert a breakline. everytime i put in /r/n it would actually put those characters into it. this was for inserting the description then 2 lines down putting the link. i had to come up with a work around for that.

Code:

Open up your replacement variable manager (in admincp -> styles & templates -> replacement variable manager) and add the following entry:
Style: [select whichever style you are using]
Search for text: {br}
Replace with text: <br />


DS MrSinister 07-14-2004 06:35 AM

looks like a kewl hack... i will giive it a try!!


All times are GMT. The time now is 06:55 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.01625 seconds
  • Memory Usage 1,858KB
  • 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
  • (10)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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