Welcome to Squishdot Websites Squishdot How-To
 about
 search
 post article
 Documentation
 Mailing Lists
 Bug Tracking
 Development
 Installation
 Upgrading
 Download
 admin
 rdf

 main


Squishdot RSS 2.0 feed start..
How-To Posted by Dean on Friday December 27, 08:58PM, 2002
from the dept.
Took a swag at an RSS 2.0 newsfeed for a Squishdot site...

It validated via the RSS validator: http://feeds.archive.org/validator

Watch out for MSWord copy-paste issues:

- apostrophe ’
- left curly quote “
- right curly quote ”
- elipsis …

This isn't comprehensive, nor necessarily effecient.

Looking forward to improvements.

dtml method below...

<dtml-comment >
<!-- version : $Revision: 1.1.1.1 $
author : Bruce Perens


copyright (c) 1999 by Bruce Perens

see License.txt for restrictions on distribution, use
and modifications.

modified by Avvus, Butch Landingin, RSS 2.0 start: Dean Goodmanson
-->
</dtml-comment>
<dtml-call "RESPONSE.setHeader('content-type', 'text/xml')"><?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title><dtml-var "striptags(rss_title)"></title>
<link><dtml-var site_url></link>
<description><dtml-var "striptags(rss_description)"></description>
<language>en-us</language>
<dtml-if rss_image_url>
<image>
<title><dtml-var "striptags(rss_title)"></title>
<url><dtml-var site_url>/<dtml-var rss_image_url></url>
<link><dtml-var site_url></link>
</image>
</dtml-if>
<dtml-in "this()(meta_type='Article')" size=prevday_cnt sort=id reverse>
<dtml-with getObject>
<item>
<title><dtml-var "striptags(title)" html_quote></title>
<link><dtml-var site_url><dtml-var thread_path>/<dtml-var id></link>
<description><dtml-var showSummary html_quote>&lt;br&gt;<dtml-var showBody html_quote></description>
<dc:creator><dtml-var author></dc:creator>
<dc:date><dtml-var "date().strftime('%Y-%m-%d')"></dc:date>
<dtml-comment><dc:date><dtml-var "_.DateTime(date_posted).strftime('%Y-%m-%d')"></dc:date>
</dtml-comment>
</item>
</dtml-with>
</dtml-in>
</channel>
</rss>


<  |  >

 

Related Links
  • Articles on How-To
  • Also by Dean
  • Contact author
  • The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Re: Squishdot RSS 2.0 feed start..
    by Dean on Wednesday January 08, 10:14PM, 2003

    This code above does NOT filter out UNmoderated posts.

    For the latest code visit http://nomad.freezope.org/weblog/1041236091

    ..that one includes the "<if reviewed> condition on each post.

    You'll notice I also sort on id, not date, which is probably a wart.

    [ Reply to this ]
    The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Powered by Zope  Squishdot Powered
      "Any system that depends on reliability is unreliable." -- Nogg's Postulate
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©1999 Butch Landingin, ©2000-2002 Chris Withers.