Vignette thumb not found
This commit is contained in:
@@ -251,8 +251,6 @@ function displayRetina ($file,$album) {
|
|||||||
|
|
||||||
global $ppage;
|
global $ppage;
|
||||||
|
|
||||||
echo "<b>$ppage</b>";
|
|
||||||
|
|
||||||
//preprint($file);
|
//preprint($file);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -276,35 +274,32 @@ function displayRetina ($file,$album) {
|
|||||||
[title] => 10_2018
|
[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;
|
if ($ppage == "1") $fullpath = "../../zenphoto/";
|
||||||
//echo $file_hd;
|
else $fullpath = "../../../zenphoto/";
|
||||||
|
|
||||||
/*
|
|
||||||
$file_sd = $path . $file[0] . "_180_watermark.jpg";
|
|
||||||
$file_hd = $path . $file[0] . "_360_watermark.jpg";
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
$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_sd = false;
|
||||||
$th_hd = false;
|
$th_hd = false;
|
||||||
|
|
||||||
$thumb = array();
|
$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;
|
$th_sd = true;
|
||||||
$size_sd = getimagesize($file_sd, $info);
|
$size_sd = getimagesize($file_sd, $info);
|
||||||
$thumb['sd'] = array(
|
$thumb['sd'] = array(
|
||||||
@@ -313,13 +308,13 @@ function displayRetina ($file,$album) {
|
|||||||
'height' => $size_sd[1]
|
'height' => $size_sd[1]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (file_exists($file_hd)) {
|
else {
|
||||||
$th_hd = true;
|
$notfound = "../zenphoto/zp-core/images/err-imagenotfound.png";
|
||||||
$size_hd = getimagesize($file_hd, $info);
|
$size_sd = getimagesize($notfound, $info);
|
||||||
$thumb['hd'] = array(
|
$thumb['sd'] = array(
|
||||||
'url' => "../../" . $file_hd,
|
'url' => "../../" . $notfound,
|
||||||
'width' => $size_hd[0],
|
'width' => $size_sd[0],
|
||||||
'height' => $size_hd[1]
|
'height' => $size_sd[1]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -333,7 +328,6 @@ function displayRetina ($file,$album) {
|
|||||||
$standard = $thumb['hd']['url'] . ' 400w';
|
$standard = $thumb['hd']['url'] . ' 400w';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$display = '<div class="album">';
|
$display = '<div class="album">';
|
||||||
$display .= '<div class="holder">';
|
$display .= '<div class="holder">';
|
||||||
$display .= '<a href="' . $fullpath . 'albums/'.$album.'/'.$file['filename'].'" title="'.date_archive($file['filename']).'" class="kk-lightbox">';
|
$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 .= '</a></div>';
|
||||||
$display .= '</div>' . "\r\n";
|
$display .= '</div>' . "\r\n";
|
||||||
|
|
||||||
//echo "display: " . $display;
|
|
||||||
|
|
||||||
return $display;
|
return $display;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user