First of all, I tried to add this post to modifications, but I didn't have rights to post a new topic, so here goes. Something that has always bugged me a little about Coppermine was that clicking on the normal size image spawns a new window containing the fullsize version. I think it would be better (especially for non-tech users) that there is a download link to the full version. Sometimes these images can be many MB in size and a user may not realize this until their browser starts to download it. I have made a modification myself to address this and thought I'd share it with anyone else who might be interested.
I used to use version 1.3 and so the code to be modified was in the displayimage.php file, but I have just installed 1.41 and it now appears that you have to make this mod to the theme.php file.
Here are my changes:
// The original content of theme.php (note this is only present in the sample theme)
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$winsizeX = $CURRENT_PIC_DATA['pwidth']+5; //the +'s are the mysterious FF and IE paddings
$winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
$pic_html .= "</a>\n";
// My modification below creates a download link showing the size of the image and prevents opening of fullsize image in new window
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$filesize = $CURRENT_PIC_DATA['filesize'];
$filesizecorr = intval($filesize/1024);
$winsizeX = $CURRENT_PIC_DATA['pwidth'] + 16;
$winsizeY = $CURRENT_PIC_DATA['pheight'] + 16;
$picturefs_url = str_replace("normal_", "", $picture_url);
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<center><img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /></center><br />";
$pic_html .= "<center><a href=\"download.php?getfile=$picturefs_url\">Click here to save the fullsize ($filesizecorr KB) image directly to your hard drive<br /></a><br /><br /></center>";
$pic_html .= "</a>\n";
You will also need to create a new file called download.php in the root of your coppermine installation with these contents
<?php
if ($_REQUEST ['getfile']){
$file = $_REQUEST ['getfile'];
}
$save_as_name = basename($file);
ini_set('session.cache_limiter', '');
header('Expires: Thu, 19 Nov 1981 08:52:00 GMT');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: no-cache');
header("Content-Type: application/octet-stream");
header("Content-Disposition: disposition-type=attachment; filename=\"$save_as_name\"");
readfile($file);
?>
Anyway, hope that is useful to someone.
Adrian