Deltacms/module/album/view/index/index.php

40 lines
1.5 KiB
PHP
Raw Normal View History

2023-10-06 08:34:35 +02:00
<!-- version <?php echo $module::VERSION; ?> de l'album -->
<?php
// Lexique
$param = '';
include('./module/album/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_album.php');
2023-10-20 11:24:09 +02:00
// supprime le fichier inutile de la version 2.5
if (file_exists('module/album/view/index/index.js.php')) {
unlink('module/album/view/index/index.js.php');
}
2023-10-06 08:34:35 +02:00
if($module::$galleries):
$i = 1;
$galleriesNb = count($module::$galleries);
foreach($module::$galleries as $galleryId => $gallery):
if($i % 4 === 1):
?>
<div class="row">
<?php endif; ?>
<div class="col3">
<a href="<?php echo helper::baseUrl() . $this->getUrl(0); ?>/<?php echo $galleryId; ?>" class="galleryPicture">
2023-10-20 11:24:09 +02:00
<figure class="album"><img src="<?php if ($this->getData(['module', $this->getUrl(0), $galleryId, 'config', 'homePicture']) === null ) {
2023-10-08 17:07:29 +02:00
echo 'module/album/plugins/thumbnailer.php?img=' . $module::$firstPictures[$galleryId]; }
2023-10-06 08:34:35 +02:00
else {
2023-10-08 17:07:29 +02:00
echo 'module/album/plugins/thumbnailer.php?img=' . $this->getData(['module', $this->getUrl(0), $galleryId, 'config', 'directory']) . '/' . $this->getData(['module', $this->getUrl(0), $galleryId, 'config', 'homePicture']);
2023-10-06 08:34:35 +02:00
} ?>" alt="<?php echo $gallery['config']['name']; ?>">
2023-10-20 11:24:09 +02:00
<figcaption><div class="galleryName"><?php echo $gallery['config']['name']; ?></div></figcaption></figure>
2023-10-06 08:34:35 +02:00
</a>
</div>
<?php if($i % 4 === 0 OR $i === $galleriesNb): ?>
</div>
<?php
endif;
$i++;
endforeach;
else:
echo template::speech($text['album_view']['index'][0]);
endif;
?>