Hi,
What do I have to modify in the following code to get rid of the random function and to specify one image to be displayed as heading image?
[quote]
function printHeadingImage($randomImage) {
global $_zp_themeroot;
$id = getAlbumId();
echo '<div id="randomhead">';
if (is_null($randomImage)) {
echo '<img src="'.$_zp_themeroot.'/images/header_zp.jpg" alt="'.gettext('There were no images from which to select the random heading.').'" />';
} else {
$randomAlbum = $randomImage->getAlbum();
$randomAlt1 = $randomAlbum->getTitle();
if ($randomAlbum->getAlbumId() <> $id) {
$randomAlbum = $randomAlbum->getParent();
while (!is_null($randomAlbum) && ($randomAlbum->getAlbumId() <> $id)) {
$randomAlt1 = $randomAlbum->getTitle().":\n".$randomAlt1;
$randomAlbum = $randomAlbum->getParent();
}
}
$randomImageURL = htmlspecialchars(getURL($randomImage));
if (getOption('allow_upscale')) {
$wide = 620;
$high = 180;
} else {
$wide = min(620, $randomImage->getWidth());
$high = min(180, $randomImage->getHeight());
}
echo "<img src='".
htmlspecialchars($randomImage->getCustomImage(NULL, $wide, $high, $wide, $high, NULL, NULL, !getOption('Watermark_head_image'))).
"' width='$wide' height='$high' alt=".'"'.
htmlspecialchars($randomAlt1, ENT_QUOTES).
":\n".htmlspecialchars($randomImage->getTitle(), ENT_QUOTES).
'" />';
}
[/quote]
Thank you