Setting articles to random order is not random on article change
- waseemhussain
- Topic Author
- Offline
- New Member
Less
More
- Thank you received: 0
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.
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.
- Saka
- Offline
- Administrator
13 years 5 months ago #6183
by Saka
Emir Sakic
www.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.
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.