Vignette thumb not found

This commit is contained in:
2019-01-06 07:17:17 +01:00
parent 367202a7b5
commit 8b6452fa28

View File

@@ -251,8 +251,6 @@ function displayRetina ($file,$album) {
global $ppage;
echo "<b>$ppage</b>";
//preprint($file);
/*
@@ -276,35 +274,32 @@ function displayRetina ($file,$album) {
[title] => 10_2018
)
*/
if ($ppage == "1") {
$fullpath = "../../zenphoto/";
}
else {
$fullpath = "../../../zenphoto/";
}
$name = explode(".", $file['filename']);
$thumbpath = "../zenphoto/cache/" . $album . "/";
//$a = $path . $filename;
$file_sd = $thumbpath . $name[0] . "_200_thumb.jpg";
$file_hd = $thumbpath . $name[0] . "_400_thumb.jpg";
//echo $file_sd;
//echo $file_hd;
/*
$file_sd = $path . $file[0] . "_180_watermark.jpg";
$file_hd = $path . $file[0] . "_360_watermark.jpg";
*/
if ($ppage == "1") $fullpath = "../../zenphoto/";
else $fullpath = "../../../zenphoto/";
$thumbsize = 200;
$watermark = "thumb";
$name = explode(".", $file['filename']);
$thumbpath = "../zenphoto/cache/" . $album . "/";
$file_sd = $thumbpath . $name[0] . "_" . $thumbsize . "_" . $watermark .".jpg";
$file_hd = $thumbpath . $name[0] . "_" . ($thumbsize * 2) . "_" . $watermark .".jpg";
$th_sd = false;
$th_hd = false;
$th_hd = false;
$thumb = array();
if (file_exists($file_sd)) {
if (file_exists($file_hd)) {
$th_hd = true;
$size_hd = getimagesize($file_hd, $info);
$thumb['hd'] = array(
'url' => "../../" . $file_hd,
'width' => $size_hd[0],
'height' => $size_hd[1]
);
}
elseif (file_exists($file_sd)) {
$th_sd = true;
$size_sd = getimagesize($file_sd, $info);
$thumb['sd'] = array(
@@ -313,13 +308,13 @@ function displayRetina ($file,$album) {
'height' => $size_sd[1]
);
}
if (file_exists($file_hd)) {
$th_hd = true;
$size_hd = getimagesize($file_hd, $info);
$thumb['hd'] = array(
'url' => "../../" . $file_hd,
'width' => $size_hd[0],
'height' => $size_hd[1]
else {
$notfound = "../zenphoto/zp-core/images/err-imagenotfound.png";
$size_sd = getimagesize($notfound, $info);
$thumb['sd'] = array(
'url' => "../../" . $notfound,
'width' => $size_sd[0],
'height' => $size_sd[1]
);
}
@@ -333,7 +328,6 @@ function displayRetina ($file,$album) {
$standard = $thumb['hd']['url'] . ' 400w';
}
$display = '<div class="album">';
$display .= '<div class="holder">';
$display .= '<a href="' . $fullpath . 'albums/'.$album.'/'.$file['filename'].'" title="'.date_archive($file['filename']).'" class="kk-lightbox">';
@@ -369,8 +363,6 @@ function displayRetina ($file,$album) {
$display .= '</a></div>';
$display .= '</div>' . "\r\n";
//echo "display: " . $display;
return $display;
}