Page 1 of 1

Remote RSS Plugin - can't import a feed

Posted: Mon Dec 27, 2004 1:56 pm
by Chris
Hi guys,

I have been using the Remote RSS plugin to import various RSS feeds with no problems into my site. I am trying to import an Audioscrobbler feed into my blog and it doesn't seem to work.

Background on Audioscrobbler :
It provides a variety of plugins for a number of mainstream MP3 applications such as WinAMP and iTunes and it posts the MP3s that you listen to your own page on Audioscrobbler. The best thing about it is that it provides an RSS feed of the last ten songs that you've listened to and I'm trying to import that feed into my blog.

I've tried reading the feed (http://ws.audioscrobbler.com/rdf/history/senhwei) using a RSS reader such as Pluck and it works.

I've also validated the feed against feedvalidator.org and it passed that as well.

However, using the Remote RSS plugin, none of the feed entries show up. Can anyone help ? Thanks !!

Re: Remote RSS Plugin - can't import a feed

Posted: Tue Dec 28, 2004 2:07 pm
by garvinhicking
Did you try a different RSS feed, like one of the Serendipity Developer's Team members feeds?

It may be that your host does not support allow_url_fopen and thus PHP cannot read foreign URL.

You can also test this by uploading an image from a URL in the media section...

Regards,
Garvin

Posted: Tue Dec 28, 2004 2:11 pm
by Chris
Hi Garvin,

Thanks again for your help with this. Yes, I have managed to import other RSS feeds such as from BBC and Wired. It is only with this particular feed that I've not had any success.

I think I have found the reason for it. It would appear that each entry of this feed does not have a "title" but only a description. Is it correct for me to assume that the Remote RSS plugin will only display titles and not descriptions ?

thanks,

Chris

Posted: Tue Dec 28, 2004 2:27 pm
by garvinhicking
Hi Chris!

Yes, your guess is definitely true - the RSS Plugin is not really very tolerant about other tags. But you could try to make it suit your needs by modifying the code plugins/serendipity_plugin_remotersss/serendipty_plugin_remoterss.php from this:

(about line #409)

Code: Select all

                        if (empty($item['title'])) {
                            continue;
                        }
to this:

Code: Select all

                        if (empty($item['title'])) {
                            if (!empty($item['description'])) {
                                $item['title'] = substr($item['description'], 0, 128);
                            } else {
                                continue;
                            }
                        }
HTH,
Garvin.

Posted: Wed Dec 29, 2004 3:04 am
by Chris
Garvin - you're a legend ! :D

Works like a charm !

thanks,

Chris