syndicate or RSS feeds

15 posts by 6 authors in: Forums > CMS Builder
Last Post: June 10, 2010   (RSS)

By Dave - March 13, 2008

I think I figured it out. It's the whitespace before the <?xml version=\"1.0\" ... tag.

Remove any spaces before your first <?php tag and view-source on the output and see if you can figure out what's causing the extra whitespace and remove it.

Let me know if that fixes it.
Dave Edis - Senior Developer
interactivetools.com

Re: [benedict] syndicate or RSS feeds

By Dave - September 19, 2008

Hi benedict,

Anytime you have a closing PHP tag and another tag like this:

?>
<rss version="2.0">

Just remove the spaces or nextlines between then so it becomes this:

?><rss version="2.0">

Let me know if that helps or if there is still problems.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] syndicate or RSS feeds

By pod9 - June 10, 2010

Hi, I have no idea how to create an rss feed. I have tried to follow the instructions on this page but with no luck. Is the page that we are trying to create here the one that I need to link to from the RSS button on the main pages? (The equivelent of this page http://www.ainscough.co.uk/artman2/publish/rss.xml ?)

I have created 2 pages with the following code:

<?php // Load record list
require_once "/home/fhlinux129/j/judgeandhoward.com/user/htdocs/cmsAdmin/lib/viewer_functions.php";
$options = array();
$options['tableName'] = 'blog';
$options['perPage'] = '10';
$options['pageNum'] = '1';

echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
?> [/#0000ff]

<rss version="2.0">
<channel>
<title>Judge and Howard</title>
<link>http://www.judgeandhoward.com/blog/</link>
<description>Judge & Howard is a fast-growing communications business with public relations at its core.</description>
<pubDate><?php echo date('r'); ?></pubDate>
<language>en-us</language>

<?php foreach ($listRows as $record): ?>
<item>
<title><?php echo $record['title'] ?></title>
<link>http://www.judgeandhoward.com/blog/<?php echo $record['_link'] ?></link>
<description><?php echo $record['summary'] ?></description>
<pubDate><?php echo date("jS M, Y", strtotime($record['date'])) ?></pubDate>
<guid isPermaLink="true">http://www.judgeandhoward.com/blog/<?php echo $record['_link'] ?></guid>
</item>
<?php endforeach ?>
</channel>
</rss>[/#0000ff]

One of the pages was saved and uploaded as http://www.judgeandhoward.com/blog/rss.php (and comes up with "Internet Explorer cannot display this feed")
The other page a saved as http://www.judgeandhoward.com/blog/rss.xml which comes up with a different error.[/#000000]

Please advise.[/#000000]
Pod9

Re: [pod9] syndicate or RSS feeds

By Jason - June 10, 2010

Hi,

If you could email you FTP and CMS Login details to jason@interactivetools.com, I can take a closer look at it for you.

Please just email, don't post this information to the forum.

Thanks.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/