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: Ignorate medium size in coppermine... can we do that?  (Read 3927 times)

0 Members and 1 Guest are viewing this topic.

epsilon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
    • http://www.cremita.com
Ignorate medium size in coppermine... can we do that?
« on: February 22, 2004, 06:16:50 pm »

Can we ignorate the medium size pics in the gallery? For example when you click in a thumbnail the full size pics will be open in a new window like when you click in the medium size image.

Ignorate the creation process of medium size images in the batch add or upload will reduce the size of the gallery too.

Another good idea i think for the new version (optional)
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Ignorate medium size in coppermine... can we do that?
« Reply #1 on: February 22, 2004, 06:33:15 pm »

You can turn off the medium size pics, so coppermine doesn't create them, in config, saving disk space.
It doesn't open in new window though.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

epsilon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
    • http://www.cremita.com
Yeah i know...
« Reply #2 on: February 22, 2004, 08:16:20 pm »

Yes but i need the option to open the full pics in a new window when you click in the thumbnail and ignorate the medium size web that contain it.
Logged

Titooy

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 736
    • under construction...
Ignorate medium size in coppermine... can we do that?
« Reply #3 on: February 22, 2004, 08:58:32 pm »

Just modify the displayimage.php to skip the medium image.
Logged

epsilon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
    • http://www.cremita.com
Ok but...
« Reply #4 on: February 22, 2004, 10:28:35 pm »

Ok but what part i must change and by what:)
Logged

Titooy

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 736
    • under construction...
Ignorate medium size in coppermine... can we do that?
« Reply #5 on: March 02, 2004, 09:58:37 pm »

Oops! I was completely wrong.

I think the easiest way to do this is

in /include/functions.inc.php :: function display_thumbnails

after (line 1000 in the standalone distribution)
Code: [Select]
$thumb_list[$i]['image'] = "<img src=\"" . get_pic_url($row, 'thumb') . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"{$row['filename']}\" title=\"$pic_title\"></a>";add
Code: [Select]
$thumb_list[$i]['imagefull'] = get_pic_url($row, 'fullsize');

and in your theme.php :: function theme_display_thumbnails
(line 1400 of the unmodified rainy_day theme.php)
replace
Code: [Select]
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",with
Code: [Select]
'{LINK_TGT}' => $thumb['imagefull'],

if you want the pics to open in another window, find $template_thumbnail_view in theme.php and some lines below, add target="_blank" or a window.open script in the link.
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 19 queries.