32 parent::__construct($id, $instance);
45 $structure = parent::structure($id);
47 $structure[
'type'] =
new hiddenField(array(
50 'label'=>$this->_fields_label[
'type'],
54 $base_path = $this->_controller->getBaseAbsPath(
'video');
56 $structure[
'video_platform'] =
new foreignKeyField(array(
57 'name'=>
'video_platform',
58 'value'=>$this->video_platform,
59 'label'=>$this->_fields_label[
'video_platform'],
64 'fkey_where'=>
'instance=\''.$this->_controller->getInstance().
'\'',
81 return $controller->getBasePath(
'thumb').
'/'.$this->thumb;
84 return $controller->defaultVideoThumbPath();
98 $name =
"<a href=\"".$media_base_url.
'/'.$this->
id.
"\">".$this->name.
"</a>";
100 $description = $this->description;
102 $description .=
"<p>"._(
'Tag:').
' '.$this->tags.
"</p>";
105 $credits = $this->credits;
108 $credits .=
"<br />"._(
"Licenza: ").
"<a href=\"".$license->url.
"\" target=\"_blank\">".$license->name.
"</a>";
114 thumb: '".$this->thumbPath($controller).
"',
115 ".$video_platform->name.
": '".$this->video_code.
"',
116 video_width: ".$this->video_width.
",
117 video_height: ".$this->video_height.
",
118 title: '".jsVar($name).
"',
119 description: '".jsVar($description).
"',
120 credits: '".jsVar($credits).
"'
133 public function show($controller) {
137 $buffer =
"<iframe frameborder=\"0\" width=\"".$this->video_width.
"\" height=\"".$this->video_height.
"\" src=\"".$video_platform->base_url.$this->video_code.
"\">";
138 $buffer .= _(
"Il tuo browser non supporta gli iframe");
139 $buffer .=
"</iframe>";