Update the home page video url
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 20 May 2015 20:29:04 +0000 (16:29 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 20 May 2015 20:29:04 +0000 (16:29 -0400)
For update to vimeo videos

Toolkit/Page.php
Toolkit/Videos/WebDecorator.php
Toolkit/Videos/templates/webDecorator.html

index 1d1e6e9..90686e9 100755 (executable)
@@ -1143,10 +1143,12 @@ class Toolkit_Page
             if ($row) {
                 $videoMapper = new Toolkit_Videos_VideoMapper($dbh);
                 $video = $videoMapper->getVideoById($row['id'], false);
-                $this->featuredVideoCode
-                    = ($video)
-                    ? $video->getVideoCode()
-                    : '';
+                if ($video) {
+                    $this->featuredVideoCode
+                        = ($video)
+                        ? $video->getVideoUrl()
+                        : '';
+                }
             }
         } catch(PDOException $e) {
             Toolkit_Common::handle_error($e);
index c22d952..54d4aea 100644 (file)
@@ -31,7 +31,7 @@ class Toolkit_Videos_WebDecorator
 
     private $_flexyOptions = array();
     private $_template = 'webDecorator.html';
-    
+
     /**
      * Class Constructor
      *
@@ -86,6 +86,7 @@ class Toolkit_Videos_WebDecorator
                 $video = $videoMapper->getVideoById($row['id'], false);
                 if ($video) {
                     $page->vCode = $video->getVideoCode();
+                    $page->vUrl  = $video->getVideoUrl();
                     $page->title = $video->getVideoTitle();
                 }
 
index 4e51e6b..f01941d 100644 (file)
@@ -1,6 +1,6 @@
 <div id="v" class="hBox">
-            <a href="http://www.youtube.com/embed/{vCode}?rel=0&hd=1" class="various fancybox.iframe vidimg">
-            <img src="<?php echo MEDIA_BASE_URL;?>assets/video_image.png">
-            <span class="vidoverlay"></span>
-       </a>
+    <a href="{vUrl}" class="various fancybox.iframe vidimg">
+        <img src="<?php echo MEDIA_BASE_URL;?>assets/video_image.png">
+        <span class="vidoverlay"></span>
+    </a>
 </div>