is it possible to do a random sort order for search-pages? Or can i switch the sort order in some way when the page is loaded - like sometimes ordered descending and sometimes ascending?
I am looking for the same thing.. This option is still missing from the selection in the backend as a sortorder choice.. It would then require to add 'ORDER BY RAND()' to the SQL used to retrieve the albums/images.
I really suggest that to be added in later versions..
works fine, but what I would need help with now is how to 'overwrite' the original $_zp_current_album[subalbums] with the new array from above in the album object so that the next_album loop then displays them
Comments
I really suggest that to be added in later versions..
However my alternative idea is to shuffle the object array before display.
for that I use a 2D shuffle function from here:
http://php.net/manual/en/function.shuffle.php
$shuffled_subalbum = twodshuffle($_zp_current_album->getSubalbums());
works fine, but what I would need help with now is how to 'overwrite' the original
$_zp_current_album[subalbums] with the new array from above in the album object so that
the next_album loop then displays them
Can someone help with that ?
something like :
$_zp_current_album['subalbums'] = $shuffled_subalbum ???
Thanks again / breglis
It would be possible to do two things:
1. add "random" as a sort order
2. provide an option that is used for the order of searches. (Currently it uses the gallery default.)
But, there is a method for making featrue suggestions. Please read the forum posting rules.