You are here

function theme_asset_youtube_thumbnail in Asset 6

Same name and namespace in other branches
  1. 5 asset_youtube/asset_youtube.module \theme_asset_youtube_thumbnail()
1 theme call to theme_asset_youtube_thumbnail()
asset_youtube_asset_formatter in asset_youtube/asset_youtube.module

File

asset_youtube/inc/asset_youtube.themes.inc, line 2

Code

function theme_asset_youtube_thumbnail($asset) {
  $id = str_replace('.youtube', '', $asset->filename);
  $url = "http://img.youtube.com/vi/{$id}/2.jpg";
  $alt = $title = $asset->title;
  $img = '<img src="' . check_url($url) . '" alt="' . check_plain($alt) . '" title="' . check_plain($title) . '" />';
  return $img;
}