Ignorate medium size in coppermine... can we do that? Ignorate medium size in coppermine... can we do that?
 

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

Ignorate medium size in coppermine... can we do that?

Started by epsilon, February 22, 2004, 06:16:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

epsilon

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)

Casper

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.
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

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.

Titooy

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

epsilon

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

Titooy

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)$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$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'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",with'{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.