Example #1
0
    // BROKEN code to display Blip.tv NOWWW
    if (preg_match("/http:\\/\\/blip.tv\\/file\\/([0-9a-zA-Z\\-\\_]*)/i", $url, $matches)) {
        return '<embed src="http://blip.tv/play/' . $matches[1] . '" type="application/x-shockwave-flash" width="700" height="400" allowscriptaccess="always" allowfullscreen="true"></embed>';
    }
    // BROKEN code to display YouAreTv WWW
    if (preg_match("/http:\\/\\/www.youare.tv\\/watch.php\\?id=([0-9a-zA-Z\\-\\_]*)/i", $url, $matches)) {
        return '<embed src="http://www.youare.tv/yatvplayer.swf?videoID=' . $matches[1] . '&serverDomain=" allowScriptAccess="always" loop="false" quality="best" wmode="transparent" width="700" height="400" type="application\\x-shockwave-flash" ></embed>';
    }
    // BROKEN code to display YouAreTv NOWWW
    if (preg_match("/http:\\/\\/youare.tv\\/watch.php\\?id=([0-9a-zA-Z\\-\\_]*)/i", $url, $matches)) {
        return '<embed src="http://www.youare.tv/yatvplayer.swf?videoID=' . $matches[1] . '&serverDomain=" allowScriptAccess="always" loop="false" quality="best" wmode="transparent" width="700" height="400" type="application\\x-shockwave-flash" ></embed>';
    }
    // code to display CollegeHumor
    if (preg_match("/http:\\/\\/www.collegehumor.com\\/video:([0-9a-zA-Z\\-\\_]*)/i", $url, $matches)) {
        return '<object width="700" height="400">' . '<param name="movie" value="http://www.collegehumor.com/video:' . $matches[1] . '" />' . '<param name="allowfullscreen" value="true" />' . '<embed src="http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=' . $matches[1] . '" quality="best" width="700" height="400" type="application/x-shockwave-flash" />' . '</object>';
    }
    return '';
}
?>


<?php 
if ($type == 0) {
    ?>
<div style="background:#000;text-align:center;">
	<?php 
    echo embed_video($play);
    ?>
</div>
<?php 
}
Example #2
0
            ?>
							<div class="post-thumb"><?php 
            resize_img("width=610&height=350");
            ?>
</div>
						<?php 
        }
        ?>
							
						<?php 
        if ($video['vimeo-youtube'] != '' || $video['embedded-code'] != '') {
            ?>
						
							<div class="post-video">
								<?php 
            embed_video(get_the_ID(), 610, 350, 'portfolio_video');
            ?>
							</div>
						
						<?php 
        }
        ?>
					<!-- END .portfolio-meta -->	
					</div> 	
						
					<!-- BEGIN .portfolio-content -->
					<div class="single-portfolio-content">
						<?php 
        if (current_user_can('edit_post', $post->ID)) {
            ?>
							<div class="edit-message">
 function display_slide($slide, $w, $h)
 {
     global $is_responsive;
     $before = '';
     $after = '';
     $img = '';
     // output the content based on the format selected
     switch ($slide['format']) {
         case 'image':
             if ($slide['link']) {
                 $target = $slide['target_blank'] ? 'target="_blank"' : '';
                 $before = '<a href="' . $slide['link'] . '" ' . $target . '>';
                 $after = '</a>';
             }
             // we're resizing images now (mostly because of HiDPI/retina support)
             $img = vt_resize('', $slide['media'], $w, $h, 1);
             // $img = '<img src="'. $slide['media'] .'" />'; // OLD
             // final image tag
             $img = '<img src="' . $img['url'] . '" width="' . $w . '" height="' . $h . '" alt="">';
             echo '<div class="slide imageSlide">' . $before . $img . $after . '</div>';
             // nesting image inside DIV to help with PNG transparency issues in IE
             //echo $before .'<img src="'. $slide['media'] .'" width="'. $w .'" height="'. $h .'" />'. $after;
             break;
         case 'video':
             $video = video_info($slide['media']);
             // valid YouTube or Vimeo
             if ($video) {
                 switch ($video['video_type']) {
                     case 'youtube':
                         $url = 'http://www.youtube.com/v/' . $video['video_id'];
                         $embedMethod = 'youtube-iframe';
                         break;
                     case 'vimeo':
                         $url = 'http://player.vimeo.com/video/' . $video['video_id'];
                         $embedMethod = 'vimeo-iframe';
                         break;
                     default:
                         // nothing here yet.
                 }
                 echo '<div class="slide videoSlide">';
                 embed_video($url, $w, $h, '', $embedMethod);
                 echo '</div>';
             } else {
                 _e('Please enter a valid Youtube or Vimeo Url', THEME_NAME);
             }
             break;
         case 'content':
             $ratio = $is_responsive ? 'data-ratio="' . round($w / $h, 3) . '"' : '';
             $before = '<div class="slide contentSlide" style="width: ' . $w . 'px; height: ' . $h . 'px;" ' . $ratio . '><div class="inner ugc">';
             $after = '</div></div>';
             echo $before . prep_content($slide['content'], 1, 1) . $after;
             break;
         case 'background-image':
             $ratio = $is_responsive ? 'data-ratio="' . round($w / $h, 3) . '"' : '';
             if ($slide['media']) {
                 $bg = 'transparent url(' . $slide['media'] . ') no-repeat 50% 50%';
                 $before = '<div class="slide contentSlide" style="background: ' . $bg . '; width: ' . $w . 'px; height: ' . $h . 'px;" ' . $ratio . '><div class="inner ugc">';
                 $after = '</div></div>';
             }
             echo $before . prep_content($slide['content'], 1, 1) . $after;
             break;
         case 'framed-image':
             $before = '<div style="width: ' . $w . 'px; height: ' . $h . 'px;" class="framedMedia">';
             $after = '</div>';
             // setup image
             if ($slide['media']) {
                 // we're resizing images now (mostly because of HiDPI/retina support)
                 $img = vt_resize('', $slide['media'], $w, $h, 1);
                 // $img = '<img src="'. $slide['media'] .'" />'; // OLD
                 // final image tag
                 $img = '<img src="' . $img['url'] . '" width="' . $w . '" height="' . $h . '" >';
                 if ($slide['link']) {
                     $target = $slide['target_blank'] ? 'target="_blank"' : '';
                     $img = '<a href="' . $slide['link'] . '" ' . $target . '>' . $img . '</a>';
                 }
                 $img = '<div class="slide framedImage">' . $img . '</div>';
             }
             // setup content
             $content = prep_content($slide['content'], 1, 1);
             $content = '<div class="framedContent ugc">' . $content . '</div>';
             // position image (left/right)
             $output = $img . $content;
             // default - image left
             if ($slide['position'] == 'right') {
                 $output = $content . $img;
             }
             // output slide
             echo $before . $output . $after;
             break;
         case 'framed-video':
             $before = '<div style="width: ' . $w . 'px; height: ' . $h . 'px;" class="slide framedMedia">';
             $after = '</div>';
             // setup image
             if ($slide['media']) {
                 $video = video_info($slide['media']);
                 // valid YouTube or Vimeo
                 if ($video) {
                     switch ($video['video_type']) {
                         case 'youtube':
                             $url = 'http://www.youtube.com/v/' . $video['video_id'];
                             $embedMethod = 'youtube-iframe';
                             break;
                         case 'vimeo':
                             $url = 'http://player.vimeo.com/video/' . $video['video_id'];
                             $embedMethod = 'vimeo-iframe';
                             break;
                         default:
                             // nothing here yet.
                     }
                 } else {
                     _e('Please enter a valid Youtube or Vimeo Url', THEME_NAME);
                 }
             }
             // setup content
             $content = prep_content($slide['content'], 1, 1);
             $content = '<div class="framedContent ugc">' . $content . '</div>';
             // output slide
             echo $before;
             if ($slide['position'] == 'right') {
                 echo $content;
             }
             echo '<div class="framedVideo">';
             embed_video($url, '612', '374', '', $embedMethod);
             echo '</div>';
             if ($slide['position'] !== 'right') {
                 echo $content;
             }
             echo $after;
             break;
     }
 }
Example #4
0
							    <div class="slide-description">
								    <h2 class="slide-title"><?php 
                the_title();
                ?>
</h2>
								    <?php 
                the_content();
                ?>
								</div>
							</div>
						<?php 
            } elseif ($video['vimeo-youtube'] != '' || $video['embedded-code'] != '') {
                ?>
							<div class="video-content clearfix beforeload">
								<?php 
                embed_video(get_the_ID(), 550, 310, 'slide_video');
                ?>
								<div class="slide-description">
								    <h2 class="slide-title"><?php 
                the_title();
                ?>
</h2>
								    <?php 
                the_content();
                ?>
								</div>
							</div>
						<?php 
            }
            ?>