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

@@ -179,6 +179,22 @@
<?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 -->
<div id="new_comment">
<form class="form" action="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/new_comment" method="post" enctype="multipart/form-data">