]> _ Git - fluidbook_tools.git/commitdiff
wait #8028
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Feb 2026 16:31:39 +0000 (17:31 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Feb 2026 16:31:39 +0000 (17:31 +0100)
src/Links/FlipcardLink.php
src/Links/HTMLMultimediaImage.php
src/Links/IFrameLink.php
src/Links/IFramePopupLink.php
src/Links/ImageLink.php

index 4dd4717516946fb7d51614edf570a3fff252485f..de4bd7c7f86fa88066b45af828005320c81cfa8e 100644 (file)
@@ -16,8 +16,8 @@ class FlipcardLink extends ImageLink
         $res = '<a href="#" ' . $this->getTooltipAttribute() . '></a>';
         $res .= '<div class="flipcard-perspective">';
         $res .= '<div class="flipcard">';
-        $res .= '<div class="front"><img src="' . self::getUniversalLocation($this->to) . '"></div>';
-        $res .= '<div class="back"><img src="' . self::getUniversalLocation($this->alternative) . '"></div>';
+        $res .= '<div class="front"><img src="' . $this->shortenURL(self::getUniversalLocation($this->to)) . '"></div>';
+        $res .= '<div class="back"><img src="' . $this->shortenURL(self::getUniversalLocation($this->alternative)) . '"></div>';
         $res .= '</div>';
         $res .= '</div>';
         return $res;
index a3ff75e1b25f97a2c4c01a5c2d22fff8a4557500..46d2d4916b1dd1a95c430d85b09cdc205c64e2fb 100644 (file)
@@ -18,7 +18,7 @@ class HTMLMultimediaImage extends Link
         $w = $this->width;
         $h = $this->height;
         $this->copyExternalFile($this->to);
-        $res = '<img class="multimediaimage" data-scroll="' . $this->scroll . '" data-width="' . $w . '" data-height="' . $h . '" src="' . Link::getUniversalLocation($this->to) . '" width="' . $w . '" height="' . $h . '" aria-hidden="1" />';
+        $res = '<img class="multimediaimage" data-scroll="' . $this->scroll . '" data-width="' . $w . '" data-height="' . $h . '" src="' . $this->shortenURL(Link::getUniversalLocation($this->to)) . '" width="' . $w . '" height="' . $h . '" aria-hidden="1" />';
         $alt=$this->getAlternativeText();
         if($alt) {
             $res .= '<div class="visually-hidden" aria-live="polite">' . $alt . '</div>';
index 1c0a90ebe790ab4774159dd8ffa8a16b0de7762e..0918ffb2b6713903ea2b62e50ae5d6a2a83528b7 100644 (file)
@@ -21,7 +21,7 @@ class IFrameLink extends Link
         if (null === $f) {
             return '';
         }
-        return '<iframe src="' . $f . '" width="100%" height="100%" frameborder="0" marginwidth="0" marginheight="0" data-scale="' . $this->scale . '" scrolling="' . $this->scrolling . '" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
+        return '<iframe src="' . $this->shortenURL($f) . '" width="100%" height="100%" frameborder="0" marginwidth="0" marginheight="0" data-scale="' . $this->scale . '" scrolling="' . $this->scrolling . '" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
     }
 
     /**
index ad3dbf23103ae4ff50f0099b4fa87c68528de0e9..69750be251fd43a30c6e3b31cb7d209281a12240 100644 (file)
@@ -18,7 +18,7 @@ class IFramePopupLink extends NormalLink
     {
         $res = parent::getAdditionnalContent();
         $markup = '<div class="iframeContainer" data-type="' . $this->iframeType . '">';
-        $markup .= '<iframe src="' . IFrameLink::_handleFile($this) . '" width="100%" height="100%" frameborder="0" marginwidth="0" marginheight="0" scrolling="auto" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
+        $markup .= '<iframe src="' . $this->shortenURL(IFrameLink::_handleFile($this)) . '" width="100%" height="100%" frameborder="0" marginwidth="0" marginheight="0" scrolling="auto" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
         $markup .= '</div>';
         return $res . ' data-iframe="' . rawurlencode($markup) . '" ';
     }
index de4670c6bcd5159a8edaadd983fa0f178f104be1..8a824482382c8e88044f18f30eca0a116a12fab8 100644 (file)
@@ -5,9 +5,10 @@ namespace Fluidbook\Tools\Links;
 class ImageLink extends ContentLink
 {
     public $_ocr = ['to'];
+
     public function getImageUrl()
     {
-        return Link::getUniversalLocation($this->to, false);
+        return $this->shortenURL(Link::getUniversalLocation($this->to, false));
     }
 
     public function getCSS()
@@ -24,7 +25,7 @@ class ImageLink extends ContentLink
         if (isset($this->rollover) && $this->rollover) {
             $res .= ' data-rollover="' . $this->rollover . '"';
         }
-        $res.=' data-rrr="1" ';
+        $res .= ' data-rrr="1" ';
         return $res;
     }