New plugin to show filenames

This commit is contained in:
Marc MAURICE 2013-08-17 22:17:39 +02:00
parent 6556d8da10
commit 3c7aac6588
3 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,6 @@
<?php
$filename = $GLOBALS["file"]["name"];
# comment this to have the file extensions
$filename = substr($filename, 0, strrpos($filename, '.'));
?>
<div class="imagefilename"><a href="<?= $GLOBALS["file"]["link"] ?>"><?= $filename ?></a></div>

View file

@ -0,0 +1,12 @@
<style type="text/css">
.imagefilename {
font-size: 0.25cm;
word-wrap: break-word;
width: <?= THUMB_SIZE ?>px;
text-align: center;
margin-bottom: 1ex;
}
.square {
height: auto;
}
</style>

View file

@ -15,6 +15,8 @@ a {
}
.square {
display: inline-block;
vertical-align: top;
height: <?= THUMB_SIZE ?>px;
}
.image, .foldername, .image_nopreview, .foldername_nopreview {
display: table-cell;
@ -73,7 +75,7 @@ a {
<div id="images">
<?php foreach ($imageFiles as $file) { ?>
<div class="square"><div class="image"><a href="<?= $file["link"] ?>"><img src="<?= $rootUrl.getPreview($file["file"]) ?>" alt="<?= $file["name"] ?>" /></a></div></div>
<div class="square"><div class="image"><a href="<?= $file["link"] ?>"><img src="<?= $rootUrl.getPreview($file["file"]) ?>" alt="<?= $file["name"] ?>" /></a></div><?php plugins_include("after_thumb.php") ?></div>
<?php if (isset($generating)) { ob_flush(); flush(); } ?>
<?php } ?>
</div>