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

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]

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.