April 17, 2007

Feed.RSS2 - Standard Template

The standard RSS2 template.  This is specified in the feed template for each folder; I will be adding fields so that you can specify custom per-folder atom and archive templates.  The default type is "Feed" and the default name "RSS2".

Currently, you can only have two automatic feeds per folder, RSS and Atom.  Some other systems support RSS 0.92 and RSS 1.0; I've decided to concentrate on the more modern (and simpler) feed formats.  It is possible to create additional feeds by setting up your own parallel linked folder structure, but I'm not sure that there's a lot of requirement for that.
<?xml version="1.0"?>
<rss version="2.0">

<lastBuildDate>[posts count=1][post.pdate format="%a, %d %b %Y %X"] +0000[/posts]</lastBuildDate>
<generator>Minx 0.9</generator>

[posts count=15]
<link>http://[site.host]/[if folder.path][folder.path]/[/if][post.path]</link>
[iff post.category]<category>[post.category]</category>[/iff]
<description>[post.text.text format="first=100"]...</description>
<guid>http://[site.host]/[if folder.path][folder.path]/[/if][post.path]</guid>
<pubDate>[post.pdate format="%a, %d %b %Y %X"] +0000</pubDate>


Posted by: Pixy Misa at 05:04 AM | Comments (10) | Add Comment
Post contains 131 words, total size 2 kb.

1 Form.Comment next please!

Posted by: McGurk at April 19, 2007 02:15 AM (8GzzQ)

2 Gah. Tried to add this template to my site and now I'm getting an error.  Could u take a peek, Pix?  Thx.

Posted by: McGurk at April 19, 2007 02:54 AM (8GzzQ)

3 Looks okay to me.  What was the error?

Posted by: Pixy Misa at April 19, 2007 04:02 AM (PiXy!)

4 Well, I didn't know... Blank page with an error message in the tab (too small to read the whole thing).  It appears straightened out now. 

Posted by: McGurk at April 19, 2007 03:44 PM (Ri74D)

5 Okay.  Let me know if you see it again.

Posted by: Pixy Misa at April 19, 2007 03:56 PM (PiXy!)

6 HTML is getting into the RSS feed.  I'd like to include all post text in the RSS (for Technorati); what's the tag that allows me to insert all the text but without the HTML?  Thx.

Posted by: McGurk at April 24, 2007 05:52 PM (Ri74D)


Even this template is doing it. 


Reference to undefined entity 'nbsp'.
 Line: 18 Character: 220

<description>("<P>Just read an article over at The Old New Thing about the Decoy Effect.&nbsp; Very interesting.&nbsp; By adding a third&nbsp;choice, you can skew opinion towards one of two legitimate choices.&nbsp; </P>\r\n<P>You are asked to choose between A and B.&nbsp; 50% of people pick A, 50% pick B.&nbsp; If you want to push people towards A, you can easily do this by adding&nbsp;a third choice C that is not as good as A or B.&nbsp; Just make sure that choice A is better than C in more respects than B is.&nbsp; People use choice C as the benchmark; they see that A is twice as better than C than B and therefore pick A more often.&nbsp; </P>\r\n<P>Keep an eye out for this kind of gaming in real life.&nbsp; If I find any I'll post 'em here.</P>", 'strip_markup')...</description>"

Posted by: McGurk at April 24, 2007 05:54 PM (Ri74D)

8 I'll check that out. 

field.text gives you the text with any HTML or BBCode markup stripped out.

field.esc gives you the field with markup escaped (and BBCode converted to HTML, and then escaped), which should be safe for inclusion in a feed.

Posted by: Pixy Misa at April 24, 2007 06:13 PM (PiXy!)

9 Looks like an issue with entities rather than markup per se.  I'll work on that.

Posted by: Pixy Misa at April 24, 2007 06:15 PM (PiXy!)

10 Found it.  It was a bug in the setup of some of the fields in the new text-processing module.  (That's what gave us the 40% speedup in Monday's update.)

I've patched that, and I'll do a little testing now.  I'm surprised more things didn't break... Though if they had, I would have found the problem straight away.

My RSS wasn't working at all.  I wondered why I wasn't getting any comments...

Posted by: Pixy Misa at April 25, 2007 05:29 AM (PiXy!)

Hide Comments | Add Comment

Comments are disabled. Post is locked.
14kb generated in CPU 0.01, elapsed 0.0297 seconds.
31 queries taking 0.022 seconds, 62 records returned.
Powered by Minx 1.1.6c-pink.