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
Comments
` print "
$randomImage->getCustomImage(85, null, null, null, null, null, null).
"' width=620 height=180 alt=".'"'.
htmlspecialchars($randomAlt1, ENT_QUOTES).
":n".htmlspecialchars($randomImage->getTitle(), ENT_QUOTES).
'" />';`
Caveat: I have not tried this!
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
`" title="View album: <?php echo getAlbumTitle();?>"><?php printAlbumThumbImage(getAlbumTitle()); ?>`
to get a random albumthumb i need to replace the
`<?php printAlbumThumbImage(getAlbumTitle()); ?>`
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....
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.
Thanks, Randy