-pagination
-liens texte sous les. vignettes
This commit is contained in:
2019-01-05 21:02:25 +01:00
parent 091d023c6d
commit 367202a7b5
2 changed files with 5 additions and 103 deletions

View File

@@ -250,6 +250,8 @@ page-ce-mois-ci.php
function displayRetina ($file,$album) {
global $ppage;
echo "<b>$ppage</b>";
//preprint($file);
@@ -284,7 +286,7 @@ function displayRetina ($file,$album) {
$name = explode(".", $file['filename']);
$thumbpath = "../zenphoto/cache/" . $album . "/";
$a = $path . $filename;
//$a = $path . $filename;
$file_sd = $thumbpath . $name[0] . "_200_thumb.jpg";
$file_hd = $thumbpath . $name[0] . "_400_thumb.jpg";
@@ -362,7 +364,7 @@ function displayRetina ($file,$album) {
$display .= '</a>';
$display .= '</div>';
$display .= '<div class="albumdesc">';
$display .= '<a href="../../zenphoto/index.php?album='.$album.'&amp;image='.$filename.'" title= "'.date_archive($file['filename']).'" class="">';
$display .= '<a href="' . $fullpath . 'index.php?album='.$album.'&amp;image='.$file['filename'].'" title= "'.date_archive($file['filename']).'" class="">';
$display .= '<span class="exif">'.date_archive($file['filename']).'</span>';
$display .= '</a></div>';
$display .= '</div>' . "\r\n";
@@ -373,106 +375,6 @@ function displayRetina ($file,$album) {
}
function displayRetina_bak ($filename,$album) {
global $ppage;
if ($ppage == "1") {
$fullpath = "../../zenphoto/";
}
else {
$fullpath = "../../../zenphoto/";
}
$file = explode(".", $filename);
$thumbpath = "../zenphoto/cache/" . $album . "/";
$a = $path . $filename;
$file_sd = $thumbpath . $file[0] . "_200_thumb.jpg";
$file_hd = $thumbpath . $file[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";
*/
$th_sd = false;
$th_hd = false;
$thumb = array();
if (file_exists($file_sd)) {
$th_sd = true;
$size_sd = getimagesize($file_sd, $info);
$thumb['sd'] = array(
'url' => "../../" . $file_sd,
'width' => $size_sd[0],
'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]
);
}
if (($th_sd == true) && ($th_hd == true)) {
$standard = $thumb['sd']['url'] . ' 200w, ' . $thumb['hd']['url'] . ' 400w';
}
elseif ($th_sd == true) {
$standard = $thumb['sd']['url'] . ' 200w';
}
elseif ($th_hd == true) {
$standard = $thumb['hd']['url'] . ' 400w';
}
$display = '<div class="album">';
$display .= '<div class="holder">';
$display .= '<a href="' . $fullpath . 'albums/'.$album.'/'.$filename.'" title="'.date_archive($filename).'" class="kk-lightbox">';
/*
$display .= '<picture data-picture data-alt="">';
$display .= '<!--[if IE 9]><video style="display: none;"><![endif]-->';
$display .= '<source class="image_standard" srcset="' . $standard . '">';
$display .= '<!--[if IE 9]></video><![endif]-->';
$display .= '<img srcset="' . $thumb['sd']['url'] . '" width="' . $thumb['sd']['width'] . '" height="' . $thumb['sd']['height'] . '"alt="">';
$display .= '</picture>';
$display .= '<img width="" height=""
src="../../../zenphoto/cache/photos-du-mois/10_2016_200_thumb.jpg"
class="" alt=""
srcset="../../../zenphoto/cache/photos-du-mois/10_2016_200_thumb.jpg 200w,
../../../zenphoto/cache/photos-du-mois/10_2016_400_thumb.jpg 400w"
sizes="(max-width: 200px) 100vw, 200px" />';
$display .= '<img width="' . $thumb['sd']['width'] . '" height="' . $thumb['sd']['height'] . '"
src="' . $thumb['sd']['url'] . '"
class="" alt=""
srcset="' . $standard . '"
sizes="(max-width: 200px) 100vw, 200px" />';
*/
$display .= "<img width='" . $thumb['sd']['width'] . "' height='" . $thumb['sd']['height'] . "' src='" . $thumb['sd']['url'] . "' class='' alt='' srcset='" . $standard . "' sizes='(max-width: 200px) 100vw, 200px' />";
$display .= '</a>';
$display .= '</div>';
$display .= '<div class="albumdesc">';
$display .= '<a href="../../zenphoto/index.php?album='.$album.'&amp;image='.$filename.'" title= "'.date_archive($filename).'" class="">';
$display .= '<span class="exif">'.date_archive($filename).'</span>';
$display .= '</a></div>';
$display .= '</div>' . "\r\n";
//echo "display: " . $display;
return $display;
}
/*
*functions.php - displayRetina() displayRetina()

View File

@@ -327,7 +327,7 @@ for ($j=$debut; $j<=$fin; $j++) {
<?php
/**/
// calcul du nombre de pages (arrondi a l'entier superieur)
//$nbpages = ceil(count($fichier) / 12);
$nbpages = ceil(count($images_du_mois) / 12);
$prec = $ppage - 1;
$suiv = $ppage + 1;