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

Title: Use mini thumb for the album thumbnail?
Post 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
Code: [Select]
function theme_display_album_list and
Code: [Select]
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
Code: [Select]
'{ALB_LINK_PIC}' => $album['thumb_pic'], to
Code: [Select]
'{ALB_LINK_PIC}' => $album['mini_pic'], but that resulted in no album thumbnails at all.

Any suggestions?
Title: Re: Use mini thumb for the album thumbnail?
Post by: Stramm on January 09, 2008, 09:30:11 am
not a biggie if your thumbs have the same ratio as the mini thumbs... then just change
Code: [Select]
                $pic_url = get_pic_url($picture, 'thumb');to
Code: [Select]
                $pic_url = get_pic_url($picture, 'mini');
otherwise you also have to uncomment the call to the image size calculation
Code: [Select]
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
Code: [Select]
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');
}
Title: Re: Use mini thumb for the album thumbnail?
Post by: Walker on January 09, 2008, 10:00:35 am
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.
Title: Re: Use mini thumb for the album thumbnail?
Post by: Stramm on January 09, 2008, 10:15:42 am
oh, sorry... index.php
Title: Re: Use mini thumb for the album thumbnail?
Post by: Walker on January 09, 2008, 10:29:51 am
Thank you very much Stramm

Replacing all 4 occurrences of
Code: [Select]
$pic_url = get_pic_url($picture, 'thumb'); with
Code: [Select]
$pic_url = get_pic_url($picture, 'mini');in index.php worked perfectly