View Full Version : Manipulate XML in RSS ticker

Jon Weir
03-29-2006, 04:02 PM

I have set up and used Ajax Ticker RSS feeds. I can use XSLT to display the XML I require. I can't combine the two. How can I adapt an RSS Ticker (for example one of the Dynamic Drive examples) to display, say, the first three XML items only and not the whole feed?


03-29-2006, 04:53 PM
Please don't double post. And, if this is a DD script, please post a link to it.

03-29-2006, 08:37 PM
As John mentioned, please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

To answer your question though, it's certainly possble to limit the number of RSS items displayed for any of the RSS scripts on DD. The process is all the same. Inside the version of bridge.php for the script, beneath the line:

$rss->cache_dir = 'cache';
$rss->items_limit= 8;

The code in red is new, and causes only the first 8 items to be displayed. This is a LastRSS feature, not the ticker script itself per say.

p.s: I just noticed the LastRSS (http://lastrss.webdot.cz/) homepage is down. Hopefully it's temporary.

Jon Weir
03-30-2006, 07:39 AM

I have an RSS feed for earthquake magnitudes and want to display the highest. I need to sort descending then use your code to display the first one. Any idea how I can sort descending?

The DD Script is the Advanced RSS Ticker at:



03-30-2006, 07:14 PM
I'll need to see the contents of the RSS feed, specifically, the values for the earthquake magnitudes and how they're defined. Do you have a URL to your page?