public function generateSlideshow($context)
{
- $this->compiler->addSlideshowLibrary($context==='inline');
+ $this->compiler->addSlideshowLibrary($context === 'inline');
- $this->allowed_extensions = ['jpg', 'png', 'jpeg', 'gif'];
+ $this->allowed_extensions = ['jpg', 'png', 'jpeg', 'gif', 'svg'];
$slideshowID = 'slideshow_' . $this->uid;
$XML_path = $this->path_absolute . '/slideshow.xml'; // Optional file so it may not exist
}
$lib = $context === 'popup' ? $this->compiler->book->parametres->popupSlideshowLibrary : $this->compiler->book->parametres->inlineSlideshowLibrary;
- $res = '<div class="fb-slideshow-wrapper ' . $lib . ' fb-slideshow-'.$context.'">' . $res . '</div>';
+ $res = '<div class="fb-slideshow-wrapper ' . $lib . ' fb-slideshow-' . $context . '">' . $res . '</div>';
return $res;
}
foreach ($slides as $slide) {
$image_path_relative = $this->compiler->vdir->relativePath($slide['path']);
- $image_info = getimagesize($slide['path']);
+ $image_info = CubeIT_Image::getimagesize($slide['path']);
$image_info_json = ($image_info) ? json_encode(['width' => $image_info[0], 'height' => $image_info[1], 'ratio' => round($image_info[0] / $image_info[1], 4)]) : '';
$image_dimensions = ($image_info) ? $image_info[3] : '';