Page 1 of 1

Include CSS and Layout in RSS Feed

Posted: Wed Aug 17, 2005 3:19 am
by Wechner
Hello!

I'd like to have my blog layout and design within the RSS feed, i. e. if someone selects an entry of my blog for example in Thunderbird, the page as if he clicked the title on the website should load.

How can I accomplish this?

TIA

Re: Include CSS and Layout in RSS Feed

Posted: Wed Aug 17, 2005 3:41 am
by garvinhicking
The short answer: You cannot do this.

The long answer: RSS feeds can only contain some basic HTML. Most RSS Feed readers do not parse complex layouts, so you cannot put HTML into the RSS feed to be shown in a RSS reader like a webpage.

The only thing you can do is to cut down the RSS file to not contain any content. If you omit any content, the RSS reader will always display the full HTML content, but then your RSS cannot be syndicated and used for content distribution. I do not recommend that, and if you need to do this you'll need to patch Serendipity files include/functions_entries.inc.php (function serendipity_printEntries_rss()) and rss.php.

Regards,
Garvin

Posted: Thu Aug 18, 2005 2:20 pm
by Wechner
Thanks for your reply.

If I'm not totally wrong there must be another way: I read the RSS feed of a blog, to be exactly bBlog. As I can see it (I have not that big knowledge of RSS) it contains basic HTML but when I view it with my thunderbird I get the full page. I cannot see what makes the difference to my RSS feed of s9y, so maybe you see it: The URL of the feed is http://www.usrportage.de/rss.php?ver=2 .

Posted: Thu Aug 18, 2005 3:04 pm
by garvinhicking
Hm, it seems then that Thunderbird differs from all other RSS readers.

The RSS feed you mention only has a "<description>" tag, whereas serendipity uses a "<content:encoded>" tag. Because according to the Spec, the description tag is not allowed to hold much content, and is usually not allowed to hold HTML. That is why we use the other container, which according to Spec shall be used.

Thunderbird seems to think the same, and thinks that the description should not be used to display the full content, and then shows the link.

You could patch your include/functions_entries.inc.php file, the function serendipity_printEntries_rss() and replace "<content:encoded>" with "<description>" so see if that works out for you? Sadly I don't use Thunderbird, so I can'T tell...

Regards,
Garvin