Yeah I know It's old topic but I thing I have solution function display_thumbnails($album, $cat, $page, $thumbcols, $thumbrows, $display_tabs)
{
global $CONFIG, $AUTHORIZED;
global $album_date_fmt, $lang_display_thumbnails, $lang_errors, $lang_byte_units;
$thumb_per_page = $thumbcols * $thumbrows;
$lower_limit = ($page-1) * $thumb_per_page;
$album_desc = get_album_desc($_GET[album]);
$pic_data = get_pic_data($album, $thumb_count, $album_name, $lower_limit, $thumb_per_page);
$total_pages = ceil($thumb_count / $thumb_per_page);
$i = 0;
if (count($pic_data) > 0) {
foreach ($pic_data as $key => $row) {
$i++;
$album_desc = get_album_desc($_GET[album]);
$pic_title =$album_desc.
$lang_display_thumbnails['filename'].$row['filename']."\n".
$lang_display_thumbnails['filesize'].($row['filesize'] >> 10).$lang_byte_units[1]."\n".
$lang_display_thumbnails['dimensions'].$row['pwidth']."x".$row['pheight']."\n".
$lang_display_thumbnails['date_added'].localised_date($row['ctime'], $album_date_fmt);
if ($album == 'lastalb'){
$res = cpg_db_query("SELECT p.* FROM {$CONFIG['TABLE_ALBUMS']} AS a,{$CONFIG['TABLE_PICTURES']} AS p WHERE p.pid = a.thumb AND a.aid = {$row['aid']}");
if (mysql_num_rows($res)){
$row2 = mysql_fetch_assoc($res);
$row = array_merge($row, $row2);
}
}
$pic_url = get_pic_url($row, 'thumb');
if (!is_image($row['filename'])) {
$image_info = getimagesize(urldecode($pic_url));
$row['pwidth'] = $image_info[0];
$row['pheight'] = $image_info[1];
}
$image_size = compute_img_size($row['pwidth'], $row['pheight'], $CONFIG['thumb_width']);
$thumb_list[$i]['pos'] = $key < 0 ? $key : $i - 1 + $lower_limit;
$thumb_list[$i]['pid'] = $row['pid'];
$thumb_list[$i]['image'] = "<img src=\"" . $pic_url . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"{$row['filename']}\" title=\"$pic_title\"/>";
$thumb_list[$i]['caption'] = get_album_desc($_GET[album]);
$thumb_list[$i]['admin_menu'] = '';
$thumb_list[$i]['aid'] = $row['aid'];
}
theme_display_thumbnails($thumb_list, $thumb_count, $album_name, $album, $cat, $page, $total_pages, is_numeric($album), $display_tabs);
} else {
theme_no_img_to_display($album_name);
}
}
There is only one problem, it show album description when I watching thumbnails in album, In lastalb I got only "Album not found" I thing it's short way to modify it to get album descriprion instead of title and date ( I don't need it ) but any idea what to change in script above?