View Full Version : RSS ticker (Ajax) stopped working.

05-02-2016, 02:13 PM
1) Script Title:
RSS ticker (Ajax)

2) Script URL (on DD):

3) Describe problem:
The CNN part of the script just stopped working. I don't understand why, and would be grateful, if someone from DD would fix it to work again.

Thank you, for these scripts.


05-02-2016, 06:00 PM
Try out this updated version of the script:


05-03-2016, 03:37 AM
It seems the problem is specific to the CNN feed in that not every one of their RSS entries carries a description, when the script simply expects this to always be the case. You can try the below modified .js file that checks whether an entry has a description before attempting to access it. I've also updated the official script's .js file with this modification as well.

05-03-2016, 04:16 AM
Yes, that's what I determined. I also decided that any feed might have any given expected field missing, so the code I wrote takes that into account. I'm also updating for other improvements (reinstate fade-in for modern browsers, add more options and better error reporting) and to use simplepie instead of LastRSS to parse the feeds. In my experience simplepie is better with the non-English/non-standard characters used in many feeds.

Also, your version results in "undefined" appearing as the description for missing descriptions, at least in some browsers. Mine tests for each type of info, setting the array entry value to '' (empty as opposed to leaving it undefined), if no information available for that field in that item.

Hmm, simplepie has been updated and no longer works as before, newer versions of PHP barf on the old version. LastRSS - outdated as it might be, may be the best current choice for this script as it works, mostly. Or not, all I had to do was suppress a warning and it (old simplepie) was fine, so far. I know it (the old simplepie) handles non-standard characters better. Oh, and I've just tried - the new simplepie is fairly easy to use (takes care of the problems), though is not so lightweight, nor is it as convenient to install. We would have to make our own install (include it in the zip like we have before anyway).

05-04-2016, 12:01 AM
Here's my latest demo:


It's using the latest full release of simplepie, reinstates and smooths out the fade option for modern browsers, has some other options as well. Takes care of the missing description issue and will react well to other missing fields, all without showing "undefined" for any that are missing. Option also to exclude items with missing fields. Option to exclude selected tags from the description field. More. I'm going to fully document this pretty soon.

Its rssticker.js (http://john.dynamicdrive.com/rssticker/rssticker.js) file can still be used with LastRSS or earlier versions of simplepie if desired, though - unless you have an older version of PHP on your server, and are limited to using one of those, I would not recommend that.