PDA

View Full Version : Problem displaying "Description" in Pausing RSS Scroller w/ CDATA tags



jpm121
05-07-2007, 07:36 PM
1) Script Title: Pausing RSS Scroller

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/rsspausescroller/index.htm

3) Describe problem:

I'm using a little program called RSS Builder to generate the XML file for my RSS feed. It is very basic, I just need something so a user can update our website with the day's cancellations and scheduling changes.

However, the program uses CDATA tags in the Description element of the XML it generates, and it appears that RSS Pause Scroller doesn't like those -- it shows the Title and Date/Time info, but nothing from the Description field. I verified that I have "data+description" selected in the script. I confirmed that all my script settings are correct by successfully displaying the sample CNN/Slashdot sample scripts.

Am I missing something terribly simple here? If I manually edit the XML and remove the CDATA tag, the feed loads perfectly, scrolls, etc.

I'm very new to RSS feeds and DHTML in general, but I've done a few searches and haven't found anything so far. After fixing a few syntax errors it seems to be pretty clean when I run it through an RSS validator.

Here is the XML I'm using...


<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<!--FTPSite dfpd website-->
<channel>
<generator>RSS Builder by B!Soft</generator>
<title>Park District - Rainouts &amp; Cancellations</title>
<link>http://www.zzz.org/index.html</link>
<description>Scheduling, rainout and cancellation notes for Park District sports leagues, activities, and classes. For more information call 847-2555.
</description>
<language>en-us</language>
<managingEditor>jimk@zzz.org</managingEditor>
<webMaster>jpm@zzz.org</webMaster>
<item>
<title>Third Topic</title>
<pubDate>Mon, 7 May 2007 13:58:20 -0500</pubDate>
<description><![CDATA[Description for third topic....]]></description>
<link>http://www.zzz.org/index.html</link>
<author>jpm@zzz.org</author>
</item>
<item>
<title>Second topic</title>
<pubDate>Mon, 7 May 2007 13:56:27 -0500</pubDate>
<description><![CDATA[This is the second topic description]]>
</description>
<link>http://www.zzz.org/index.html</link>
<author>jpm@zzz.org</author>
<comments>http://www.zzz.org/index.html</comments>
<category>None</category>
</item>
</channel>
</rss>

If anyone has any ideas, I'd appreciate it.

ddadmin
05-08-2007, 07:55 AM
Hmmm this could be a LastRSS problem (in which you may need to ask the author), but just to make sure, can you post a link to the problem example on your site?

jpm121
05-08-2007, 02:45 PM
Sure... this is just a demo page, I left the CNN sample feed in place to be sure it's reading the feeds. I did do the chmod on the cache directory to 777. Also, the feed does work with other RSS readers, I have it on my google homepage and all the text comes over properly.

http://www.dfpd.org/demo.htm

(Please don't give me grief over the design of the page, it wasn't my doing.) :rolleyes:

The XML file is at http://www.dfpd.org/sportsinfo.xml

I did try a few searches for "lastrss" and "cdata" and didn't find anything too helpful...

woodie63
05-08-2007, 03:41 PM
hi, search for:
// -------------------------------------------------------------------
// Public properties
// -------------------------------------------------------------------
var $default_cp = 'UTF-8';
var $CDATA = 'content';
var $cp = '';
var $items_limit = 3;
var $stripHTML = False;
var $date_format = '';

// ------------------------------------

in lastrss.php and replace
var $CDATA = 'nochange'; with
var $CDATA = 'content';

this worked for me

jpm121
05-08-2007, 03:43 PM
Ah, that certainly shows promise. Woodie, I'll give that a shot tomorrow morning and see how it does -- seems like you're on the right track.

When I saw the line in lastrss.php that says "don't edit below here" I decided to take their advice!

I'll report back with an update...

jpm121
05-09-2007, 04:11 PM
Awesome, that did the trick.

Hopefully this helps someone else down the road. :)

sarahwithanh
06-30-2007, 06:03 PM
Feakin' awesome... I posted this same issue as a reply to someone elses problem. This also fixed my issue, well... half of it. :) TY.