<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[PunBB Forums — RSS 2.0 feed of latest posts]]></title>
	<link rel="self" href="http://punbb.informer.com/forums/feed/atom/topic/5100/" />
	<updated>2007-03-18T10:58:29Z</updated>
	<generator>PunBB</generator>
	<id>http://punbb.informer.com/forums/topic/5100/rss-20-feed-of-latest-posts/</id>
		<entry>
			<title type="html"><![CDATA[Re: RSS 2.0 feed of latest posts]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/90107/#p90107" />
			<content type="html"><![CDATA[<p>There is an alternative enhanced RSS-feed generator for PunBB:<br /><a href="http://letmeseetheart.tripod.com/files/temp/punbb_rss_dvska_2007-03-16.php.txt">http://letmeseetheart.tripod.com/files/ … 16.php.txt</a></p>]]></content>
			<author>
				<name><![CDATA[dvs]]></name>
				<uri>http://punbb.informer.com/forums/user/9963/</uri>
			</author>
			<updated>2007-03-18T10:58:29Z</updated>
			<id>http://punbb.informer.com/forums/post/90107/#p90107</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: RSS 2.0 feed of latest posts]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/88600/#p88600" />
			<content type="html"><![CDATA[<p>How do I make this mod only show the <strong>first message</strong> in every thread when using this call;<br /><a href="http://www.example.com/forum/rss.php?fid=4">http://www.example.com/forum/rss.php?fid=4</a></p><p>I want people to be able to comment the threads, without showing the comments in the RSS (other posts than the first one in every thread).</p><p>Could anyone help please?</p><p>This is what it looks like right now. RSS-feed at the right of the page: <a href="http://www.nolltid.se/">http://www.nolltid.se/</a><br />This is the feed:&nbsp; <a href="http://www.nolltid.se/forum/rss.php?fid=4">http://www.nolltid.se/forum/rss.php?fid=4</a></p><p>This is my rss.php file: <a href="http://www.nolltid.se/rss.zip">http://www.nolltid.se/rss.zip</a></p>]]></content>
			<author>
				<name><![CDATA[cal]]></name>
				<uri>http://punbb.informer.com/forums/user/9562/</uri>
			</author>
			<updated>2007-02-28T02:09:07Z</updated>
			<id>http://punbb.informer.com/forums/post/88600/#p88600</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: RSS 2.0 feed of latest posts]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/84127/#p84127" />
			<content type="html"><![CDATA[<p>great mod, thanks alot! I edited out line 93, you had an extra &quot; and something else is in it that i couldnt be bothered to find so i just edited the whole line <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Emancipator]]></name>
				<uri>http://punbb.informer.com/forums/user/7303/</uri>
			</author>
			<updated>2007-01-02T23:32:31Z</updated>
			<id>http://punbb.informer.com/forums/post/84127/#p84127</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: RSS 2.0 feed of latest posts]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/78328/#p78328" />
			<content type="html"><![CDATA[<p>For some reason it is not working for me This is the error I get<br /></p><div class="codebox"><pre><code>Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting &#039;)&#039; in ******\****\rss.php on line 93</code></pre></div><p>Whats the problem I have tried using both code given above. Thanks...</p>]]></content>
			<author>
				<name><![CDATA[greatcan]]></name>
				<uri>http://punbb.informer.com/forums/user/8475/</uri>
			</author>
			<updated>2006-09-30T18:30:15Z</updated>
			<id>http://punbb.informer.com/forums/post/78328/#p78328</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: RSS 2.0 feed of latest posts]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/69982/#p69982" />
			<content type="html"><![CDATA[<p>Thanks for this script!<br />A few modifications to make output validate:<br />line 145: header (&quot;Content-type: text/xml; charset=ISO-8859-1&quot;); // Change accordingly<br />line 227: commented out the whole line, apparently the &lt;content&gt; tag is no longer used(?)</p>]]></content>
			<author>
				<name><![CDATA[filipp]]></name>
				<uri>http://punbb.informer.com/forums/user/7503/</uri>
			</author>
			<updated>2006-06-03T20:42:08Z</updated>
			<id>http://punbb.informer.com/forums/post/69982/#p69982</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: RSS 2.0 feed of latest posts]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/69211/#p69211" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>mentalspew wrote:</cite><blockquote><p>thanks hgctv - aren&#039;t you also on nucleus?</p></blockquote></div><p>Yeah, I help out on Nucleus and a few other projects.</p>]]></content>
			<author>
				<name><![CDATA[hcgtv]]></name>
				<uri>http://punbb.informer.com/forums/user/1461/</uri>
			</author>
			<updated>2006-05-25T20:40:15Z</updated>
			<id>http://punbb.informer.com/forums/post/69211/#p69211</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: RSS 2.0 feed of latest posts]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/69209/#p69209" />
			<content type="html"><![CDATA[<p>fyi-</p><p>installed fine, followed the readme and refreshed the forum and voila - rss! has someone also made a ping plugin to notify sites of new entries?</p><p>also, when there are no entries in a forum, you get this error:</p><p>The XML page cannot be displayed <br />Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. </p><br /><p>--------------------------------------------------------------------------------</p><p>End tag was not expected at this location. Error processing resource &#039;<a href="http://www.superx3.com/forums/rss.php?fid=6">http://www.superx3.com/forums/rss.php?fid=6</a>&#039;. Line 1...</p><p>&lt;/channel&gt;<br />--^</p><br /><p>here&#039;s a live example.<br /><a href="http://www.superx3.com/forums/rss.php?fid=6">http://www.superx3.com/forums/rss.php?fid=6</a></p>]]></content>
			<author>
				<name><![CDATA[mentalspew]]></name>
				<uri>http://punbb.informer.com/forums/user/7399/</uri>
			</author>
			<updated>2006-05-25T20:35:40Z</updated>
			<id>http://punbb.informer.com/forums/post/69209/#p69209</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: RSS 2.0 feed of latest posts]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/69203/#p69203" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>hcgtv wrote:</cite><blockquote><p>There&#039;s an enhanced version of this at this thread:</p><p><a href="http://punbb.org/forums/viewtopic.php?id=6586">http://punbb.org/forums/viewtopic.php?id=6586</a></p></blockquote></div><p>thanks hgctv - aren&#039;t you also on nucleus?</p>]]></content>
			<author>
				<name><![CDATA[mentalspew]]></name>
				<uri>http://punbb.informer.com/forums/user/7399/</uri>
			</author>
			<updated>2006-05-25T19:56:16Z</updated>
			<id>http://punbb.informer.com/forums/post/69203/#p69203</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: RSS 2.0 feed of latest posts]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/69100/#p69100" />
			<content type="html"><![CDATA[<p>There&#039;s an enhanced version of this at this thread:</p><p><a href="http://punbb.org/forums/viewtopic.php?id=6586">http://punbb.org/forums/viewtopic.php?id=6586</a></p>]]></content>
			<author>
				<name><![CDATA[hcgtv]]></name>
				<uri>http://punbb.informer.com/forums/user/1461/</uri>
			</author>
			<updated>2006-05-25T00:55:58Z</updated>
			<id>http://punbb.informer.com/forums/post/69100/#p69100</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: RSS 2.0 feed of latest posts]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/69098/#p69098" />
			<content type="html"><![CDATA[<p>i&#039;ve put this rss.php file in the root forum folder. now what? do i follow the instructions as extern.php? thanks!</p>]]></content>
			<author>
				<name><![CDATA[mentalspew]]></name>
				<uri>http://punbb.informer.com/forums/user/7399/</uri>
			</author>
			<updated>2006-05-25T00:24:58Z</updated>
			<id>http://punbb.informer.com/forums/post/69098/#p69098</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: RSS 2.0 feed of latest posts]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/37048/#p37048" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>lebel wrote:</cite><blockquote><p>Is there a version for punbb 1.1.5 ?</p></blockquote></div><p>The above code should work with 1.1.5, don&#039;t see why not.</p>]]></content>
			<author>
				<name><![CDATA[hcgtv]]></name>
				<uri>http://punbb.informer.com/forums/user/1461/</uri>
			</author>
			<updated>2005-03-10T19:16:13Z</updated>
			<id>http://punbb.informer.com/forums/post/37048/#p37048</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: RSS 2.0 feed of latest posts]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/37045/#p37045" />
			<content type="html"><![CDATA[<p>Is there a version for punbb 1.1.5 ?</p>]]></content>
			<author>
				<name><![CDATA[lebel]]></name>
				<uri>http://punbb.informer.com/forums/user/1567/</uri>
			</author>
			<updated>2005-03-10T18:36:59Z</updated>
			<id>http://punbb.informer.com/forums/post/37045/#p37045</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: RSS 2.0 feed of latest posts]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/35560/#p35560" />
			<content type="html"><![CDATA[<p>Made some mods so it works with PunBB 1.2.1<br /></p><div class="codebox"><pre><code>&lt;?php
/**
  * BLOG:CMS: PHP/MySQL Personal Content Management System 
  * http://blogcms.com/
  * http://forum.blogcms.com/
  *
  * 2003-2004, (c) Radek HULAN 
  * http://hulan.cz/
  *
  * Mod by Bert Garcia for PunBB 1.2.1
  * http://nupusi.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
**/

define(&#039;PUN_ROOT&#039;, &#039;./&#039;);
@include PUN_ROOT.&#039;config.php&#039;;

// If PUN isn&#039;t defined, config.php is missing or corrupt
if (!defined(&#039;PUN&#039;))
    exit(&#039;The file \&#039;config.php\&#039; doesn\&#039;t exist or is corrupt. Please run install.php to install PunBB first.&#039;);

// Disable error reporting for uninitialized variables
error_reporting(E_ERROR | E_WARNING | E_PARSE);

// Turn off magic_quotes_runtime
set_magic_quotes_runtime(0);


// Load the functions script
require PUN_ROOT.&#039;include/functions.php&#039;;
require PUN_ROOT.&#039;include/parser.php&#039;;

// Load DB abstraction layer and try to connect
require PUN_ROOT.&#039;include/dblayer/common_db.php&#039;;

// Get the forum config
$result = $db-&gt;query(&#039;SELECT * FROM &#039;.$db-&gt;prefix.&#039;config&#039;) or error(&#039;Unable to fetch forum config&#039;, __FILE__, __LINE__, $db-&gt;error());
while ($cur_config_item = $db-&gt;fetch_row($result))
    $pun_config[$cur_config_item[0]] = $cur_config_item[1];

// Make sure we (guests) have permission to read the forums
$result = $db-&gt;query(&#039;SELECT g_read_board FROM &#039;.$db-&gt;prefix.&#039;groups WHERE g_id=3&#039;) or error(&#039;Unable to fetch group info&#039;, __FILE__, __LINE__, $db-&gt;error());
if ($db-&gt;result($result) == &#039;0&#039;)
    exit(&#039;No permission&#039;);


// Attempt to load the common language file
@include PUN_ROOT.&#039;lang/&#039;.$pun_config[&#039;o_default_lang&#039;].&#039;/common.php&#039;;
if (!isset($lang_common)) exit(&#039;There is no valid language pack \&#039;&#039;.$pun_config[&#039;o_default_lang&#039;].&#039;\&#039; installed. Please reinstall a language of that name.&#039;);

// parse RSS
ob_start();

// make feed
putHeader();
$result = $db-&gt;query(
    &quot;select p.id as id, p.message as message, p.posted as postposted, t.subject as subject &quot;.
    &quot;from &quot;.$db-&gt;prefix.&quot;posts as p, &quot;.$db-&gt;prefix.&quot;topics as t &quot;.
    &quot;where p.topic_id=t.id &quot;.
    &quot;order by postposted desc &quot;.
    &quot;limit 0,15&quot;) 
    or error(&#039;Unable to fetch forum posts&#039;, __FILE__, __LINE__, $db-&gt;error());;
while ($cur = $db-&gt;fetch_assoc($result)) putPost($cur);
putEnd();

// get feed into $feed
$feed = ob_get_contents();
ob_end_clean();

// create ETAG (hash of feed)
$eTag = &#039;&quot;&#039;.md5($feed).&#039;&quot;&#039;;
header(&#039;Etag: &#039;.$eTag);

// compare Etag to what we got
if ($eTag == $_SERVER[&#039;HTTP_IF_NONE_MATCH&#039;]) {    
    header(&quot;HTTP/1.0 304 Not Modified&quot;);
    header(&#039;Content-Length: 0&#039;);
} else {
    // dump feed
    header (&quot;Content-type: text/xml&quot;);
    echo $feed;
}

/* entity to unicode decimal value */
function entity_to_decimal_value($string){
    static $entities_dec = false;
    if (!is_array($entities_dec)) {
        $entities_named       = array(&quot; &quot;,&quot;¡&quot;,&quot;¢&quot;,&quot;£&quot;,&quot;¤&quot;,&quot;¥&quot;,&quot;¦&quot;,&quot;§&quot;,&quot;¨&quot;,&quot;©&quot;,&quot;ª&quot;,&quot;«&quot;,&quot;¬&quot;,&quot;­&quot;,&quot;®&quot;,&quot;¯&quot;,&quot;°&quot;,&quot;±&quot;,&quot;²&quot;,&quot;³&quot;,&quot;´&quot;,&quot;µ&quot;,&quot;¶&quot;,&quot;·&quot;,&quot;¸&quot;,&quot;¹&quot;,&quot;º&quot;,&quot;»&quot;,&quot;¼&quot;,&quot;½&quot;,&quot;¾&quot;,&quot;¿&quot;,&quot;À&quot;,&quot;Á&quot;,&quot;Â&quot;,&quot;Ã&quot;,&quot;Ä&quot;,&quot;Å&quot;,&quot;Æ&quot;,&quot;Ç&quot;,&quot;È&quot;,&quot;É&quot;,&quot;Ê&quot;,&quot;Ë&quot;,&quot;Ì&quot;,&quot;Í&quot;,&quot;Î&quot;,&quot;Ï&quot;,&quot;Ð&quot;,&quot;Ñ&quot;,&quot;Ò&quot;,&quot;Ó&quot;,&quot;Ô&quot;,&quot;Õ&quot;,&quot;Ö&quot;,&quot;×&quot;,&quot;Ø&quot;,&quot;Ù&quot;,&quot;Ú&quot;,&quot;Û&quot;,&quot;Ü&quot;,&quot;Ý&quot;,&quot;Þ&quot;,&quot;ß&quot;,&quot;à&quot;,&quot;á&quot;,&quot;â&quot;,&quot;ã&quot;,&quot;ä&quot;,&quot;å&quot;,&quot;æ&quot;,&quot;ç&quot;,&quot;è&quot;,&quot;é&quot;,&quot;ê&quot;,&quot;ë&quot;,&quot;ì&quot;,&quot;í&quot;,&quot;î&quot;,&quot;ï&quot;,&quot;ð&quot;,&quot;ñ&quot;,&quot;ò&quot;,&quot;ó&quot;,&quot;ô&quot;,&quot;õ&quot;,&quot;ö&quot;,&quot;÷&quot;,&quot;ø&quot;,&quot;ù&quot;,&quot;ú&quot;,&quot;û&quot;,&quot;ü&quot;,&quot;ý&quot;,&quot;þ&quot;,&quot;ÿ&quot;,&quot;ƒ&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;•&quot;,&quot;…&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;™&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;&quot;&quot;,&quot;&amp;&quot;,&quot;&lt;&quot;,&quot;&gt;&quot;,&quot;Œ&quot;,&quot;œ&quot;,&quot;Š&quot;,&quot;š&quot;,&quot;Ÿ&quot;,&quot;ˆ&quot;,&quot;˜&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;–&quot;,&quot;—&quot;,&quot;‘&quot;,&quot;’&quot;,&quot;‚&quot;,&quot;“&quot;,&quot;”&quot;,&quot;„&quot;,&quot;†&quot;,&quot;‡&quot;,&quot;‰&quot;,&quot;‹&quot;,&quot;›&quot;,&quot;€&quot;,&quot;&amp;apos;&quot;);
        $entities_decimal     = array(&quot; &quot;,&quot;¡&quot;,&quot;¢&quot;,&quot;£&quot;,&quot;¤&quot;,&quot;¥&quot;,&quot;¦&quot;,&quot;§&quot;,&quot;¨&quot;,&quot;©&quot;,&quot;ª&quot;,&quot;«&quot;,&quot;¬&quot;,&quot;­&quot;,&quot;®&quot;,&quot;¯&quot;,&quot;°&quot;,&quot;±&quot;,&quot;²&quot;,&quot;³&quot;,&quot;´&quot;,&quot;µ&quot;,&quot;¶&quot;,&quot;·&quot;,&quot;¸&quot;,&quot;¹&quot;,&quot;º&quot;,&quot;»&quot;,&quot;¼&quot;,&quot;½&quot;,&quot;¾&quot;,&quot;¿&quot;,&quot;À&quot;,&quot;Á&quot;,&quot;Â&quot;,&quot;Ã&quot;,&quot;Ä&quot;,&quot;Å&quot;,&quot;Æ&quot;,&quot;Ç&quot;,&quot;È&quot;,&quot;É&quot;,&quot; &quot;,&quot;Ë&quot;,&quot;Ì&quot;,&quot;Í&quot;,&quot;Î&quot;,&quot;Ï&quot;,&quot;Ð&quot;,&quot;Ñ&quot;,&quot;Ò&quot;,&quot;Ó&quot;,&quot;Ô&quot;,&quot;Õ&quot;,&quot;Ö&quot;,&quot;×&quot;,&quot;Ø&quot;,&quot;Ù&quot;,&quot;Ú&quot;,&quot;Û&quot;,&quot;Ü&quot;,&quot;Ý&quot;,&quot;Þ&quot;,&quot;ß&quot;,&quot;à&quot;,&quot;á&quot;,&quot;â&quot;,&quot;ã&quot;,&quot;ä&quot;,&quot;å&quot;,&quot;æ&quot;,&quot;ç&quot;,&quot;è&quot;,&quot;é&quot;,&quot;ê&quot;,&quot;ë&quot;,&quot;ì&quot;,&quot;í&quot;,&quot;î&quot;,&quot;ï&quot;,&quot;ð&quot;,&quot;ñ&quot;,&quot;ò&quot;,&quot;ó&quot;,&quot;ô&quot;,&quot;õ&quot;,&quot;ö&quot;,&quot;÷&quot;,&quot;ø&quot;,&quot;ù&quot;,&quot;ú&quot;,&quot;û&quot;,&quot;ü&quot;,&quot;ý&quot;,&quot;þ&quot;,&quot;ÿ&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;&quot;&quot;,&quot;&amp;&quot;,&quot;&lt;&quot;,&quot;&gt;&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;?&quot;,&quot;&#039;&quot;);
        if (function_exists(&#039;array_combine&#039;)) 
            $entities_dec=array_combine($entities_named,$entities_decimal);
        else {
            $i=0;
            foreach ($entities_named as $_entities_named) $entities_dec[$_entities_named]=$entities_decimal[$i++];
        }
    }
    return preg_replace( &quot;/&amp;[A-Za-z]+;/&quot;, &quot; &quot;, strtr($string,$entities_dec) );
}

function encode_xml($data){
    // line breaks
    $data=str_replace(&#039;&lt;br(.*?)&gt;&#039;,&quot;\n&quot;,$data);
    // ending html tags into line breaks
    $data=preg_replace(&quot;/&lt;\/(pre|ul|li|p|table|tr)&gt;/&quot;,&quot;\n&quot;,$data);
    // remove other html tags
    $data=preg_replace(&quot;/&lt;(.*?)&gt;/&quot;,&quot;&quot;,$data);
    // remove multiple newlines
    $data=preg_replace(&quot;/\n\n+/&quot;,&quot;\n\n&quot;,$data);
    return entity_to_decimal_value($data);
}

function putHeader() {   
    global $lang_common,$pun_config;
    echo &#039;&lt;&#039;.&#039;?xml version=&quot;1.0&quot; encoding=&quot;&#039;.$lang_common[&#039;lang_encoding&#039;].&#039;&quot;?&#039;.&#039;&gt;&#039;.&quot;\n&quot;;
    echo &quot;&lt;rss version=\&quot;2.0\&quot;&gt;\n&quot;;
    echo &quot;&lt;channel&gt;\n&quot;;
    echo &quot;&lt;title&gt;&quot;.entity_to_decimal_value(htmlspecialchars($pun_config[&#039;o_board_title&#039;])).&quot;&lt;/title&gt;\n&quot;;
    echo &quot;&lt;link&gt;&quot;.$pun_config[&#039;o_base_url&#039;].&quot;&lt;/link&gt;\n&quot;;
    echo &quot;&lt;description&gt;&quot;.entity_to_decimal_value(htmlspecialchars($rss_description.&#039; &#039;.$pun_config[&#039;o_board_title&#039;])).&quot;&lt;/description&gt;\n&quot;;
    echo &quot;&lt;language&gt;en&lt;/language&gt;\n&quot;;
    echo &quot;&lt;docs&gt;http://backend.userland.com/rss&lt;/docs&gt;\n&quot;;
} 

function putPost($cur) {
    global $pun_config;
    echo &quot;&lt;item&gt;\n&quot;;
    echo &quot;&lt;title&gt;&quot;.entity_to_decimal_value(htmlspecialchars($cur[&#039;subject&#039;])).&quot;&lt;/title&gt;\n&quot;;
    $link = $pun_config[&#039;o_base_url&#039;].&#039;/viewtopic.php?pid=&#039;.strval($cur[&#039;id&#039;]).&#039;#&#039;.strval($cur[&#039;id&#039;]);
    echo &quot;&lt;link&gt;&quot;.entity_to_decimal_value(htmlspecialchars($link)).&quot;&lt;/link&gt;\n&quot;;
    $data = &quot;Topic: &quot;.parse_message($cur[&#039;subject&#039;],0).&quot;\n\nMessage: &quot;.parse_message($cur[&#039;message&#039;],0);
    echo &quot;&lt;description&gt;&quot;.encode_xml($data).&quot;&lt;/description&gt;\n&quot;;
    echo &quot;&lt;pubDate&gt;&quot;.strval(date(&quot;r&quot;,$cur[&#039;postposted&#039;])).&quot;&lt;/pubDate&gt;\n&quot;;
    echo &quot;&lt;/item&gt;\n&quot;;
}


function putEnd() {
    echo &quot;&lt;/channel&gt;\n&quot;;
    echo &quot;&lt;/rss&gt;\n&quot;;
} 

?&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[hcgtv]]></name>
				<uri>http://punbb.informer.com/forums/user/1461/</uri>
			</author>
			<updated>2005-02-25T01:06:22Z</updated>
			<id>http://punbb.informer.com/forums/post/35560/#p35560</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: RSS 2.0 feed of latest posts]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/26823/#p26823" />
			<content type="html"><![CDATA[<p>I tried this with 1.2 beta, but it will only load a blank&nbsp; page.<br />An additional feature I&#039;d love to see, btw, is (if possible) an option to get feeds for specific threads.</p>]]></content>
			<author>
				<name><![CDATA[tenthumbs]]></name>
			</author>
			<updated>2004-12-07T19:54:02Z</updated>
			<id>http://punbb.informer.com/forums/post/26823/#p26823</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: RSS 2.0 feed of latest posts]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/26800/#p26800" />
			<content type="html"><![CDATA[<p>i&#039;ve tested this script also with 1.2-dev.</p><p>In the rss summary are also the content of posts which are only for special members of my board. i prefer a solution with a http authentication. For public users, the rss feeds should only summarise guest&#039;s posts and for members etc which are authenticated with http://user:password@pathtoboard/rss.php all of their permissions.</p>]]></content>
			<author>
				<name><![CDATA[awapf]]></name>
			</author>
			<updated>2004-12-07T14:26:46Z</updated>
			<id>http://punbb.informer.com/forums/post/26800/#p26800</id>
		</entry>
</feed>
