hello
I followed your advice and wrote the following code in the Codeblock1 of a new page.
`
<?php
$potd = unserialize(getOption('picture_of_the_day'));
$image_of_the_day = NULL;
if (date('Y-m-d', $potd['day']) == date('Y-m-d')) {
$specific_album = new Album($_zp_gallery, $potd['folder']);
$image_of_the_day = newImage($specific_album, $potd['filename']);
}
if (is_null($image_of_the_day) || !($image_of_the_day->exists)) {
$specific_album = new Album($_zp_gallery, "temp/essai");
$image_of_the_day = getRandomImagesAlbum($specific_album);
$potd = array('day' => time(), 'folder' => $result['folder'], 'filename' => $imageName);
setOption('picture_of_the_day', serialize($potd));
}
if (is_object($image_of_the_day) && $image_of_the_day->exists) {
echo "<a>";
echo "<img src=\"".htmlspecialchars($image_of_the_day->getCustomImage(700, null, null, null, null, null, null, true))."\" alt=\"" . html_encode($image_of_the_day->getTitle()) . "\" />\n";
echo "</a>";
}
?>
`
but it does not work and I always have a random image that is provided.
- the image is chosen throughout the gallery (and not in "temp/essai" album as requested).
- the image changes each refresh of the browser.
Can you help me to solve my problem ?