Embedded Media Field: Third Party Videos, Audio & Images
The Embedded Media Field (emfield) creates a field for nodes created with CCK to accept pasted URL's or embed code from various third party media content providers, such as YouTube and Flickr. It will then parse the URL to determine the provider, and display the media appropriately.
Currently, the module ships with Embedded Video Field, Embedded Image Field, and Embedded Audio Field. In addition, it has Embedded Media Import, to import photosets and playlists into individual nodes, when allowed by specific providers. Finally, it also ships with Embedded Media Thumbnail, which allows editors to override provider-supplied thumbnails with their own custom image thumbnails.
The module also allows field & provider specific settings and overrides, such as autoplay, resized thumbnails or videos for teasers, RSS support, and YouTube's 'related videos'. You can turn off individual provider support on a field or global basis.
You can give the module a try at Drupal Hub.
Currently supported providers:
Video:
- Blip.TV
- Brightcove
- Daily Motion
- Guba
- JumpCut
- imeem
- Lastfm
- LiveVideo
- MetaCafe
- MySpace
- Revver
- SevenLoad
- Spike.TV
- Tudou
- Veoh
- Vimeo
- YouTube
- Local videos (when already uploaded in the files directory)
Image:
- Flickr
- ImageShack
- PhotoBucket
- Picasa
- Smugmug (via additional module download)
Audio:
- Odeo
- Podcast Alley
- podOmatic
You can:
- Administer emfield's general settings at administer >> content >> emfield
- Add embedded media fields to your content types at administer >> content >> types >> %YourType% >> add_field
- Manage teaser and full node display settings at administer >> content >> types >> %YourType% >> fields

Re: Embedded Media Module - Adding Fields in node/content type
Hi Guys,
I encountered the same problem. In many modules new fields are most often automatically added or should I say the user can select the specific nodes (content types) in which they would like the new field functionality added without having to actually add the specific fields. For instance, go to content type "story" and select the "edit" option.
However, with the Embedded Media module, once installed and enabled, you must go to:
admin=content management=content types=edit(@the specific content type that you desire to add field)=manage fields=add field.
1) you first need to add a group name( can be anything like- Embedded Video)
2) Once you add group, then you must add the actual field by selecting "add field" option.
Once this process is complete, go to create content and select "story" or the content type that you added the field and you will see the new fields added @ Embedded video for instance.
One word of caution. The module seems to be limited in that in only allows you to utilize "one" of either embedded video; audio or image, but not all three or even more than one.
Don't be intimidated, just jump in on it. Because the Embedded Media module has an integrated CCK relationship, once you set the fields up, all else with be in place automatically on the node/content form.
Hope this helps someone,
John 3:16
Node Theming with emvideo in Drupal 6
To manually theme a node you can insert sth like this in the node tpl (where field_external_video is the name of your field):
<?phpif ($node->field_external_video[0]['embed']) {
$field_type = 'field_external_video';
$system_types = _content_type_info();
$field = $system_types['fields'][$field_type];
// To set custom video size, uncomment these lines
// $field['widget']['video_width'] = 250;
// $field['widget']['video_height'] = 150;
print theme('emvideo_video_video', $field, $node->field_external_video[0], 'emvideo_embed', $node);
}
?>
Eikaa, thx for this code. I
Eikaa, thx for this code. I used it in contemplate and it worked fine.
The thing that is troubling me is how to use this code if I have multiple video;s. The following code clearly isn't working.
foreach ($node->field_video as $video) {$field_type = 'field_video';
$system_types = _content_type_info();
$field = $system_types['fields'][$field_type];
// To set custom video size, uncomment these lines
// $field['widget']['video_width'] = 250;
// $field['widget']['video_height'] = 150;
print theme('emvideo_video_video', $field, $video, 'emvideo_embed', $node);
}
emvideo, theming teaser with 'preview'
This code just works superbly. I used it in the teaser for my video page. Needed a little change in the code:
<?phpif ($node->field_external_video[0]['embed']) {
$field_type = 'field_external_video';
$system_types = _content_type_info();
$field = $system_types['fields'][$field_type];
print theme('emvideo_video_preview', $field, $node->field_external_video[0], 'emvideo_embed', $node);
}
?>
Notice that print theme('emvideo_video_preview'...) instead of print theme('emvideo_video_video'...) is the change that was required. However, if I specifically mention the 'emvideo_video_preview', then customizing the size does not work. It then takes the width and height of the video as set in the settings page. As usual, field_external_video should be the field that you created with CCK. In my case it is field_video_url
I have implemented it on www.nishorga.com/video
Need the first 3 lines
Look in the lighbox module and copy the lines you need before your theme function. Don't even know why you would need to call another system function just to set a parameter, but haven't messed with it in D6 yet.
Yeah, only way I could get it working correctly in D5 as an image thumbnail is like:
<?php$field['field_name'] = 'field_external_video';
$field['widget']['video_width'] = 425;
$field['widget']['video_height'] = 350;
print theme('lightbox2_video_cck', $field, $node->field_external_video[0], 'image_thumbnail', $node);
?>
where the only thing you'll change is 'field_external_video' wherever it appears.to match your field name.
Not the first time I've implemented theme code, mind you, but i do believe you shouldn't even have to type the three $field lines. Even 'image_thumbnail' parameter doesn't appear to be useful. Type in anything there. Someone prove me wrong.
Meh, so 3 more lines of code above. If you want a custom thumbnail size, give the last param an array:
<?phpprint theme('lightbox2_video_cck', $field, $node->field_video_vendor[0], 'image_thumbnail', $node, array('width'=>120, 'height'=>90));
?>
theme video thumbnail in teaser template
<?phpprint theme('video_cck_video_thumbnail', $node->field_video, $node->field_video[0], 'video_thumbnail', $node);
?>
where you change instances of
field_videoto the machine-readable name of whatever your field is.Just a note, the last snippet
Just a note, the last snippet didn't work for me. I had to use the following:
<?phpif ($node->field_video[0]['embed']) {
$field_type = 'field_video';
$system_types = _content_type_info();
$field = $system_types['fields'][$field_type];
print theme('emvideo_video_thumbnail', $field, $node->field_video[0], 'emvideo_thumbnails', $node);
}
?>
Take note of the use of "emvideo" instead of "video_cck".