Page 1 of 1

Remote RSS/OPML-Blogroll Feed

Posted: Wed Dec 12, 2007 5:43 am
by Don Chambers
I took this plugin for a "test-drive" today. I'd like to make a suggestion:

The plugin has this:

Code: Select all

RSS display element
 Whic element of the RSS feed should be displayed? (i.e.: "title", "content:encoded", "description", ...)
And also has this:

Code: Select all

Use RSS-Link?
 Shall a link be set to the link specified in the RSS feed?
and finally this:

Code: Select all

Display Date
 Show items of a remote RSS/OPML feed (e.g. Blogroll)
This last one has a really poor description... show items? How about "show date of..."??!! This is not my primary concern - the first 2 are.

So I want a display something like this:

<title>This is my title, and I want it to be a link</title>
<description>This is the feed description tag, but it is NOT part of the link </description>
<date>Date of entry</date>

right now, if I make the value of "RSS display element" equal to "title, description", both are combined into a single link. That is ridiculous in my opinion. If "Use RSS-Link?" is true, IMHO just the title should be a link - not description, nor any other tag that might appear in the feed. HTML wise, what I would like is:
<a>title</a> (ideally wrapped in a block level element)
<p>description, and any other tag</p> (better yet - classes to identify each tag).
date (which already seems to be wrapped in a <div>

You php experts can probably knock this out in a couple of minutes. I would spend days on it and still screw it up. If my intent seems logical, any chance someone could make the revision and commit????

Re: Remote RSS/OPML-Blogroll Feed

Posted: Wed Dec 12, 2007 11:36 am
by garvinhicking
Hi!

Good idea. Just committed a new version to SVN (plugin 1.12 in SVN trunk).

Regards,
Garvin

Posted: Wed Dec 12, 2007 4:41 pm
by Don Chambers
Thanks Garvin - Works great! Small suggestion regarding the "display date?". That should probably read "display TODAY's date", since that is what the option seems to do.

Anyway, how can I preceed the feed with some of the <channel> info? Such as image, link, description?? .... or could those possibly be yes/no radio buttons ???

Posted: Wed Dec 12, 2007 5:32 pm
by garvinhicking
Hi!

Actually, it should display the feed items date. This mightnot work in some RSS feed cases when a timestamp isnot properly given.
Anyway, how can I preceed the feed with some of the <channel> info? Such as image, link, description?? .... or could those possibly be yes/no radio buttons ???
I wouldn't know, without building your own version of the plugin.There are too many elements, and you can't build an easy GUI to indicate what you want to display how.Like an image, you would need to wrap that in a <img> tag, but how to tell that the config page/the plugin?

Regards,
Garvin

Posted: Wed Dec 12, 2007 5:44 pm
by Don Chambers
Thanks Garvin.....

For the feed I am using, when I get the element <date>, the xml is:

Code: Select all

<date>12/11/2007 1:34:57 PM</date>
When I turn on the option to display the date, I get today's date like this:

Code: Select all

Wednesday, December 12. 2007

I see your point on the other stuff.... how about smartifying it?? Or is that still too complex due to all the possible elements?

Posted: Wed Dec 12, 2007 6:16 pm
by garvinhicking
Hi!

That's invalid for <date> because it needs to cvontain an ISO RFC date. PHP is not able to parse such a date, that's why the current timestamp is used.
I see your point on the other stuff.... how about smartifying it?? Or is that still too complex due to all the possible elements?
That's a good tought. We could add a smarty templatingoutput to the plugin!

Regards,
Garvin

Posted: Wed Dec 12, 2007 6:37 pm
by Don Chambers
Hmmmm....... if a feed can contain a date that is not in the proper format, but the plugin can display anything in the <date> element, I guess I am having a difficult time understanding the value of the option to show the date....

BTW - what is the performance implication of this option (ie, setting it to much less than 3 hours):
When to update the feed?
The contents of a feed are stored in a cache which will be updated as soon as its older than X seconds (Default: 3 hours)

Posted: Thu Dec 13, 2007 2:01 pm
by garvinhicking
Hi!

I just committed Smarty templating to the plugin.
Don Chambers wrote:Hmmmm....... if a feed can contain a date that is not in the proper format, but the plugin can display anything in the <date> element, I guess I am having a difficult time understanding the value of the option to show the date....
The plugin can only display what is in valid PHP "strtotime" format inside the RSS feed. Most RSS feeds have hte proper format, your's doesn'T seem to.
BTW - what is the performance implication of this option (ie, setting it to much less than 3 hours):
It would mean that a network connection to the RSS feed would be performed much more often, resulting in more traffic and a longer render time for the user that views the sidebar when it gets fetched.

In short: Much impact, because it impacts only a single visitor, the one that "executes" the cache regeneration. And it inreases your server's load time for that visit.

Regards,
Garvin

Posted: Thu Dec 13, 2007 3:17 pm
by Don Chambers
Thanks Garvin - for both the explanation and the smartification!! 8)