function theme_video_formatter_video_nodelink in Video 6.4
Same name and namespace in other branches
- 6.5 video_formatter.inc \theme_video_formatter_video_nodelink()
1 theme call to theme_video_formatter_video_nodelink()
File
- ./
video_formatter.inc, line 38 - Video formatter hooks and callbacks.
Code
function theme_video_formatter_video_nodelink($element, $imagecache = FALSE) {
// Inside a view $element may contain null data. In that case, just return.
if (empty($element['#item']['fid'])) {
return '';
}
//setup our thumbnail object
module_load_include('inc', 'video', '/includes/video_helper');
$video_helper = new video_helper();
$thumbnail = $video_helper
->thumbnail_object($element);
//get our themed image
$image = theme('video_image', $thumbnail, $thumbnail->alt, $thumbnail->title, '', TRUE, $imagecache);
$class = 'popups video video-nodelink video-' . $element['#field_name'];
return l($image, 'node/' . $element['#node']->nid, array(
'attributes' => array(
'class' => $class,
),
'html' => TRUE,
));
}