Member
Member
shaggy70   2010-12-13, 14:45
#1
Hi, I have the random image working from ll albums, with this code:

<?php define('WEBPATH', 'zenphoto');
require_once(WEBPATH . "/zp-core/template-functions.php");?>

<?php $randomImage = getRandomImages();
$randomImageURL = getURL($randomImage);
echo "
<img src='". $randomImage->getSizedImage(getOption('image_size')) . "'
alt=\"random image\n" . $randomImage->getTitle() . '" />';
?>

i have tried to use this to add the getRandomImagesAlbum($album) but cant work out how and where?

please help..

Thanks
Member
Member
shaggy70   2010-12-13, 14:55
#2
a bit clearer... I have the random image working from all albums, with this code:

<?php define('WEBPATH', 'zenphoto');
require_once(WEBPATH . "/zp-core/template-functions.php");?>

in my html

<?php $randomImage = getRandomImages();
$randomImageURL = getURL($randomImage);
echo "
<img src='". $randomImage->getSizedImage(getOption('image_size')) . "'
alt=\"random image\n" . $randomImage->getTitle() . '" />';
?>
Administrator
Administrator
acrylian   2010-12-13, 15:01
#3
Did you set the `$album` that `getRandomImagesAlbum($album)` requires?
Member
Member
shaggy70   2010-12-13, 23:42
#4
Hi Acrylian,

where do i do that, can you show me exactly?
Member
Member
shaggy70   2010-12-15, 04:58
#5
Hi,

can anyone help me with this.. really struggling with it.

thanks.
Administrator
Administrator
acrylian   2010-12-15, 11:10
#6
Please read the tutorials, it is not really that hard to pass the album name.
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.