if ($item['asset_type'] === '3') {
// link
$type = 2;
- $target = '_popupiframe';
+ $target = '_blank';
$to = $item['asset_content'];
+ $to = str_replace('.html ?', '.html?', $to);
+
$webvideo = new CubeIT_Filter_WebVideo();
$f = $webvideo->filter($to);
- if ($f !== $to) {
- $e = explode(':', $f);
- $type = 10;
- $video_service = $e[0];
- $to = $e[1];
+
+ $infobulle = 'Voir le produit';
+ if ($f !== $to || stripos($item['asset_name'], 'video') !== false) {
+ if ($f !== $to) {
+ $e = explode(':', $f);
+ $type = 10;
+ $video_service = $e[0];
+ $to = $e[1];
+ } else {
+ $type = 4;
+ }
+ $infobulle = 'Voir la vidéo';
}
} else if ($item['asset_type'] === '5') {
// video
$type = 4;
$e = explode('-', $item['asset_name'], 2);
$to = trim($e[1]) . '.mp4';
+ $infobulle = 'Voir la vidéo';
} else if ($item['asset_type'] === '7') {
// Wishlist
$type = 12;
$e = explode('#', $item['asset_name']);
$to = $e[1];
+ $infobulle = 'Ajouter à ma liste de cadeaux';
}
$link = array(
'page' => $page, 'image' => $images[$type],
'left' => $item['x'] * $ratio, 'top' => $item['y'] * $ratio, 'width' => $item['width'] * $ratio, 'height' => $item['height'] * $ratio, 'rot' => '',
'type' => $type, 'to' => $to, 'target' => $target, 'video_width' => 1920, 'video_height' => 1080,
- 'infobulle' => '', 'numerotation' => 'virtual', 'display_area' => '1', 'inline' => $inline,
+ 'infobulle' => $infobulle, 'numerotation' => 'virtual', 'display_area' => false, 'inline' => $inline,
'video_service' => $video_service);
$links[] = $link;
}