Use mini thumb for the album thumbnail? Use mini thumb for the album thumbnail?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Use mini thumb for the album thumbnail?

Started by Walker, January 09, 2008, 09:05:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Walker

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?

Stramm

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');
}

Walker

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.

Stramm


Walker

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