Results 1 to 2 of 2

Thread: will rss feeds displayer boxes sort according to date?

  1. #1
    Join Date
    Jan 2008
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default will rss feeds displayer boxes sort according to date?

    1) Script Title: rss box

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

    3) Describe problem: Will the Rss feeds displayer boxes sort according to date? If so, do I have to set this or is it done automatically or not??

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

    Default

    The script by default displays the items in the order as they appear in the RSS feed, which is usually by date. But you can explicitly sort the results inside main.php, in between these lines:

    Code:
    $feed->cache_max_minutes($cachetime);
    $feed->feed_url($rssurl);
    $feed->init();
    $max = $feed->get_item_quantity($feednumber);
    You'll need to check SimplePie's documentation for what function to call to sort the items. Note however that the version of SP used in this script is an older version of what's currently available on their website, so cerain functions may not be available or are different in syntax.

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
  •