I also appreciated Alex's advice on peppering the PunBB sources with RSS links.  I took that advice and also made some changes so that RSS auto-detect would work.  For instance, in Safari on the Mac, this causes a nice RSS button to appear next to the URL in the browser.

The basic gist of all these changes is to add a <link> tag at the top of each significant page, indicating to the browser or client application what the corresponding feed for the page is.

In viewforum.php, replace:

$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
if ($id < 1)
        message($lang_common['Bad request']);

with

$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
if ($id < 1)
        message($lang_common['Bad request']);  
?>
<link rel="alternate" type="application/rss+xml" title="XML" href="rss.php?fid=<?php echo $id ?>"/>
<?php

In viewtopic.php, basically the same thing:

if ($id < 1 && $pid < 1)
        message($lang_common['Bad request']);

with

if ($id < 1 && $pid < 1)
        message($lang_common['Bad request']);
?>
<link rel="alternate" type="application/rss+xml" title="XML" href="rss.php?tid=<?php echo $id ?>"/>
<?php

and in index.php, to add an RSS autodetect for the entire forum, replace:

if ($pun_user['g_read_board'] == '0')
        message($lang_common['No view']);

with

if ($pun_user['g_read_board'] == '0')
        message($lang_common['No view']);
?>              
<link rel="alternate" type="application/rss+xml" title="XML" href="rss.php"/>
<?php

Update: I get the content I was expecting with the desired formatting simply by uncommenting an existing "content:encoded" output line that was in the script, and adding the required namespace reference to the rss header tag.

The feed now validates. Thanks again, Alex.  This has been a good introductory education about the RSS format.

In case anybody wants a copy of the modified rss.php file, I've made it available:

http://www.red-sweater.com/free/rss.zip

My previously posted feed is now using this and has the desired content formatting as well as being validated RSS:

http://www.red-sweater.com/forums/rss.php

Thanks Alex - I am just so naive to this RSS world that I don't know all the ground rules. Thanks for that feedvalidator link - I will see what I can do to make the text both beautiful and valid.  If I come up with something good, I'll be sure to share my results here!

Thanks for making the script available.  I am using the original alexkingorg version that started this thread.

One change I made was to (IMHO) de-uglify the content.  I find the "Topic: " line useless because it's already in the feed title, and the "Message: " prefix seems redundant to me.

I was also disappointed to see that the "encode_xml" routine in the script strips most of the interesting tags from the content.  This makes for, at least on my newsreader, and ugly chunk of text that has no newlines, etc.  I see in the script that it's actually inserting "\n" but that doesn't seem to make much difference to my newsreader (NetNewsWire on the Mac).

So I've got what I feel is much prettier output by simply omitting the "encode_xml" call.  What am I getting myself into by doing that? Is that going to wreak havoc on somebody else's news reader?

In case anybody feels like observing the content with my changes, here's an example from my site:

http://www.red-sweater.com/forums/rss.php

Thanks again for sharing this script!