Skip to content

Instantly share code, notes, and snippets.

@razbakov
Created October 27, 2011 09:49
Show Gist options
  • Save razbakov/1319186 to your computer and use it in GitHub Desktop.
Save razbakov/1319186 to your computer and use it in GitHub Desktop.
Show vimeo thumb with popup video
<?php if($vimeo = $_product->getVimeo()):
$hash = unserialize(file_get_contents("http://vimeo.com/api/v2/video/$vimeo.php"));
$img = $hash[0]['thumbnail_medium'];
?>
<script type="text/javascript">
jQuery(function($) {
$(".youtube-thumb a").fancybox({type:'iframe'});
});
</script>
<li class="youtube-thumb"><a title="<?php echo $this->__('Play Video') ?>" href="http://player.vimeo.com/video/<?php echo $vimeo; ?>?autoplay=1"> </a><img src="<?php echo $img; ?>"></li>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment