Community Documentation

HOWTO: Write code to integrate Drupal modules

Last updated May 21, 2007. Created by sime on May 6, 2007.
Log in to edit this page.

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.
   
),
  ),
);
?>

About this page

Drupal version
Drupal 5.x

Site Building Guide

Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.
nobody click here