rss for updated version

4 posts by 2 authors in: Forums > CMS Builder
Last Post: February 15, 2011   (RSS)

By squeazel - February 14, 2011

Hi,

I've recently updated a site from a very old version of CMS builder to something current. One of the things it has is an RSS feed. Without changing the php code for the feel, it still works, however with one issue: all postings prior to when I upgraded shows the full destination page in the visual rss reader, however postings since then only show the text as plain text, and not within any page template. I'm not sure whether my code needs to change or it has to do with the admin input method changing, if that makes sense. The php file looks like this:

<?php // Load record list
require_once "cmsAdmin/lib/viewer_functions.php";
$options = array();
$options['tableName'] = 'news_001';
$options['titleField'] = 'title';
$options['viewerUrl'] = 'http://www.redacted.com/news_detail.php';
$options['perPage'] = '1000';
$options['orderBy'] = 'date DESC, title';
$options['pageNum'] = '1';
list($listRows, $listDetails) = getListRows($options);

echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
?>
<rss version="2.0">
<channel>
<title>redacted</title>

<link>http://www.redacted.com</link>
<description>The Official Website of redacted</description>
<pubDate><?php echo date('r'); ?></pubDate>
<language>en-us</language>

<?php foreach ($listRows as $record): ?>
<item>
<title><?php echo htmlspecialchars($record['title']) ?></title>


<link><?php echo $record['_link'] ?></link>


<pubDate><?php echo date("r", strtotime($record['date'])) ?></pubDate>


<guid isPermaLink="true"><?php echo $record['_link'] ?></guid>



</item>
<?php endforeach ?>

</channel>
</rss>


I've removed the name of the site to give my client some privacy, but I can communicate that info if needed.

Re: [charnushka] rss for updated version

By Jason - February 14, 2011

Hi,

I'm not sure I understand the issue you're having. Are you referring to the link field? Could you give a URL to the RSS feed so I can see what is being outputted?

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/

Re: [charnushka] rss for updated version

By Jason - February 15, 2011

Hi,

I've been unable to reproduce the issue you're describing. Take a look at the your old and new records in CMS Builder and see if you can see any differences between them.

Another thing you can try is creating a new RSS file using the new CMS Builder code and see if that takes care of the issue for you. You can find information on doing this here:
http://www.interactivetools.com/docs/cmsbuilder/rss_feeds.html

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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