Niveus_ProductVideo - Version 1.4.0

Version Notes

Installation steps

Download this release

Release Info

Developer Niveus Solutions
Extension Niveus_ProductVideo
Version 1.4.0
Comparing to
See all releases


Code changes from version 1.3.0 to 1.4.0

app/code/community/Niveus/ProductVideo/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <modules>
5
  <Niveus_ProductVideo>
6
- <version>1.3.0</version>
7
  </Niveus_ProductVideo>
8
  </modules>
9
 
3
  <config>
4
  <modules>
5
  <Niveus_ProductVideo>
6
+ <version>1.4.0</version>
7
  </Niveus_ProductVideo>
8
  </modules>
9
 
app/design/frontend/default/default/layout/niveusproductvideo.xml CHANGED
@@ -2,13 +2,6 @@
2
 
3
  <layout version="0.1.0">
4
 
5
- <default>
6
- <reference name="head">
7
- <action method="addCss"><stylesheet>css/productvideo/style.css</stylesheet></action>
8
- <action method="addCss" ><stylesheet>css/tinybox2/style.css</stylesheet></action>
9
- <action method="addJs" ><script>niveus/tinybox2/tinybox.js</script></action>
10
- </reference>
11
- </default>
12
 
13
  <catalog_product_view translate="label">
14
  <reference name="content">
2
 
3
  <layout version="0.1.0">
4
 
 
 
 
 
 
 
 
5
 
6
  <catalog_product_view translate="label">
7
  <reference name="content">
app/design/frontend/default/default/template/niveusproductvideo/video.phtml CHANGED
@@ -18,25 +18,52 @@
18
  <?php
19
  $_productVideos = $this->_getProductVideos();
20
  $a=0;
 
21
 
 
 
 
22
  ?>
23
  <?php if($_productVideos && $_productVideos->count() > 0):?>
24
  <h3><?php echo $this->__('Product Videos') ?></h3>
25
 
26
-
27
-
28
- <?php foreach($_productVideos as $video) : ?>
29
- <?php $videourl = $this->getCode($video);?>
30
 
31
- <?php if($this->is_youtube($videourl)):?>
32
- <!-- video from youtube -->
33
- <?php $video_code = $this->youtube_video_id($videourl);?>
34
- <?php echo "<iframe width=\"560\" height=\"315\" src=\"http://www.youtube.com/embed/$video_code?rel=0\" frameborder=\"0\"></iframe>";?>
35
- <?php elseif($this->is_vimeo($videourl)):?>
36
- <?php $video_code = $this->vimeo_video_id($videourl);?>
37
- <?php echo "<iframe src=\"http://player.vimeo.com/video/$video_code?title=0&byline=0&portrait=0;loop=0\" width=\"560\" height=\"315\" frameborder=\"0\"></iframe>"; ?>
38
- <?php endif; ?>
39
-
40
- <?php endforeach; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
 
42
  <?php endif;?>
18
  <?php
19
  $_productVideos = $this->_getProductVideos();
20
  $a=0;
21
+ $showThumbnail = false;
22
 
23
+ if($_productVideos && $_productVideos->count() > 1){
24
+ $showThumbnail = true;
25
+ }
26
  ?>
27
  <?php if($_productVideos && $_productVideos->count() > 0):?>
28
  <h3><?php echo $this->__('Product Videos') ?></h3>
29
 
30
+ <table>
31
+ <tr>
32
+ <td>
 
33
 
34
+ <?php foreach($_productVideos as $video) : ?>
35
+ <?php
36
+ $videourl = $this->getCode($video);
37
+
38
+ if($this->is_youtube($videourl)){
39
+ $video_code = $this->youtube_video_id($videourl);
40
+ $final_video_url = "http://www.youtube.com/embed/$video_code?rel=0";
41
+ $final_thumnail_url = "http://img.youtube.com/vi/$video_code/default.jpg";
42
+ }
43
+ elseif($this->is_vimeo($videourl)) {
44
+ $video_code = $this->vimeo_video_id($videourl);
45
+ $final_video_url = "http://player.vimeo.com/video/$video_code?title=0&byline=0&portrait=0;loop=0";
46
+ $hash = unserialize(file_get_contents("http://vimeo.com/api/v2/video/$video_code.php"));
47
+ $final_thumnail_url = $hash[0]['thumbnail_medium'];
48
+ }
49
+ ?>
50
+
51
+ <?php
52
+ if ($showThumbnail) {
53
+ echo "<a href=$final_video_url target=\"productVideoFrame\"><img src=$final_thumnail_url height=\"100\" width=\"100\"></a>";
54
+ }
55
+ ?>&nbsp;
56
+
57
+ <?php endforeach; ?>
58
+ </td>
59
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
60
+ <td>
61
+ <?php echo "<iframe name=\"productVideoFrame\" src=$final_video_url width=\"560\" height=\"340\" frameborder=\"0\"></iframe>";?>
62
+ </td>
63
+ </tr>
64
+ </table>
65
+
66
+
67
 
68
+
69
  <?php endif;?>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Niveus_ProductVideo</name>
4
- <version>1.3.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Niveus Youtube product Video extension</description>
11
  <notes>Installation steps</notes>
12
  <authors><author><name>Niveus Solutions</name><user>niveussolutions</user><email>support@niveussolutions.com</email></author></authors>
13
- <date>2014-02-05</date>
14
- <time>09:27:39</time>
15
- <contents><target name="magecommunity"><dir name="Niveus"><dir name="ProductVideo"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><file name="Videos.php" hash="0e4ea8296cdf584cf9756cc086acec13"/><file name="Videos.php~" hash="c21edc574c4c186b23dbccc2d067b503"/></dir></dir></dir></dir></dir><dir name="Product"><dir name="View"><file name="Attribute.php~" hash="629d0759593202ee9d8886d863eff0c1"/><file name="List.php~" hash="9f52ae0257c000b26538daa0a6b5320c"/><file name="Media.php" hash="87141206ee837993560d66872c8f80b1"/><file name="Media.php~" hash="a512858484654f67e015b59def270d13"/></dir></dir><dir name="Rewrite"><file name="AdminhtmlCatalogProductEditTabs.php" hash="d4fcf87e7c895f792927b57dd9af9625"/><file name="AdminhtmlCatalogProductEditTabs.php~" hash="01e2d8cbbee88a7bbc68e5c05e933d54"/></dir><file name="Video.php" hash="7427647e5437bfc0bef5754c602c30f4"/><file name="Video.php~" hash="77668e1600fbb49e7884167842e1a6a3"/></dir><dir name="Helper"><file name="Data.php" hash="ab2f4060c3e9182f197f075b8e7faf50"/><file name="Data.php~" hash="ab2f4060c3e9182f197f075b8e7faf50"/></dir><dir name="Model"><dir name="Config"><dir name="Source"><file name="Scrolling.php" hash="1d095e7d24d4e640fb3b11baa4027b77"/><file name="Scrolling.php~" hash="29faa4933274ad9848784b751730b7dc"/><file name="Titleposition.php" hash="af43b76604b69f24c58c4bf35bab40a3"/><file name="Titleposition.php~" hash="eca314ba351356270cd362da50f974f4"/><file name="Transition.php" hash="387dfb1df77743b982bb0cd8de7c85a1"/><file name="Transition.php~" hash="974787453cece93a0a85cf0fc3046c65"/></dir></dir><file name="Observer.php" hash="1965676480638ee512c57c03016af894"/><file name="Observer.php~" hash="1965676480638ee512c57c03016af894"/><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="0b890d0edf9f635c34d84e80410ab230"/><file name="Setup.php~" hash="392ab06b2156327c4a9e8a3d77160f4a"/></dir></dir><dir name="Videos"><file name="Collection.php" hash="1d5a542d7a919ddeccef1cf3c9607b2f"/><file name="Collection.php~" hash="701b62fdd06add657539e507a3212971"/></dir><file name="Videos.php" hash="4ac319ed11931591649f9ac4569d107b"/><file name="Videos.php~" hash="2d56dcba2e2548597e48bf1afbdb9a58"/></dir><file name="Videos.php" hash="d35074b3b0acd6426ec5df12cf63d077"/><file name="Videos.php~" hash="8bcb8be4da9a0a642722ac4a38ac6729"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="VideosController.php" hash="7174a2ff3564f654110d94a16138bf5a"/><file name="VideosController.php~" hash="d5d5dff399e2a59559e8f635e58258a0"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="a00ffae61be96cd04e435c830cf3fd4d"/><file name="config.xml" hash="919ec3640bb11b91c7871002a0c9a4b4"/><file name="system.xml" hash="b8f38b5efc46ec5a9e0ae6c7d02d6232"/></dir><dir name="sql"><dir name="niveus_productvideo_setup"><file name="mysql4-install-1.2.0.php" hash="4022ec194b52e4800bbe6061ecf8d61c"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Niveus_ProductVideo.xml" hash="7d2fb29c666116bb33c0867e383e0788"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="niveusproductvideo.xml" hash="61f41423688de05affbfd3f0287d609d"/></dir><dir name="template"><dir name="niveusproductvideo"><dir name="tab"><file name="videos.phtml" hash="6d36682fbfe653e4aea4c657141ac18a"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="niveusproductvideo.xml" hash="de98ce985d056729d5f0f86e57809f7f"/></dir><dir name="template"><dir name="niveusproductvideo"><file name="video.phtml" hash="ce489ab1f2349470fe6d3b24f0d402ea"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Niveus_ProductVideo</name>
4
+ <version>1.4.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
10
  <description>Niveus Youtube product Video extension</description>
11
  <notes>Installation steps</notes>
12
  <authors><author><name>Niveus Solutions</name><user>niveussolutions</user><email>support@niveussolutions.com</email></author></authors>
13
+ <date>2014-06-13</date>
14
+ <time>12:03:20</time>
15
+ <contents><target name="magecommunity"><dir name="Niveus"><dir name="ProductVideo"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><file name="Videos.php" hash="0e4ea8296cdf584cf9756cc086acec13"/><file name="Videos.php~" hash="c21edc574c4c186b23dbccc2d067b503"/></dir></dir></dir></dir></dir><dir name="Product"><dir name="View"><file name="Attribute.php~" hash="629d0759593202ee9d8886d863eff0c1"/><file name="List.php~" hash="9f52ae0257c000b26538daa0a6b5320c"/><file name="Media.php" hash="87141206ee837993560d66872c8f80b1"/><file name="Media.php~" hash="a512858484654f67e015b59def270d13"/></dir></dir><dir name="Rewrite"><file name="AdminhtmlCatalogProductEditTabs.php" hash="d4fcf87e7c895f792927b57dd9af9625"/><file name="AdminhtmlCatalogProductEditTabs.php~" hash="01e2d8cbbee88a7bbc68e5c05e933d54"/></dir><file name="Video.php" hash="7427647e5437bfc0bef5754c602c30f4"/><file name="Video.php~" hash="77668e1600fbb49e7884167842e1a6a3"/></dir><dir name="Helper"><file name="Data.php" hash="ab2f4060c3e9182f197f075b8e7faf50"/><file name="Data.php~" hash="ab2f4060c3e9182f197f075b8e7faf50"/></dir><dir name="Model"><dir name="Config"><dir name="Source"><file name="Scrolling.php" hash="1d095e7d24d4e640fb3b11baa4027b77"/><file name="Scrolling.php~" hash="29faa4933274ad9848784b751730b7dc"/><file name="Titleposition.php" hash="af43b76604b69f24c58c4bf35bab40a3"/><file name="Titleposition.php~" hash="eca314ba351356270cd362da50f974f4"/><file name="Transition.php" hash="387dfb1df77743b982bb0cd8de7c85a1"/><file name="Transition.php~" hash="974787453cece93a0a85cf0fc3046c65"/></dir></dir><file name="Observer.php" hash="1965676480638ee512c57c03016af894"/><file name="Observer.php~" hash="1965676480638ee512c57c03016af894"/><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="0b890d0edf9f635c34d84e80410ab230"/><file name="Setup.php~" hash="392ab06b2156327c4a9e8a3d77160f4a"/></dir></dir><dir name="Videos"><file name="Collection.php" hash="1d5a542d7a919ddeccef1cf3c9607b2f"/><file name="Collection.php~" hash="701b62fdd06add657539e507a3212971"/></dir><file name="Videos.php" hash="4ac319ed11931591649f9ac4569d107b"/><file name="Videos.php~" hash="2d56dcba2e2548597e48bf1afbdb9a58"/></dir><file name="Videos.php" hash="d35074b3b0acd6426ec5df12cf63d077"/><file name="Videos.php~" hash="8bcb8be4da9a0a642722ac4a38ac6729"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="VideosController.php" hash="7174a2ff3564f654110d94a16138bf5a"/><file name="VideosController.php~" hash="d5d5dff399e2a59559e8f635e58258a0"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="a00ffae61be96cd04e435c830cf3fd4d"/><file name="config.xml" hash="7b5c77df465a9590c3e90114d9ef3908"/><file name="system.xml" hash="b8f38b5efc46ec5a9e0ae6c7d02d6232"/></dir><dir name="sql"><dir name="niveus_productvideo_setup"><file name="mysql4-install-1.2.0.php" hash="4022ec194b52e4800bbe6061ecf8d61c"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Niveus_ProductVideo.xml" hash="7d2fb29c666116bb33c0867e383e0788"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="niveusproductvideo.xml" hash="61f41423688de05affbfd3f0287d609d"/></dir><dir name="template"><dir name="niveusproductvideo"><dir name="tab"><file name="videos.phtml" hash="6d36682fbfe653e4aea4c657141ac18a"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="niveusproductvideo.xml" hash="fc44f02caa3b18837795fcf2da28a0d5"/></dir><dir name="template"><dir name="niveusproductvideo"><file name="video.phtml" hash="ddefc104ddec1d8173912dcd9c30be55"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>