Results 1 to 5 of 5

Thread: Manipulate XML in RSS ticker

  1. #1
    Join Date
    Mar 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Manipulate XML in RSS ticker

    Hi.

    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?

    Thanks.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Please don't double post. And, if this is a DD script, please post a link to it.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    As John mentioned, please include a link to the DD script in question in your post. See this thread 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:

    Code:
    $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 homepage is down. Hopefully it's temporary.

  4. #4
    Join Date
    Mar 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks.

    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:

    http://www.dynamicdrive.com/dynamici...ajax/index.htm

    Jon

  5. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •