Displaying Videos

bennybobw - May 23, 2007 - 15:47
Project:Video CCK
Version:5.x-1.x-dev
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

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.

#1

Jody Lynn - May 24, 2007 - 17:39

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

#2

bennybobw - May 24, 2007 - 18:11

<?php
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
        )

)

#3

bennybobw - May 27, 2007 - 19:52
Status:active» closed

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

#4

Jurgen8en - June 5, 2007 - 18:47

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.

 
 

Drupal is a registered trademark of Dries Buytaert.