I am facing one more trouble and its related to this mode only.
You see i want to use tags {width}x{height} and {image_file_size} these tags work everywhere except multi_popup.html
Can you fix this issue?
The popup window was designed because someone requested it so they could put ads above/below the downloaded image and not to recreate the details page all over again.
I do see the reason you are asking for the filesize and dimensions because with this mod they are different then what is displayed on the details page.
I am not trying to recreate ALL the data that is displayed on the details page, at this point the user just wants to download the image...
I am not making this request part of the original MOD but here is the fix for anyone interested in using it. I do not think this will work if your images are stored on remote servers. I have not had time to test that part of it but it works fine for local files...
The last insert in the
download.php file...
replace the entire insert with this one...
//MOD multi download for popup window
if (($multi_download_var['target']<>"") && $size){
$meta_keywords = !empty($image_row['image_keywords']) ? implode(", ", explode(",", $image_row['image_keywords'])) : "";
$meta_description = !empty($image_row['image_description']) ? strip_tags($image_row['image_description']) . ". " : "";
$image_name = format_text($file['file_name'],2);
$file_size = "n/a";
if ($file_size = @filesize($file['file_path'])) {
$file_size = format_file_size($file_size);
}
else {
$file_size = get_remote_file_size($file['file_name']);
}
$image_info= @getimagesize($file['file_path']);
$site_template->register_vars(array(
"img_url" => $file["file_path"],
"site_name" => $config['site_name'],
"charset" => $lang['charset'],
"direction" => $lang['direction'],
"detail_meta_description" => $meta_description,
"detail_meta_keywords" => $meta_keywords,
"prepend_head_title" => $image_name . " - ",
"width"=> $image_info[0],
"height"=> $image_info[1],
"image_file_size"=>$file_size,
"image_name"=>$image_name,
"lang_file_size" => $lang['file_size']
));
$site_template->print_template($site_template->parse_template("multi_popup"));
}
else{
send_file($file['file_name'], $file['file_path']);
}
//END MOD multi download for popup window
and this is the
multi_popup.html I came up with to display the info...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{direction}">
<head>
<title>{prepend_head_title}{site_name}</title>
<meta http-equiv="content-type" content="text/html; charset={charset}">
<meta name="description" content="{detail_meta_description}{site_name}">
<meta name="keywords" content="{detail_meta_keywords}">
</head>
<body>
<table align=center">
<TR>
<TD align="center"><img src="{img_url}"></img></TD>
</TR>
<TR>
<TD align="center">{image_name}</TD>
</TR>
<TR>
<TD align="center">{lang_file_size} {image_file_size}</TD>
</TR>
<TR>
<TD align="center">Dimensions: {width} X {height}</TD>
</TR>
</TABLE>
</body>
</html>