I've been playing around with the Video CCK module, but I can't figure out how to get the video to display. I've created node-video.tpl.php, but I don't know what to put in there to display the video, and I couldn't find any documentation anywhere.

Looking through the code, I see that there's a bunch of theme functions, but if I need to call them or what.

Right now, I just have

<?php print $node->field_video_link[0]['embed'] ?>

Which of course just prints the link instead of embedding it.

I see the

function theme_video_cck_video($field, $item, $formatter, $node) {

But if I have to call that from my template file, I don't know what $formatter is...

I'm sure it's not too hard, it's just a matter of understanding how to do it. Thanks for this great module and your help.

Comments

jody lynn’s picture

print $node->field_video_link[0]['view']

bennybobw’s picture

 print $node->field_video_link[0]['view']

I put that in my tpl.php and it doesn't put out anything. The cck field doesn't have that field:

Array
(
    [0] => Array
        (
            [embed] => http://www.youtube.com/watch?v=OEjh0P_IPI0
            [value] => OEjh0P_IPI0
            [provider] => youtube
        )

)
bennybobw’s picture

Status: Active » Closed (fixed)

Fixed the problem-- I had an older version of CCK. Make sure yours is updated!

Jurgen8en’s picture

Youtube movies are enabled in CCK-video configuration. Without API

Embed code or Video URL:
http://www.youtube.com/v/k8BUIUVjstg

In my contemplate I wrote:

<?php
print $node->field_video[0]['view']
?>

In the body/teaser variables, this is showed:

$node->field_video (array) 
$node->field_video[0] (array) 
$node->field_video[0]['embed'] 
http://www.youtube.com/v/k8BUIUVjstg 
$node->field_video[0]['value'] 
$node->field_video[0]['provider'] 
$node->field_video[0]['view'] 

No video code is displayed in the instance of the content type.
Why?

Great thanks.