You are here

asset_embed.themes.inc in Asset 6

File

asset_embed/inc/asset_embed.themes.inc
View source
<?php

function theme_asset_embed_thumbnail($asset) {
  $id = $asset->embed['id'];
  $url = "http://img.youtube.com/vi/{$id}/2.jpg";
  $alt = $title = $asset->title;
  $img = '<img src="' . check_url($url) . '"' . drupal_attributes(array(
    'alt' => $alt,
    'title' => $title,
  )) . ' />';
  return $img;
}
function theme_asset_embed_fullsize($asset, $attr = array()) {
  $id = $asset->embed['id'];
  return '<object width="' . $attr['width'] . '" height="' . $attr['height'] . '">' . '<param name="movie" value="http://www.youtube.com/v/' . $id . '"></param>' . '<param name="wmode" value="transparent"></param>' . '<embed src="http://www.youtube.com/v/' . $id . '" type="application/x-shockwave-flash" ' . 'wmode="transparent" width="' . $attr['width'] . '" height="' . $attr['height'] . '">' . '</embed></object>';
}