Setting articles to random order is not random on article change

13 years 5 months ago #6179 by waseemhussain
Hi

I found that if I set my selected articles to show in random order, then on the first view they will be totally random on each page load.

But when the articles change, then they will always change in the exact same order regardless of any page chang er reload. The next articles showing up are always in the same order.

I fixed it by going into the file: mod_ajaxscroller.php going to line  407 (under $order=='random') and changing: ksort($rows); into shuffle($rows);

That change ensured that the random order is random when the articles change and not just on the first artciles shown on each page load.

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

13 years 5 months ago #6183 by Saka
They are random for different users and different pages.

It can't be random for same user and same page in the same time because you would then see duplicate items and never fetch all articles because of the character of AJAX technique.

Emir Sakic
www.sakic.net

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

About us

We provide high quality Joomla components created by a co-founder and original core developer of Joomla. For over a decade, our products have been used by more than 20.000 webmasters around the world.

Stay in touch