Member
Member
shortsn   2007-12-29, 23:06
#1

Hello there,

to get some activity to my gallery (not online yet) i don't want to pick a thumbnail for every album.

is there any way to do that randomly? so everytime a visitor is looking at the album overview page the thumbnails he is looking at should differ from those another person would see. would be great that the album thumbnail is picked randomly by the script.

there is a function in template-functions.php called "getRandomImagesAlbum()" - can i use that for this type of situation and if so - how? if not - how else could i achieve a random display of the album thumbnails.

i'm not able to write a function myself... i lack php skills.

plz help
thx

Member
Member
sbillard   2007-12-29, 23:44
#2

You could use getRandomImagesAlbum() to get an image for your thumb. Then you would have to use
` print "

Member
Member
shortsn   2007-12-30, 01:00
#3

thx for that quick reply...
but i'm sorry - not enough knowledge to know were to put your suggestions

when look at the default theme

there is a line in index.php
">

to get a random albumthumb i need to replace the
``
code with something else... i guess, right?

another tricky thing might be to get that working with subalbums too...

sad, that nobody else had that request before....

Member
Member
sbillard   2007-12-30, 01:26
#4

You are correct to replace the ``

Maybe you should put in a feature request. Perhaps more people would be interested. It would be possible to change the behavior of getting the thumbnail to be random, but it would add some overhead. Right now we don't look past the first image in the album.

Member
Member
randee   2008-01-01, 03:55
#5

ya! Random pictures would be cool! Can't wait to see it.

Thanks, Randy

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