Embedded media field
Lots of of the embedded video was actually caught in the original node creation phase when checking the collected links:-
foreach ($node->field_external_link as $ex_link) {
if (count(emfield_parse_embed(content_fields('field_embedded_video'), $em_link, 'video_cck'))) {
$node->field_embedded_video[]['embed'] = $em_link;
}
}
if (count(emfield_parse_embed(content_fields('field_embedded_video'), $em_link, 'video_cck'))) {
$node->field_embedded_video[]['embed'] = $em_link;
}
}
Others in this migration were taken out of the BBCode:-
function _x_node_embedded($text) {
$links = array();
if (preg_match_all('#\[youtube\](.*?)\[/youtube\]#si', $text, $matches, PREG_SET_ORDER)) {
foreach ($matches as $id) {
$links[]['embed'] = 'http://youtube.com/v/'.$id[1];
}
}
return $links;
}
$links = array();
if (preg_match_all('#\[youtube\](.*?)\[/youtube\]#si', $text, $matches, PREG_SET_ORDER)) {
foreach ($matches as $id) {
$links[]['embed'] = 'http://youtube.com/v/'.$id[1];
}
}
return $links;
}
if (count($node->field_embedded_video)) {
video_cck_field('submit', $node, $field, $items, FALSE, FALSE);
}
video_cck_field('submit', $node, $field, $items, FALSE, FALSE);
}
