![]() |
|
faster/easier random image based on tag? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: faster/easier random image based on tag? (/thread-4041.html) |
faster/easier random image based on tag? - albeezie - 2008-11-09 Hello, I currently have my random images loop set to do the following:
Is there an easier (or faster) method of picking a random image based on tag that I am missing, such as filtering out the specific tag, then randomizing based on that? The photos I want to filter out are maybe about 5-10% of my entire collection so the loop may run for a while before it finishes, the way I have it set now. Thanks for any input. faster/easier random image based on tag? - sbillard - 2008-11-09 You could use the search object to get all the images with the specific tag then randomly pick out one from the list. The search engine will return an array of images. But unlike the normal album getImages(), the array returned by the search engine has two dimensions. Each element contains a folder name and an image name. faster/easier random image based on tag? - albeezie - 2008-11-09 So, what I am doing is the most efficient way to get the image along with the description, link, and all of that? Ok, thanks then. |