? xspf_playlist_cck.patch Index: xspf_playlist_cck.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/xspf_playlist/xspf_playlist_cck/Attic/xspf_playlist_cck.module,v retrieving revision 1.1.2.1.2.3 diff -u -p -r1.1.2.1.2.3 xspf_playlist_cck.module --- xspf_playlist_cck.module 7 Feb 2009 17:12:39 -0000 1.1.2.1.2.3 +++ xspf_playlist_cck.module 13 Feb 2009 23:35:53 -0000 @@ -47,7 +47,7 @@ function xspf_playlist_cck_fields($confi if ($fields) { foreach ($fields as $name => $field) { // only bother with specified field types - if (in_array($field['type'], array('text', 'image', 'file', 'file_video', 'video_cck') )) { + if (in_array($field['type'], array('text', 'image', 'filefield', 'file_video', 'video_cck') )) { $return['xspf_playlist_cck--'. $name] = t('CCK !type: !name', array('!type' => $field['type'], '!name' => $field['widget']['label'])); } } @@ -112,7 +112,27 @@ function xspf_playlist_cck_image_handler // extract all the embeded items from this field foreach ($node->{$field_name} as $field) { if ($field['filepath']) { - if ($xspf_item = xspf_playlist_node_build_file_item($node, $field['filepath'])) { + if ($xspf_item = xspf_playlist_node_build_file_item($node, $GLOBALS['base_path'] . $field['filepath'])) { + $items[] = $xspf_item; + } + } + } + return $items; +} + +/** + * handles the filefield type + * @param $node + * @param $field_name + * @return array + * array of xspf items + */ +function xspf_playlist_cck_filefield_handler($node, $field_name) { + $items = array(); + // extract all the embeded items from this field + foreach ($node->{$field_name} as $field) { + if ($field['filepath']) { + if ($xspf_item = xspf_playlist_node_build_file_item($node, $GLOBALS['base_path'] . $field['filepath'])) { $items[] = $xspf_item; } }