The simpler media website CMS
hi
in some albums, I set custom images order, and I use random
as custom fields.
on some albums, on each refresh I have a new random order but on on some other albums, I have only one random order that remains on each refresh.
the 1st case seems to be for "normal" albums, and the 2nd case seems to be on dynamic albums.
can you explain how works that custom images order, especially on random
custom fields?
Comments
There is no such
random
field. The custom order refers to exsting database columns (here called fields). All default order options/fields are such columns (e.g.Publish
=show
etc.). The order is then sorted by the value of the field chosen. So if you use a non existing field you get naturally unpredictable results. It is that way for ages btw.are you sure?
I use this before, following advice from zenphoto team (I don't remeber who and when, I can't find a topic on this on the forum) and I can see this on zenphoto code: http://docs.zenphoto.org/source-function-lookupSortKey.html#243-295
the random display of pictures seems to be working now on my website.
the problem is that sometimes it works, sometimes it doesn't work, and I don't understand why.
of course, it would be nice if this behavior was documented on the admin/backend
Sorry, yes, my bad indeed "random" is indeed a setting. Well, I can't remember everything offhand as I not always can look right into the code. (And I admit I rarely use custom field sorting myself).
Actually if "random" is a default setting it should be in the list right away actually.
Random is really random so the results are random ;-) If I understadn right it does not work for dynamic albums. That is probably - a guess without looking into code - because they are "saved searches" and these are cached if you enable the search cache. So if you have the search cache enabled try to disable it.
There is a utility button to clear the search cache. As usual the cache manager plugin must be enabled.
Alternatively you can disable it by setting the option to 0.
The search cache is stored in its own database table and not on the file system.
thanks for the informations