![]() |
|
Get Random Images from specific album - 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: Get Random Images from specific album (/thread-9929.html) |
Get Random Images from specific album - reneesanguinetti - 2012-05-03 Hello, I changed it to this: I am probably missing something very simple. Any suggestions would be appreciated. Thank-you! Zenphoto version 1.4.2.3 [9980] (Official Build) Get Random Images from specific album - acrylian - 2012-05-03 Parameters look good so far. What is the probably actually? Nothing shows up? Error, if which? Get Random Images from specific album - reneesanguinetti - 2012-05-03 No errors posted and the page shows up, but the random images still are drawn from all albums. Just as if I changed nothing. Get Random Images from specific album - acrylian - 2012-05-03 If you read the doc of that function it says "rootAlbum" which means it includes all sub albums, too. Note that in the 1.4.3 dev the image_album_statistics plugin's function Get Random Images from specific album - reneesanguinetti - 2012-05-03 Hello, Get Random Images from specific album - acrylian - 2012-05-03 I am not sure what you mean. You need to tell the function what album to use. So you need to know it. Have you checked what album you actually get on the page you trying to use this? What exactly is this supposed to do? Get Random Images from specific album - reneesanguinetti - 2012-05-03 I have test albums (top level) called appliances and another called baby products. Using $ssalbum = $_zp_current_album->getFolder()=='appliances'; I want the random images to come from the appliances album only. [list] [*] [*] [*] [*] [/list] [list]
[/list] Get Random Images from specific album - acrylian - 2012-05-03 Your code is not properly escaped (use backticks!). If you want to have only and always the album "appliance" why do you have Get Random Images from specific album - reneesanguinetti - 2012-05-03 When I tried to find the solution on the forum this is the code that I thought would work '$_zp_current_album->getFolder()=='name';'. "name" being album name. How should I tell the function what album to use? Get Random Images from specific album - reneesanguinetti - 2012-05-03 Hello,
Seems to work. Thank-you for your time! Get Random Images from specific album - acrylian - 2012-05-04 Quote:$_zp_current_album->getFolder()=='name So your change is exactly what you wish to do. |