From 5bf84903595e024c90d0c3233eeb67be12c2e9f8 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 15 Jun 2023 08:56:30 +0200 Subject: [PATCH] wip #6015 @0.25 --- src/Links/SlideshowLink.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Links/SlideshowLink.php b/src/Links/SlideshowLink.php index cf13da9..78e42f1 100644 --- a/src/Links/SlideshowLink.php +++ b/src/Links/SlideshowLink.php @@ -13,6 +13,8 @@ class SlideshowLink extends NormalLink { protected $allowed_extensions; protected $thumbnail_height = 80; // Height in px of thumbnail slider + protected $baseName = ''; + public function getURL() { if (empty($this->to)) { @@ -20,6 +22,11 @@ class SlideshowLink extends NormalLink { } $d = $this->unzipFile($this->to, true); + $e = explode('.', $this->to); + array_pop($e); + $this->baseName = implode('.', $e); + + $this->copyExternalDir($d['dir'], $d['fdir']); $this->path = $d['fdir']; @@ -101,7 +108,7 @@ class SlideshowLink extends NormalLink { } // Main slider - $res = '
' . $this->_slides($slides, $slides_options) . '
'; + $res = '
' . $this->_slides($slides, $slides_options) . '
'; // Thumbnails slider if ($thumbnails) { @@ -138,7 +145,6 @@ class SlideshowLink extends NormalLink { } - protected function _slides($slides, $options = []) { $default_options = [ 'show_captions' => true, @@ -152,8 +158,8 @@ class SlideshowLink extends NormalLink { $res .= '