Is there a way to access video thumbnails from templates?
Something like this:
echo $node->field_video[0]['thumb'];
or similar.
Is it possible?
k.
Is there a way to access video thumbnails from templates?
Something like this:
echo $node->field_video[0]['thumb'];
or similar.
Is it possible?
k.
Comments
Comment #1
chellman commentedTry this:
Comment #2
smoothify commentedThis doesn't work for me - the data array is empty when i do a print_r on the field. (using mainly youtube videos)
i'd like to retrieve the thumbnail inside a template but can't find out how - i've been looking at the following in the video_cck,module but don't know the right way to call it.
function theme_video_cck_video_thumbnail($field, $item, $formatter, $node)
Anyone able to shed some light?
Thanks
Ben
Comment #3
aaron commentedthe easiest way would be to set the display to thumbnail for teasers (at /admin/content/types/[your content type name]/display ), then $node->field_video[0]['view'] would display the thumbnail. alternatively, i'm pretty sure you could do theme('cck_video_thumbnail', $node->field_video, $node->field_video[0], 'video_thumbnail', $node), although i haven't tested it.
aaron
Comment #4
(not verified) commentedComment #5
elvis2 commentedI am trying to use the cck_video_thumbnail theming option for a block. Can you instruct me what fields to put into:
theme_video_cck_video_thumbnail($field, $item, $formatter, $node)
I am running a query to get 5 recent videos and would like to get a thumbnail printout. How can I get the above function to display the thumbnails? I am not sure what $item and $formatter refers too?
Thanks
Comment #6
tom_o_t commentedjust in case someone stumbles across this...
to embed a video thumbnail in a tpl.php file outside of the teaser (I need to display both the thumbnail and full size video on the same page), I had to use:
print theme('video_cck_video_thumbnail', $node->field_video, $node->field_video[0], 'video_thumbnail', $node) . 'hello world';emfield 1.0, drupal 5.7