return new zoomProductLink($id, $init, $compiler);
}
switch ($compiler->book->parametres->basketManager) {
+ case 'JoueclubWishlist':
+ return new JoueclubWishlistLink($id, $init, $compiler);
case 'Remarkable':
return new remarkableCartLink($id, $init, $compiler);
case 'ZoomProductLink':
}
+class JoueclubWishlistLink extends normalLink
+{
+ protected $role = 'link';
+
+ public function getURL()
+ {
+ return 'https://joueclub.dev.amazing.cat/scan?deviceId=$uuid&ean=' . $this->to;
+ }
+
+ public function getTarget()
+ {
+ return '_blank';
+ }
+
+ public function getDefaultTooltip()
+ {
+ return 'Ajouter à la wishlist';
+ }
+}
+
class wescoLink extends normalLink
{
protected $role = 'link';
}
// Main slider
- $res = '<div class="fb-slideshow splide" id="' . $slideshowID . '" data-open-index="' . $this->extra . '" data-thumbnails="' . ($thumbnails ? '1' : '0') . '" data-splide=\''. json_encode($slideshow_settings) .'\'>' . $this->_slides($slides) . '</div>';
+ $res = '<div class="fb-slideshow splide" id="' . $slideshowID . '" data-open-index="' . $this->extra . '" data-thumbnails="' . ($thumbnails ? '1' : '0') . '" data-splide=\'' . json_encode($slideshow_settings) . '\'>' . $this->_slides($slides) . '</div>';
// Thumbnails slider
if ($thumbnails) {
$res .= '<div class="fb-slideshow-thumbnails splide" id="' . $slideshowID . '_thumbnails">' . $this->_slides($slides, false, $this->thumbnail_height) . '</div>';
}
- $res = '<div class="fb-slideshow-wrapper">'. $res .'</div>';
+ $res = '<div class="fb-slideshow-wrapper">' . $res . '</div>';
return $res;
}
- protected function _getSlidesFromDirectory($path) {
+ protected function _getSlidesFromDirectory($path)
+ {
// Previously this was getting all files recursively but it caused problems
// when there was a __MACOSX sub directory inside the zip file containing
// resource forks for the JPGs. There's no need to support nested directories
return $slides;
}
- protected function _slides($slides, $show_captions = true, $max_height = null) {
+ protected function _slides($slides, $show_captions = true, $max_height = null)
+ {
- $res = '<div class="splide__track">';
+ $res = '<div class="splide__track">';
$res .= '<ul class="splide__list">';
foreach ($slides as $slide) {
// We set dimensions here to avoid extra work on the client side
if ($max_height && $image_info) {
$thumb_width = round($max_height / $image_info[1] * $image_info[0]); // max_height / image_height * image_width
- $image_dimensions = 'style="width:'. $thumb_width .'px; height:'. $max_height .'px"';
+ $image_dimensions = 'style="width:' . $thumb_width . 'px; height:' . $max_height . 'px"';
}
$res .= '<li class="fb-slideshow-slide splide__slide">';
//$res .= '<div class="splide__slide__container">';
- $res .= '<img class="fb-slideshow-slide-image" src="' . $image_path_relative . '" data-meta="'. htmlspecialchars($image_info_json, ENT_QUOTES) .'" '. $image_dimensions .'>';
+ $res .= '<img class="fb-slideshow-slide-image" src="' . $image_path_relative . '" data-meta="' . htmlspecialchars($image_info_json, ENT_QUOTES) . '" ' . $image_dimensions . '>';
//$res .= '</div>'; // .splide__slide__container
if ($show_captions && null !== $slide['caption']) {