Member
Member
albeezie   2008-11-09, 06:03
#1

Hello,

I currently have my random images loop set to do the following:

  • pick random image
  • if random image does not have a specific tag or specific size, pick again.

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.

Member
Member
sbillard   2008-11-09, 18:15
#2

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.

Member
Member
albeezie   2008-11-09, 19:02
#3

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.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.