specify album to take random image from

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

Comments

  • 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() . '" />';
    ?>
  • acrylian Administrator, Developer
    Did you set the `$album` that `getRandomImagesAlbum($album)` requires?
  • Hi Acrylian,

    where do i do that, can you show me exactly?
  • Hi,

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

    thanks.
  • acrylian Administrator, Developer
    Please read the tutorials, it is not really that hard to pass the album name.
Sign In or Register to comment.