Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Use mini thumb for the album thumbnail?  (Read 3635 times)

0 Members and 1 Guest are viewing this topic.

Walker

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Use mini thumb for the album thumbnail?
« 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?
« Last Edit: January 09, 2008, 11:39:33 am by Stramm »
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Use mini thumb for the album thumbnail?
« Reply #1 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');
}

Walker

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Use mini thumb for the album thumbnail?
« Reply #2 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.
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Use mini thumb for the album thumbnail?
« Reply #3 on: January 09, 2008, 10:15:42 am »

oh, sorry... index.php

Walker

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Use mini thumb for the album thumbnail?
« Reply #4 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
Logged
Pages: [1]   Go Up
 

Page created in 0.044 seconds with 20 queries.