Lightbox de toutes les images

This commit is contained in:
leosw
2026-04-12 16:06:15 +02:00
parent a2f91abda4
commit 58e134637c
3 changed files with 27 additions and 4 deletions

View File

@@ -48,8 +48,15 @@ section.archive > * {
opacity: 0.5; opacity: 0.5;
} }
/* Comments of a poi */ #comments_photos_gallery {
padding: 30px 0 0 0;
}
#comments_photos_gallery a, #comments_photos_gallery img {
height: 60px;
border-radius: 5px;
}
/* Comments of a poi */
#new_comment { #new_comment {
clear: both; clear: both;

View File

@@ -179,6 +179,22 @@
<?php if ($isCommentable) { ?> <?php if ($isCommentable) { ?>
<?php if (isset($poi_comments) && $poi_comments->number > 0) { ?>
<div id="comments_photos_gallery" class="gallery">
<?php foreach ($poi_comments->objs as $comment) { ?>
<?php if (!empty($comment->photo)) { ?>
<a href="<?=$config['rel_root_folder'].'medias/comment_photos/'.$comment->photo?>">
<img src="<?=$config['rel_root_folder'].'medias/comment_photos/'.$comment->photo?>" title="<?= (mb_strlen($comment->comment) > 50 ? mb_substr($comment->comment, 0, 50) . '...' : $comment->comment) ?>">
</a>
<?php } ?>
<?php } ?>
</div>
<script type="text/javascript">
var lightbox = new SimpleLightbox('.gallery a');
</script>
<?php } ?>
<!-- Comments --> <!-- Comments -->
<div id="new_comment"> <div id="new_comment">
<form class="form" action="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/new_comment" method="post" enctype="multipart/form-data"> <form class="form" action="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/new_comment" method="post" enctype="multipart/form-data">

View File

@@ -282,7 +282,7 @@ switch ($controller->splitted_url[1]) {
$wmHeight = imagesy($wm); $wmHeight = imagesy($wm);
$x = $newWidth - $wmWidth - 20; $x = $newWidth - $wmWidth - 20;
$y = $newHeight - $wmHeight - 20; $y = 20;
// Fusion // Fusion
imagecopy($dst, $wm, $x, $y, 0, 0, $wmWidth, $wmHeight); imagecopy($dst, $wm, $x, $y, 0, 0, $wmWidth, $wmHeight);
@@ -338,8 +338,8 @@ switch ($controller->splitted_url[1]) {
$poi->author_name = $tempUser->name; $poi->author_name = $tempUser->name;
unset($tempUser); unset($tempUser);
$head['third'] = "leaflet/leaflet.js;leaflet-fullscreen/Leaflet.fullscreen.min.js;leaflet-easybutton/easy-button.js"; $head['third'] = "leaflet/leaflet.js;leaflet-fullscreen/Leaflet.fullscreen.min.js;leaflet-easybutton/easy-button.js;simplelightbox/simple-lightbox.min.js";
$head['css'] .= ";../third/leaflet/leaflet.css;../third/leaflet-fullscreen/leaflet.fullscreen.css;../third/leaflet-easybutton/easy-button.css"; $head['css'] .= ";../third/leaflet/leaflet.css;../third/leaflet-fullscreen/leaflet.fullscreen.css;../third/leaflet-easybutton/easy-button.css;../third/simplelightbox/simple-lightbox.min.css";
$head['js'] = "d.poi_map.js"; $head['js'] = "d.poi_map.js";
$head['title'] = $poi->name; $head['title'] = $poi->name;