/** * Prints album statistic according to $option as an unordered HTML list * A css id is attached by default named '$option_album' * * @param string $number the number of albums to get * @param string $option * "popular" for the most popular albums, * "latest" for the latest uploaded by id (Discovery) * "latest-date" for the latest by date * "latest-mtime" for the latest by mtime * "latest-publishdate" for the latest by publishdate * "mostrated" for the most voted, * "toprated" for the best voted * "latestupdated" for the latest updated * "random" for random order (yes, strictly no statistical order...) * @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 integer $threshold the minimum number of ratings (for rating options) or hits (for popular option) an album must have to be included in the list. (Default 0) * @param bool $collection only if $albumfolder is set: true if you want to get statistics to include all subalbum levels */ function printAlbumStatistic($number, $option, $showtitle = false, $showdate = false, $showdesc = false, $desclength = 40, $showstatistic = '', $width = NULL, $height = NULL, $crop = NULL, $albumfolder = '', $firstimglink = false, $threshold = 0, $collection = false) { $albums = getAlbumStatistic($number, $option, $albumfolder, $threshold, $collection); echo "\n<div id=\"" . $option . "_album\">\n"; echo "<ul>"; foreach ($albums as $album) { printAlbumStatisticItem($album, $option, $showtitle, $showdate, $showdesc, $desclength, $showstatistic, $width, $height, $crop, $firstimglink); } echo "</ul></div>\n"; }
/** * Prints album statistic according to $option as an unordered HTML list * A css id is attached by default named '$option_album' * * @param string $number the number of albums to get * @param string $option "popular" for the most popular albums, * "latest" for the latest uploaded, * "mostrated" for the most voted, * "toprated" for the best voted * "latestupdated" for the latest updated * @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 printAlbumStatistic($number, $option, $showtitle = false, $showdate = false, $showdesc = false, $desclength = 40, $showstatistic = '', $width = 85, $height = 85, $crop = true) { $albums = getAlbumStatistic($number, $option); echo "\n<div id=\"" . $option . "_album\">\n"; echo "<ul>"; foreach ($albums as $album) { printAlbumStatisticItem($album, $option, $showtitle, $showdate, $showdesc, $desclength, $showstatistic, $width, $height, $crop); } echo "</ul></div>\n"; }