Keyword

Feed Not coming in right order

More
14 years 1 month ago #6834 by therealkw15
Replied by therealkw15 on topic Re: Feed Not coming in right order
This will be of historic interest probably, as it applies to version 1.4. However as it is doing what I want, I'm reluctant to change, other than to offer a refinement of my previous solution.

Recall I was getting feeds derived from screen scraping being jumbled up, as they all came with the same date and time, and the sort did bad things to the natural order. So I disabled the sort by commenting out the call, which was fine if the module was only reading one feed.

However I now want to read multiple feeds, have them sorted by date and time, yet retain the unjumbled sort for individual screen-scraped feeds...

This has been achieved by the simple measure of checking if there is a second feed. If so, then sort. If not, don't sort. The line of code that does that is the same one as before, but changed to:

if ($srfr_url02) { usort($first_items, "sort_items");}

Seems to work!

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum