?> album"> <?php if ($zpmas_sscount > $_zp_gallery->getNumImages(2)) { $zpmas_sscount = $_zp_gallery->getNumImages(2); } ?> <?php if ($zpmas_albumorimage == 'image') { printImageStatistic($zpmas_sscount, $zpmas_functionoption, '', true, false, false, 40, '', $zpmas_ss_size_w, $zpmas_ss_size_h, true); } else { if ($zpmas_albumorimage == 'album') { if ($zpmas_sscount > $_zp_gallery->getNumAlbums(false, true)) { $zpmas_sscount = $_zp_gallery->getNumAlbums(false, true); } printAlbumStatistic($zpmas_sscount, $zpmas_functionoption, true, false, false, 40, '', $zpmas_ss_size_w, $zpmas_ss_size_h, true); } else { ?> <ul> <?php $randomList = ""; for ($i = 1; $i <= $zpmas_sscount; $i++) { $randomImage = getRandomImages(); if (is_object($randomImage) && $randomImage->exists) { $imageName = $randomImage->getTitle(); if (strpos($randomList, $imageName)) { $i--; } else { $randomList = $randomList . ' ' . $imageName; $randomImageURL = html_encode($randomImage->getLink()); echo '<li><a href="' . $randomImageURL . '" title="' . sprintf(gettext('View image: %s'), html_encode($randomImage->getTitle())) . '">';
case "image-toprated": $zpmin_albumorimage = 'image'; $zpmin_functionoption = 'toprated'; break; case "random-daily": $zpmin_albumorimage = ''; $zpmin_functionoption = 'daily'; break; } ?> <?php if ($zpmin_albumorimage == 'image') { printImageStatistic(1, $zpmin_functionoption, '', true, true, false, 40, '', 535, 535, false); } else { if ($zpmin_albumorimage == 'album') { printAlbumStatistic(1, $zpmin_functionoption, true, true, false, 40, '', 535, 535, false); } else { $randomImage = getRandomImages($zpmin_functionoption); if (is_object($randomImage) && $randomImage->exists) { $randomImageURL = html_encode($randomImage->getLink()); echo '<a href="' . $randomImageURL . '" title="' . sprintf(gettext('View image: %s'), html_encode($randomImage->getTitle())) . '">'; $html = "<img src=\"" . html_encode($randomImage->getCustomImage(535, NULL, NULL, NULL, NULL, NULL, NULL, TRUE)) . "\" alt=\"" . html_encode($randomImage->getTitle()) . "\" />\n"; echo zp_apply_filter('custom_image_html', $html, false); echo "</a>"; echo '<h3><a href="' . $randomImageURL . '" title="' . sprintf(gettext('View image: %s'), html_encode($randomImage->getTitle())) . '">' . html_encode($randomImage->getTitle()) . '</a></h3>'; echo "<p>" . zpFormattedDate(getOption('date_format'), strtotime($randomImage->getDateTime())) . "</p>"; } else { echo gettext('No Images Exist...'); } } }
/** * Prints the latest updated albums * * @param string $number the number of albums to get * @param bool $showtitle if the album title should be shown * @param bool $showdate if the album date should be shown * @param bool $showdesc if the album description should be shown * @param integer $desclength the length of the description to be shown * @param string $showstatistic * "hitcounter" for showing the hitcounter (views), * "rating" for rating, * "rating+hitcounter" for both. * @param integer $width the width/cropwidth of the thumb if crop=true else $width is longest size. (Default 85px) * @param integer $height the height/cropheight of the thumb if crop=true else not used. (Default 85px) * @param bool $crop 'true' (default) if the thumb should be cropped, 'false' if not * @param bool $firstimglink 'false' (default) if the album thumb link should lead to the album page, 'true' if to the first image of theh album if the album itself has images * @param bool $collection only if $albumfolder is set: true if you want to get statistics to include all subalbum levels */ function printLatestUpdatedAlbums($number = 5, $showtitle = false, $showdate = false, $showdesc = false, $desclength = 40, $showstatistic = '', $width = NULL, $height = NULL, $crop = NULL, $albumfolder = '', $firstimglink = false, $collection = false) { printAlbumStatistic($number, "latestupdated", $showtitle, $showdate, $showdesc, $desclength, $showstatistic, $width, $height, $crop, $albumfolder, $firstimglink, $collection); }
/** * Prints the top voted albums * * @param string $number the number of albums to get * @param bool $showtitle if the album title should be shown * @param bool $showdate if the album date should be shown * @param bool $showdesc if the album description should be shown * @param integer $desclength the length of the description to be shown * @param string $showstatistic "hitcounter" for showing the hitcounter (views), * "rating" for rating, * "rating+hitcounter" for both. * @param integer $width the width/cropwidth of the thumb if crop=true else $width is longest size. (Default 85px) * @param integer $height the height/cropheight of the thumb if crop=true else not used. (Default 85px) * @param bool $crop 'true' (default) if the thumb should be cropped, 'false' if not */ function printLatestUpdatedAlbums($number = 5, $showtitle = false, $showdate = false, $showdesc = false, $desclength = 40, $showstatistic = '', $width = 85, $height = 85, $crop = true) { printAlbumStatistic($number, "latestupdated", $showtitle, $showdate, $showdesc, $desclength, $showstatistic, $width, $height, $crop); }