forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 modpack by Stramm => Topic started by: Walker on January 09, 2008, 09:05:41 am
-
Is it possible to use the mini thumbs for the albums thumbnail?
I have the album thumbnail size set to the same size as my mini thumbs, and find that the images do not look nearly as good when the html resizes the thumbs as they would if I could just use the mini thumbs at their native resolution.
I've been looking at sample/theme.php and I think that some modifications to function theme_display_album_list
and function theme_display_album_list_cat
should do the trick, but I just don't know what edits to make.
I took a stab at it and changed '{ALB_LINK_PIC}' => $album['thumb_pic'],
to '{ALB_LINK_PIC}' => $album['mini_pic'],
but that resulted in no album thumbnails at all.
Any suggestions?
-
not a biggie if your thumbs have the same ratio as the mini thumbs... then just change
$pic_url = get_pic_url($picture, 'thumb');
to
$pic_url = get_pic_url($picture, 'mini');
otherwise you also have to uncomment the call to the image size calculation
if($picture['system_icon']=='true'){
$image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size'], true, 'cat_thumb');
} else {
$image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size'], false, 'cat_thumb');
}
to
if($picture['system_icon']=='true'){
$image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size'], true, 'cat_thumb');
} else {
//$image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size'], false, 'cat_thumb');
}
-
Thank you Stramm, but where might I find the code you mention?
It is not in sample/theme.php
Please forgive my ignorance, but I don't know where else to look.
-
oh, sorry... index.php
-
Thank you very much Stramm
Replacing all 4 occurrences of $pic_url = get_pic_url($picture, 'thumb');
with $pic_url = get_pic_url($picture, 'mini');
in index.php worked perfectly