syndicate or RSS feeds

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

By loccom - January 17, 2008

Hi

Is is possible to syndicate the info from a news page in CMSB like AM? or a RSS feed?

If it is possible would support be able to post instructions please?

thanks

Re: [Dave] syndicate or RSS feeds

By loccom - January 18, 2008

thanks dave... when i finishing setting up i will give this a go. Exactly what i am looking for.

Re: [Berkowitz] syndicate or RSS feeds

By Dave - February 27, 2008

I don't see anything wrong with it myself. What tag does it say isn't closed?

Can you "view source" on the RSS in your browser and post that? It's often easier to work backwards from the output to figure out what's not working.
Dave Edis - Senior Developer
interactivetools.com

Re: [Berkowitz] syndicate or RSS feeds

By Dave - February 27, 2008

What's giving you the errors? My FireFox and IE7 didn't report any errors.

I also tried this W3C Validator here and pasted in the code:
http://validator.w3.org/feed/#validate_by_input

It said it was valid (but recommended adding a tag for atom:link feeds or something like that).
Dave Edis - Senior Developer
interactivetools.com

Re: [Berkowitz] syndicate or RSS feeds

By Dave - February 27, 2008

Thanks for the link. The W3C Feed Validator shows some errors for that one:

http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.1id.be%2Fnewsrss.php

Try adding this to the top after the <?php to set that charset and content type:

<?php

header('Content-type: application/xml; charset=utf-8');


Then try the link in the feed validator and browser again and see what error or problems remain (hopefully none).
Dave Edis - Senior Developer
interactivetools.com

Re: [Berkowitz] syndicate or RSS feeds

By Dave - February 28, 2008

Hurray! :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] syndicate or RSS feeds

By nikkijones - March 13, 2008 - edited: March 13, 2008

Hi Dave,

I;m also having a problem settting this up. Maybe i'm just tired and missing something really simple, i dunno. My page is called articlerss.php. I;m trying to get the news articles that are posted.


Here is my code:

<?php
header('Content-type: application/xml; charset=utf-8');
require_once "/home/fhlinux152/a/allianceinpartnership.co.uk/user/htdocs/cmsAdmin/lib/viewer_functions.php";
$options = array(); // NOTE: see online documentation for more details on these options
$options['tableName'] = 'news'; // (REQUIRED) MySQL tablename to list record from. Example: 'article';
$options['titleField'] = 'title'; // (optional) MySQL fieldname used in viewer url for search engines. Example: 'title' would display: viewer.php/article_title_here-123
$options['viewerUrl'] = 'http://www.allianceinpartnership.co.uk/newsPage.php'; // (optional) URL of viewer page. Example: '/articles/view.php';
$options['perPage'] = '10'; // (optional) The number of records to display per page. Example: '5'; Defaults to 10.
$options['orderBy'] = 'title'; // (optional) Fieldnames to sort by. Example: 'field1, field2 DESC, field3';
$options['pageNum'] = '1'; // (optional) Page number of results to display. Example: '1'; Defaults to ?page=# value, or 1 if undefined
list($listRows, $listDetails) = getListRows($options);
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
?>
<rss version="2.0">
<channel>
<title>PUT YOUR SITE NAME HERE</title>
<link>http://EXAMPLE.COM/YOUR/URL/HERE/</link>
<description>YOUR SITE DESCRIPTION GOES HERE</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>
<description><?php echo htmlspecialchars($record['summary']); ?></description>
<pubDate><?php echo date("r", strtotime($record['date'])) ?></pubDate>
<guid isPermaLink="true"><?php echo $record['_link'] ?></guid>
</item>
<?php endforeach ?>
</channel>
</rss>


...all i get is feed code error [:(]

Cheers,
nikki.

Re: [nikkijones] syndicate or RSS feeds

By Dave - March 13, 2008

Do you have a url to the test page so I can check the feed error?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] syndicate or RSS feeds