'Random' could use tweaking
Permalink Browser Info Environment
Hi there, I love the addon but would like to improve on the random order capabilities. Too often, the random shows the same slide multiple times before showing many others.
Is it possible to mend the code below so that it doesn't display the same image twice on a page unless it's looped through all of the possible slides?
Is it possible to mend the code below so that it doesn't display the same image twice on a page unless it's looped through all of the possible slides?
} else if ($idxTo == '- random -') { $idx = $idxNow; while ($countSlides > 1 && $idx == $idxNow) { $idx = rand() % $countSlides; } }
Type: | Discussion |
---|---|
Status: | Archived |
Thanks man! I've installed the update and it seems a bit better but is still repeating some more than others. I'm using a set for my source files and they're order is set to 'position' whereas the main slider is set to 'random'.
See it here :
http://www.bigbearsalmoncharters.com/site/...
See it here :
http://www.bigbearsalmoncharters.com/site/...
You're right. There was a bug in the change in 2.2.3. It has been corrected in 2.2.4. Thanks for reporting the problem.
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.
To re-open this issue, reply to this message.
To re-open this issue, reply to this message.
I did update the code so that if the overall slide order setting for the slider is "Random", then the slides are initialized to a random order and then are cycled through repeatedly in that order. I'm not convinced that's the right solution, though, so I may reverse that change in a later version. This change is in version 2.2.3.