diff --git a/www/galleri/index.php b/www/galleri/index.php index 6e5041e..b626216 100644 --- a/www/galleri/index.php +++ b/www/galleri/index.php @@ -43,7 +43,7 @@ function getDirContents($dir, &$results = array()) { if (in_array($ext, $GLOBALS["allowedExtensions"])) { $results[] = $cleanPath; } - } else if ($value != "." && $value != "..") { + } else if ($value != "." && $value != ".." && $value != ".thumbnails") { //recursively scan directories getDirContents($path, $results); } @@ -55,7 +55,7 @@ $images = getDirContents($galleryDir); $imageTemplate = '
%realname
@@ -108,6 +108,7 @@ $imageTemplate = ' "%timestamp" => filemtime($galleryDir . $value), "%name" => htmlspecialchars($displaypath), "%path" => $serverPath . $value, + "%thumbnail" => $serverPath . "/.thumbnails" . $value . ".png", "%realname" => htmlspecialchars($realname) ]; echo strtr($imageTemplate, $vars); diff --git a/www/js/galleri.js b/www/js/galleri.js index 59867c9..a1cb4bf 100644 --- a/www/js/galleri.js +++ b/www/js/galleri.js @@ -8,7 +8,7 @@ document.addEventListener('click', function (e) { var modalImg = document.getElementById("modal-content"); var captionText = document.getElementById("modal-caption"); modal.style.display = "block"; - modalImg.src = img.src; + modalImg.src = img.dataset.fullsrc; captionText.innerHTML = img.alt; } else if (modal.style.display != "none") { modal.style.display = "none"; @@ -19,4 +19,4 @@ document.addEventListener('click', function (e) { // #region sorting -// #endregion \ No newline at end of file +// #endregion