Advertisement:

Author Topic: RSS Feeder  (Read 375293 times)

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: RSS Feeder
« Reply #760 on: October 14, 2009, 06:38:02 PM »
Ok, I got it working, I guess not every site supplies that in their source code

Offline robg2251

  • Jr. Member
  • **
  • Posts: 117
Re: RSS Feeder
« Reply #761 on: October 15, 2009, 09:02:17 AM »
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 

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,276
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
Re: RSS Feeder
« Reply #762 on: October 15, 2009, 05:49:05 PM »
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...
                     

Offline jcastellese

  • Semi-Newbie
  • *
  • Posts: 31
Re: RSS Feeder
« Reply #763 on: October 16, 2009, 02:08:38 PM »
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.

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,276
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
Re: RSS Feeder
« Reply #764 on: October 16, 2009, 05:57:51 PM »
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...
                     

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: RSS Feeder
« Reply #765 on: October 16, 2009, 08:06:59 PM »
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 ?

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,276
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
Re: RSS Feeder
« Reply #766 on: October 16, 2009, 09:07:48 PM »
In ScheduledTasks.php, just search for Source:
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: RSS Feeder
« Reply #767 on: October 17, 2009, 06:55:18 AM »
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
« Last Edit: October 17, 2009, 07:02:49 AM by Afro »

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,276
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
Re: RSS Feeder
« Reply #768 on: October 17, 2009, 07:04:03 AM »
That entire line that contains 'Source'
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: RSS Feeder
« Reply #769 on: October 18, 2009, 11:03:04 AM »
That entire line that contains 'Source'

well  i removed

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

but it is still there


« Last Edit: October 18, 2009, 11:14:18 AM by Afro »

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,276
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
Re: RSS Feeder
« Reply #770 on: October 18, 2009, 03:09:47 PM »
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...
                     

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: RSS Feeder
« Reply #771 on: October 19, 2009, 06:16:22 AM »
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 ?
« Last Edit: October 19, 2009, 06:20:52 AM by Afro »

Offline Garou

  • Sr. Member
  • ****
  • Posts: 759
  • Gender: Male
  • On Hiatus.
    • Balance Games
Re: RSS Feeder
« Reply #772 on: October 19, 2009, 03:09:15 PM »
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.

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: RSS Feeder
« Reply #773 on: October 19, 2009, 04:04:52 PM »
hmm, that sounds good. I will try.

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: RSS Feeder
« Reply #774 on: October 19, 2009, 05:08:10 PM »

' . (!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]

Offline Garou

  • Sr. Member
  • ****
  • Posts: 759
  • Gender: Male
  • On Hiatus.
    • Balance Games
Re: RSS Feeder
« Reply #775 on: October 19, 2009, 05:51:20 PM »
Whats the exact error?

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,855
  • Gender: Male
  • http://twitter.com/afrowall
    • Global Runs
Re: RSS Feeder
« Reply #776 on: October 20, 2009, 05:32:25 AM »
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
« Last Edit: October 20, 2009, 05:36:22 AM by Afro »

Offline kizko

  • Full Member
  • ***
  • Posts: 405
    • PSP-Fanatik

Offline Garou

  • Sr. Member
  • ****
  • Posts: 759
  • Gender: Male
  • On Hiatus.
    • Balance Games
Re: RSS Feeder
« Reply #778 on: October 20, 2009, 01:35:48 PM »
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.

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,276
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
Re: RSS Feeder
« Reply #779 on: October 22, 2009, 11:17:51 PM »
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...