'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?

} else if ($idxTo == '- random -') {
    $idx = $idxNow;
     while ($countSlides > 1 && $idx == $idxNow) {
       $idx = rand() % $countSlides;
    }
}

Type: Discussion
Status: Archived
fridayphoto
View Replies:
tbcrowe replied on at Permalink Reply
tbcrowe
My first thought was that this would be a very simple change. Due to complexities in the way the javascript is written and situations where individual slides have their own "random" prev/next orders, though, it was more complicated.

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.
fridayphoto replied on at Permalink Reply
fridayphoto
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/...
tbcrowe replied on at Permalink Reply
tbcrowe
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.
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
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.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.