RSS not pulling in any info

7 posts by 3 authors in: Forums > CMS Builder
Last Post: June 18, 2009   (RSS)

Re: [isdoo] RSS not pulling in any info

By Damon - June 17, 2009

Hi,

I just followed the steps to set up an RSS feed had not problems in either IE or Firefox. Here is the link for anyone else interested in setting up an RSS feed:
http://www.interactivetools.com/docs/cmsbuilder/rss_feeds.html

The only things I can think of suggesting is that you check that your path to the viewer functions is correct as well as all your variable names are correct.

Also, can you post a link to the RSS page?
Cheers,
Damon Edis - interactivetools.com

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

Re: [Damon] RSS not pulling in any info

By isdoo - June 17, 2009

http://www.fansfocus.com/news/rss.xml.php

The path is correct, otherwise the pages would not work as in http://www.fansfocus.com/news/index.php/league-Conference

Thanks.

Re: [isdoo] RSS not pulling in any info

By Damon - June 17, 2009

Take a look at the results for your page using the W3C Feed Validation Service here:
http://validator.w3.org/feed/check.cgi?url=http://www.fansfocus.com/news/rss.xml.php

The & in the first article is causing an issue, the summary isn't being generated correctly and also (all though not an issue) you have an additional forward slash in your URLs:
http://www.fansfocus.com//

Hope that helps.
Cheers,
Damon Edis - interactivetools.com

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

Re: [Damon] RSS not pulling in any info

By isdoo - June 17, 2009

Thanks.

Have got it working :)

in the validator it now says....



This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

*

line 42, column 2: Missing atom:link with rel="self"





With the section </channel> highlighted.

Also how can I limit the amount of text - do not really want the whole article in the feed.

Can the maxwords code be included into the feed (not sure as we also currently have htmlspecialchars being used)

Thanks

Re: [isdoo] RSS not pulling in any info

By ross - June 18, 2009

Hi there.

Thanks for the update!

My first though with your feed would be to actually create a new field in your system called "RSS description". You would want to set that up as a regular textfield (without the WYSIWYG options) which will help with the HTML special characters. You can also limit the characters there as well.

Does that sound like it would work for you? Let me know :). You could actually just use a PHP script on your page to limit the length, but that would probably start chopping sentences right in half.

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] RSS not pulling in any info

By isdoo - June 18, 2009

Solved this by (posted for the benefit of others who may also require it.)

<?php

// Usage: < ?php print maxWords($content, 25); ? >
function maxWords($textOrHtml, $maxWords) {
$text = strip_tags($textOrHtml);
$words = preg_split("/\s+/", $text, $maxWords+1);
if (count($words) > $maxWords) { unset($words[$maxWords]); }
$output = join(' ', $words);

return $output;
}
?>


<?php foreach ($news1Records as $record): ?>
<item>
<title><?php echo htmlspecialchars($record['title']) ?></title>
<link>http://www.fansfocus.com<?php echo $record['_link'] ?></link>
<description><?php echo maxWords(htmlspecialchars($record['content']), 75); ?>....</description>
<pubDate><?php echo date("r", strtotime($record['date'])) ?></pubDate>
<guid isPermaLink="true">http://www.fansfocus.com<?php echo $record['_link'] ?></guid>
</item>
<?php endforeach ?>


I am limiting the words to say 75 words and ten adding a ....

after all I want anyone reading it to come to the site to view the full article :)

Thanks again.