New plugin to show filenames
authorMarc MAURICE <marc-bizou@pub.positon.org>
Sat, 17 Aug 2013 20:17:39 +0000 (22:17 +0200)
committerMarc MAURICE <marc-bizou@pub.positon.org>
Sat, 17 Aug 2013 20:17:39 +0000 (22:17 +0200)
plugins/_disabled/filenames/after_thumb.php [new file with mode: 0644]
plugins/_disabled/filenames/head.php [new file with mode: 0644]
template.php

diff --git a/plugins/_disabled/filenames/after_thumb.php b/plugins/_disabled/filenames/after_thumb.php
new file mode 100644 (file)
index 0000000..09e2db2
--- /dev/null
@@ -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>
diff --git a/plugins/_disabled/filenames/head.php b/plugins/_disabled/filenames/head.php
new file mode 100644 (file)
index 0000000..25cf562
--- /dev/null
@@ -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>
index 5a4487e..ec0efe6 100644 (file)
@@ -15,6 +15,8 @@ a {
 }
 .square {
        display: inline-block;
 }
 .square {
        display: inline-block;
+       vertical-align: top;
+       height: <?= THUMB_SIZE ?>px;
 }
 .image, .foldername, .image_nopreview, .foldername_nopreview {
        display: table-cell;
 }
 .image, .foldername, .image_nopreview, .foldername_nopreview {
        display: table-cell;
@@ -73,7 +75,7 @@ a {
 
 <div id="images">
 <?php foreach ($imageFiles as $file) { ?>
 
 <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>
        <?php if (isset($generating)) { ob_flush(); flush(); } ?>
 <?php } ?>
 </div>