diff --git a/build/plugins/videobox/propset.xml b/build/plugins/videobox/propset.xml
index 4b0d003..fd956e4 100644
--- a/build/plugins/videobox/propset.xml
+++ b/build/plugins/videobox/propset.xml
@@ -47,10 +47,10 @@
default="<ul class="vb_gallery [[+class]]" style="[[+style]]">[[+content]]</ul>
[[+pagination]]" />
+ default="<a href="[[+link]]" class="vb_link [[+class]]" style="[[+style]]" rel="[[+rel]]" title="[[+title]]" data-videowidth="[[+pWidth]]" data-videoheight="[[+pHeight]]">[[+linkText]]</a>" />
+ default="<div class="vb_video_frame [[+class]]" style="max-width: [[+pWidth]]px; [[+style]]"><div class="vb_video_sizer" style="padding-bottom: [[+ratio]]%;"><iframe src="[[+link]]" frameborder="0" allowfullscreen oallowfullscreen msallowfullscreen webkitallowfullscreen mozallowfullscreen ></iframe></div><span class="vb_video_title" >[[+title]]</span></div>" />
diff --git a/build/plugins/videobox/videobox.php b/build/plugins/videobox/videobox.php
index a59415b..79f037b 100644
--- a/build/plugins/videobox/videobox.php
+++ b/build/plugins/videobox/videobox.php
@@ -286,7 +286,7 @@ private function generateOutput($videobox, $scriptProperties){
return $videobox->parseTemplate($scriptProperties['galleryTpl'], array('content' => $content, 'pagination' => $pagination));
}
} else {
- $autoPlay = isset($autoPlay) && $autoPlay && $scriptProperties['display'] == 'player' && (!isset($videobox->autoPlay) || !$videobox->autoPlay);
+ $autoPlay = isset($scriptProperties['autoPlay']) && $scriptProperties['autoPlay'] && $scriptProperties['display'] == 'player' && (!isset($videobox->autoPlay) || !$videobox->autoPlay);
$scriptProperties['autoPlay'] = $autoPlay;
if($autoPlay) $videobox->autoPlay = true;
ksort($scriptProperties);
@@ -294,7 +294,7 @@ private function generateOutput($videobox, $scriptProperties){
$data = $videobox->getCache($propHash);
if($data) return $data;
$video = $videos[0];
- $props = array_merge(array('vbOptions' => htmlspecialchars(json_encode($vbOptions)), 'rel' => $scriptProperties['player'], 'pWidth' => $scriptProperties['pWidth'], 'pHeight' => $scriptProperties['pHeight'], 'tWidth' => $scriptProperties['tWidth'], 'tHeight' => $scriptProperties['tHeight']), array('title' => $video->getTitle(), 'link' => $video->getPlayerLink($scriptProperties['display'] != 'player' || $autoPlay), 'ratio' => (100*$scriptProperties['pHeight']/$scriptProperties['pWidth'])));
+ $props = array_merge(array('vbOptions' => htmlspecialchars(json_encode($vbOptions)), 'rel' => $scriptProperties['player'], 'pWidth' => $scriptProperties['pWidth'], 'pHeight' => $scriptProperties['pHeight'], 'tWidth' => $scriptProperties['tWidth'], 'tHeight' => $scriptProperties['tHeight']), array('title' => $video->getTitle(), 'link' => $video->getPlayerLink(in_array($scriptProperties['display'], array('box', 'link', 'links')) || $autoPlay), 'ratio' => (100*$scriptProperties['pHeight']/$scriptProperties['pWidth'])));
switch($scriptProperties['display']){
case 'links':
$props['linkText'] = isset($linkText) ? trim($linkText) : $video->getTitle(true);
diff --git a/package.json b/package.json
index 17c781b..da018ad 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"license": "GPL-3.0",
"readme": "README.md",
- "version": "5.0.2",
+ "version": "5.0.3",
"name": "Videobox-Joomla",
"copyright": "Hitko",
"homepage": "https://hitko.eu/videobox/",
diff --git a/src/plugins/videobox/propset.xml b/src/plugins/videobox/propset.xml
index 4b0d003..fd956e4 100644
--- a/src/plugins/videobox/propset.xml
+++ b/src/plugins/videobox/propset.xml
@@ -47,10 +47,10 @@
default="<ul class="vb_gallery [[+class]]" style="[[+style]]">[[+content]]</ul>
[[+pagination]]" />
+ default="<a href="[[+link]]" class="vb_link [[+class]]" style="[[+style]]" rel="[[+rel]]" title="[[+title]]" data-videowidth="[[+pWidth]]" data-videoheight="[[+pHeight]]">[[+linkText]]</a>" />
+ default="<div class="vb_video_frame [[+class]]" style="max-width: [[+pWidth]]px; [[+style]]"><div class="vb_video_sizer" style="padding-bottom: [[+ratio]]%;"><iframe src="[[+link]]" frameborder="0" allowfullscreen oallowfullscreen msallowfullscreen webkitallowfullscreen mozallowfullscreen ></iframe></div><span class="vb_video_title" >[[+title]]</span></div>" />
diff --git a/src/plugins/videobox/videobox.php b/src/plugins/videobox/videobox.php
index a59415b..79f037b 100644
--- a/src/plugins/videobox/videobox.php
+++ b/src/plugins/videobox/videobox.php
@@ -286,7 +286,7 @@ private function generateOutput($videobox, $scriptProperties){
return $videobox->parseTemplate($scriptProperties['galleryTpl'], array('content' => $content, 'pagination' => $pagination));
}
} else {
- $autoPlay = isset($autoPlay) && $autoPlay && $scriptProperties['display'] == 'player' && (!isset($videobox->autoPlay) || !$videobox->autoPlay);
+ $autoPlay = isset($scriptProperties['autoPlay']) && $scriptProperties['autoPlay'] && $scriptProperties['display'] == 'player' && (!isset($videobox->autoPlay) || !$videobox->autoPlay);
$scriptProperties['autoPlay'] = $autoPlay;
if($autoPlay) $videobox->autoPlay = true;
ksort($scriptProperties);
@@ -294,7 +294,7 @@ private function generateOutput($videobox, $scriptProperties){
$data = $videobox->getCache($propHash);
if($data) return $data;
$video = $videos[0];
- $props = array_merge(array('vbOptions' => htmlspecialchars(json_encode($vbOptions)), 'rel' => $scriptProperties['player'], 'pWidth' => $scriptProperties['pWidth'], 'pHeight' => $scriptProperties['pHeight'], 'tWidth' => $scriptProperties['tWidth'], 'tHeight' => $scriptProperties['tHeight']), array('title' => $video->getTitle(), 'link' => $video->getPlayerLink($scriptProperties['display'] != 'player' || $autoPlay), 'ratio' => (100*$scriptProperties['pHeight']/$scriptProperties['pWidth'])));
+ $props = array_merge(array('vbOptions' => htmlspecialchars(json_encode($vbOptions)), 'rel' => $scriptProperties['player'], 'pWidth' => $scriptProperties['pWidth'], 'pHeight' => $scriptProperties['pHeight'], 'tWidth' => $scriptProperties['tWidth'], 'tHeight' => $scriptProperties['tHeight']), array('title' => $video->getTitle(), 'link' => $video->getPlayerLink(in_array($scriptProperties['display'], array('box', 'link', 'links')) || $autoPlay), 'ratio' => (100*$scriptProperties['pHeight']/$scriptProperties['pWidth'])));
switch($scriptProperties['display']){
case 'links':
$props['linkText'] = isset($linkText) ? trim($linkText) : $video->getTitle(true);