Member
Member
paulymat   2013-07-23, 02:46
#1

hi there,

i've been reading around these forums and i can't seem to find what i want so i'll just ask. Is there a plugin or a bit of code that someone is willing to share that i could add to the page that puts a thumbnail of a random image from an album and links too it if someone wants to click on it?

Member
Member
gjr   2013-07-23, 04:46
#2

http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functionprintRandomImages

You will see in the doc of that link how to pull from a specific album.

So for example, if I want to get 3 random images from the album (folder name=vacation) vacation:

`

printRandomImages(3,null,'album','vacation')

`

Member
Member
paulymat   2013-07-23, 05:08
#3

thanks for the info mate! i'm still having a little bit of trouble making this work... sorry in advance if the question is stupid but i'm still fumbling my way through this.

now what Im trying to do it edit the image.php file of the template i'm using and just make a smaller "thumbmail" size random image below the main image with that "thumbnail" linking to that image... is there any way you could help with that?

muchas gracias if you can.

Administrator
Administrator
acrylian   2013-07-23, 09:11
#4

I would like to suggest to read the theming tutorial for the basics.

Member
Member
Papyrus   2013-07-23, 14:00
#5

$randomImage = printRandomImages(3, null,'album','vacation');
if (is_object($randomImage)) {
$randomImageURL = html_encode(getURL($randomImage));

Not really in front of a machine where I can test that out right now, but I think it'll do what you're asking. Massage and style any elements you need to make it work.

Member
Member
vincent3569   2013-07-23, 16:08
#6

gjr gave you the right tip, don't you think ?

to display a radom pict from gallery in image.php, add something like that
`

`

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