Difference between revisions of "Exporting Data"

From ARK
Jump to: navigation, search
Line 1: Line 1:
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.
+
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. An example is [here http://ark.lparchaeology.com/wiki/index.php/Mod_settings.php#Export].
  
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.
+
You will also need to set up a couple of settings in settings.php, namely:
 
 
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(
 
  'MediaRSS' =>
 
              array(
 
                    'export_fields' => array(
 
                                              $conf_field_short_desc,
 
                                              $conf_field_file,
 
                                        ),
 
              ),
 
  'CSV' =>
 
              array(
 
                    'export_fields' => array(
 
                                              $conf_field_itemkey,
 
                                              $conf_field_short_desc,
 
                                        ),
 
              ),
 
  );
 
    */
 
 
 
===CSV===
 
If you are using the CSV export this will save a fie to a location on your server. This location needs to be specified in your settings.php.
 
  
 
   // EXPORTS
 
   // EXPORTS
 
   //export file location (where ARK exports will be saved - needs to be an absolute path)
 
   //export file location (where ARK exports will be saved - needs to be an absolute path)
   $export_file_path = "C:/filebin/EXCAVATION/ark_exports/";
+
   $export_dir = "C:/ms4w/Apache/htdocs/$ark_dir/tmp"; absolute apth on server to save the export file(s)
 +
  $web_export_dir = "$ark_dir/tmp/"; RELATIVE path where the export files(s) are saved.
  
  
 
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 elemCSV()). 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 elemCSV()). It may be better to get a Developer to do this.
 
[[category: Administrator]]
 
[[category: Administrator]]

Revision as of 16:50, 2 June 2009

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. An example is [here http://ark.lparchaeology.com/wiki/index.php/Mod_settings.php#Export].

You will also need to set up a couple of settings in settings.php, namely:

 // EXPORTS
 //export file location (where ARK exports will be saved - needs to be an absolute path)
 $export_dir = "C:/ms4w/Apache/htdocs/$ark_dir/tmp"; absolute apth on server to save the export file(s)
 $web_export_dir = "$ark_dir/tmp/"; RELATIVE path where the export files(s) are saved.


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 elemCSV()). It may be better to get a Developer to do this.