Difference between revisions of "Exporting Data"

From ARK
Jump to: navigation, search
 
Line 12: Line 12:
 
   * e.g.
 
   * e.g.
 
   $sfi_export_conf =
 
   $sfi_export_conf =
array(
+
  array(
'media_rss' =>
+
  'media_rss' =>
array(
+
  array(
'export_fields' => array(
+
  'export_fields' => array(
$conf_field_short_desc,
+
  $conf_field_short_desc,
$conf_field_file,
+
  $conf_field_file,
),
+
  ),
),
+
  ),
'csv' =>
+
  'csv' =>
array(
+
  array(
'export_fields' => array(
+
  'export_fields' => array(
$conf_field_short_desc,
+
  $conf_field_short_desc,
$conf_field_file,
+
  $conf_field_file,
),
+
  ),
),
+
  ),
);
+
  );
  */
+
    */
  
 
If you want to add new export types - then you will need to write handlers for both the export itself (a function called exportCSV() and then a function that handles the elements named csvElem()). It may be better to get a Developer to do this.
 
If you want to add new export types - then you will need to write handlers for both the export itself (a function called exportCSV() and then a function that handles the elements named csvElem()). It may be better to get a Developer to do this.
 
[[category: Administrator]]
 
[[category: Administrator]]

Revision as of 07:14, 8 July 2008

In order to allow your users to use the export functionality of ARK you need to set a few settings in the mod_settings files.

Essentially you set up an array that has elements named with the available export types. That array then contains any specific options that you may need for that export type and also the fields to be exported.

Here is an example:

 /*EXPORT STUFF
 * this is the array that sets up what export modes are available for this module
 * and also what fields should be exported in that format.
 * the array needs to be called mod_export_conf with each available format being 
 * a named element in the array.
 * e.g.
 $sfi_export_conf =

array( 'media_rss' => array( 'export_fields' => array( $conf_field_short_desc, $conf_field_file, ), ), 'csv' => array( 'export_fields' => array( $conf_field_short_desc, $conf_field_file, ), ), );

   */

If you want to add new export types - then you will need to write handlers for both the export itself (a function called exportCSV() and then a function that handles the elements named csvElem()). It may be better to get a Developer to do this.