function theme_video_image_teaser in Video 5
Same name and namespace in other branches
- 6 plugins/video_image/video_image.module \theme_video_image_teaser()
- 6.2 plugins/video_image/video_image.module \theme_video_image_teaser()
Renders thumbnail node with a link to the video node to be used on video teasers.
Parameters
$image: object with image node information
$video: the video node associated with image
Return value
string of content to display
2 theme calls to theme_video_image_teaser()
- video_views_handler_field_video_image in ./
views_video.inc - Handler to render the preview image associated with a video
- _video_image_view in plugins/
video_image/ video_image.module
File
- plugins/
video_image/ video_image.module, line 213 - Enable image support for video module.
Code
function theme_video_image_teaser($image, $video) {
$image_html = NULL;
if ($image != NULL && $image->type == 'image') {
$image_html = image_display($image, 'thumbnail', array(
'class' => 'video_image_teaser',
));
}
else {
if ($image_node == NULL && $video->serial_data['image_teaser']) {
// only for backward compatibility
$image_html = theme('image', $video->serial_data['image_teaser'], $video->title, $video->title, array(
'class' => 'video_image_teaser',
), FALSE);
}
}
if ($image) {
//Create a link with an image in it.
$output .= l($image_html, "node/{$video->nid}", array(), NULL, NULL, FALSE, TRUE);
$output .= '<br class="video_image_clear" />';
}
return $output;
}