$path = $this->compiler->working_path($this->to);
try {
$dim = Image::getimagesize($path);
- }catch (\Exception $e){
- throw new \Exception('Invalid image on link ' . $this->uid . ' (page ' . $this->page . ') : '.$e->getMessage());
+ } catch (\Exception $e) {
+ throw new \Exception('Invalid image on link ' . $this->uid . ' (page ' . $this->page . ') : ' . $e->getMessage());
}
if (is_array($dim) && ($this->video_width || $this->video_height)) {
if ($this->read_mode) {
$read = ' data-readmode="1"';
}
- return $res . ' ' . $read . ' data-multimedia="' . rawurlencode($markup) . '" ';
+
+ $statsName = str_replace('.pdf.svg', '.pdf', $this->to);
+
+ return $res . ' ' . $read . ' data-stats-type="popup_image" data-stats-name="' . $statsName . '" data-multimedia="' . rawurlencode($markup) . '" ';
}
public function keep() {
namespace Fluidbook\Tools\Links;
-class HTMLMultimediaPopupLink extends htmlMultimediaPopupImage
-{
+class HTMLMultimediaPopupLink extends htmlMultimediaPopupImage {
- public function getAdditionnalContent()
- {
+ public function getAdditionnalContent() {
$i = $this->_init;
$i['inline'] = true;
$i['in_popup'] = true;
$l = self::getMultimediaInstance($this->id . '_content', $i, $this->compiler);
$markup = $l->getHTMLContainer();
- return ' data-multimedia="' . rawurlencode($markup) . '" ';
+ return ' data-stats-type="popup_multimedia" data-stats-name="' . $this->to . '" data-multimedia="' . rawurlencode($markup) . '" ';
}
}