Author Topic: Setting articles to random order is not random on article change  (Read 591 times)

waseemhussain

  • Newbie
  • *
  • Posts: 5
    • View Profile
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.

Saka

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,495
    • View Profile
    • Sakic.Net
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.