PDA

View Full Version : will rss feeds displayer boxes sort according to date?



rcw
01-12-2008, 05:32 PM
1) Script Title: rss box

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex18/rssdisplaybox/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??

ddadmin
01-13-2008, 09:12 AM
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:


$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 (http://simplepie.org/wiki/) 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.