News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

RSS Feeder

Started by SlammedDime, January 11, 2009, 06:06:42 AM

Previous topic - Next topic

Afro

Ok, I got it working, I guess not every site supplies that in their source code

robg2251

I have the latest RSS feeder running on my SMF version 2.0 RC1.2.   

I have about 20 feeds going, all blogs that are posted to maybe once a day. 

The strange thing that happens is, about every 3 days, half of them get disabled.   I have to go back in and re-enable (check the enabled box) again.   

The messy part is, it floods the boards after I re-enable them.  I figured out I can just set it to "require topic approval" then delete them, so it doesn't flood the board. 

The real question though is:   Why are these becoming disabled?   It's pretty random too, like 8 of them every three days will get disabled.. not the same ones.   It's driving me crazy! 

http://www.monroetalks.com/forum/index.php

Thanks.

[edited to add a blog feed example] - http://www.blogsmonroe.com/history/feed/  or http://feeds.feedburner.com/monroenews/WPkp 

SlammedDime

Whenever a feed is disabled, an error is thrown in the error log... there are tons of reasons, so without having the error, I can't tell you.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

jcastellese

Hello, I work with Rob, I checked our log and it says that the feed isn't available, but these feeds are available in almost every case.

Here is a sample error message
http://monroetalks.com/forum/index.php?album=random&cat=0&pos=-325
Apply Filter: Only show the errors with the same message
RSS Feeder: http://www.blogsmonroe.com/faith/?feed=rss2 (A feed could not be found at http://www.blogsmonroe.com/faith/?feed=rss2)

I'm really not too sure what's causing this, so I'd love some ideas or common causes if you guys know of any off hand.

SlammedDime

Basically that error happens when SimplePie (the RSS backend of this mod) cannot read the feed because it is not a valid feed.  I tested the feed on the SimplePie website and it does appear to work on the latest version of SimplePie (which is 1.2), but the mod uses 1.1.2.  I'll be upgrading the mod shortly when RC2 is released.  Once I do that, we'll see if there are any more issues with it.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Afro

The mod places a link to the original topic before the short article it pulls. Then it place the url to the home page of the website again after the article. I just want one of the links, preferably, the one at the top. How do I remove, the SOURCE link ?

SlammedDime

In ScheduledTasks.php, just search for Source:
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Afro

#767
Quote from: SlammedDime on October 16, 2009, 09:07:48 PM
In ScheduledTasks.php, just search for Source:

// Format the post
         $message =
'' . $title . '
' . ($item->get_date() !== null ? '' . $item->get_date() . '
' : '') . '
' . $body . '

' . (!empty($source) ? 'Source: ' . $source . '

' : '') . (!empty($feed['footer']) ? $feed['footer'] : '');


which lines of codes should i remove there

SlammedDime

That entire line that contains 'Source'
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Afro

#769
Quote from: SlammedDime on October 17, 2009, 07:04:03 AM
That entire line that contains 'Source'

well  i removed

' . (!empty($source) ? 'Source: ' . $source . '

but it is still there



SlammedDime

It won't remove it from existing posts, only future ones.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Afro

#771
Ah, I see. Topic solved then

Meanwhile, is there a way to make it pull a little bit more from the article than just one or two lines. I know about the entire article <div id=  thingy. I tried it but it seems most websites don't use that kind of codes.

Is there a way to maybe pull out about hundred words or about a thousand letters from the whole article ?

Garou

You need to go to the site and have your browser look at the source code to see how they formulate their articles and find their common traits. You can then tell the mod to look for those traits. In the source most sites will use something like div, span, h1 or something like that once your looking at the HTML code used.

Afro

hmm, that sounds good. I will try.

Afro


' . (!empty($source) ? 'Source: ' . $source . '


after removing the line of code, and run the rss feed task on the schedule task, the page returns error page with unexpected string.
i wonder what is causing this



[/quote]

Garou

Whats the exact error?

Afro

#776
Quote from: Garou on October 19, 2009, 05:51:20 PM
Whats the exact error?

Parse error: syntax error, unexpected ':' in /home/afrowall/public_html/headlines/Sources/ScheduledTasks.php on line 1753


thats the error report. after removing ' . (!empty($source) ? 'Source: ' . $source . '  and running scheduled task .

file below


Garou

Hmm after testing I can confirm that it causes the error but unless I'm missing something it shouldn't. SD will have to look at it, Ive got nothing.

However looking at the line that is removed Id suggest to SD changing "Source:" to a language string to make translating into other languages easier. That of course isn't causing the error, just an observation I made while trying to figure it out.

SlammedDime

Afro, sorry, there was more to remove and I wasn't paying attention.

All of this would need to be removed...

Code (Find) Select
' . (!empty($source) ? '[b]Source:[/b] ' . $source . '

' : '') . (!empty($feed['footer']) ? $feed['footer'] : '');


Code (Replace) Select
' . (!empty($feed['footer']) ? $feed['footer'] : '');


Garou, the language string issue has been fixed a long time ago and will be reflected in the next version for 2.0 RC2.

Kizko - there's nothing I can do to help you.  If you're getting that error on the SMF file retrieval as well, I can tell with the utmost certainty that your host has incorrectly configured their DNS settings.  Nothing I can do to help, you'll have to take it up with your host.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Advertisement: