HOWTO: Write code to integrate Drupal modules
Last modified: May 21, 2007 - 10:06
This is a stub
Prepared "playlist" data structure ready for xml
There is a special data structure that can be passed to the second parameter of swf_playlist(). You should follow this naming format, because each Flash Player controls it's own XML structure and needs to know what data to expect.
An example of a call to swf_playlist() like this can be found in swftools_integrate_upload_render() in the swftools_integrate.module.
The data is broken into two sections. The 'header' contains information that will likely appear at the top of the xml file.
The 'playlist' section defines each file. The core structure of this data matches the nomenclature of $node->files (as set by the upload.module).
<?php
$playlist_data = array (
'header' => array (
'title' => 'My playlist',
'name' => 'Author name',
),
'playlist' => array(
0 => array(
'filename' => 'file1.jpg',
'filepath' => 'files/file1.jpg'
'description' => 'My cool pic',
'fileurl' => 'http://example.com/files/file1.jpg',
),
1 => array(
... // and so on.
),
),
);
?>