.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ===================== EXT:sa\_addressexport ===================== :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed by: Stefan Alpers :Changed: 2004-09-08T15:20:49 :Author: Stefan Alpers :Email: typo3@sa-net.de :Info 3: :Info 4: .. _EXT-sa-addressexport: EXT:sa\_addressexport ===================== Extension Key: **sa\_addressexport** Copyright 2000-2002, Stefan Alpers, This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml The content of this document is related to TYPO3 \- a GNU/GPL CMS/Framework available from www.typo3.com .. _Table-of-Contents: Table of Contents ----------------- **EXT:sa\_addressexport 1** **Introduction 1** What does it do? 1 Screenshots 1 **Users manual 3** Export profiles 3 FAQ 3 **Adminstration 4** FAQ 4 **Configuration 4** Creating Exporter Plugins 4 **Tutorial 5** **Known problems 5** **To-Do list 5** **Changelog 6** .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ This extension exports a list of tt\_address records to various formats. You can extend the extension by adding your own format using plugins. The fields being exported and the export plugincan be selected for each export profile. .. _Screenshots: Screenshots ^^^^^^^^^^^ |img-1| *Screenshot 1Plugin configuration* |img-2| *Screenshot 2Export profile* |img-3| *Screenshot 3Page header* |img-4| *Screenshot 4Output option: "Show Data" used with exporter HTML* |img-5| *Screenshot 5Ouput option "Download exported data as file"* .. _Users-manual: Users manual ------------ Install the extension using the extension manager. Afterwards create a new sysfolder to store the export profiles in. Then create a new page for the export its self. Edit the page headerand set the “ **General Record Storage page** ” the sysfolder previously created. Now add a new “Address Export” plugin to the page. Point “ **Startingpoint** ” to the location of your tt\_address records. At last the export profile have to be created in the sysfolder. Click on the sysfolder in the pageview an select “new”. Then Click on “Export profile”. Now you can create your export profiles. .. _Export-profiles: Export profiles ^^^^^^^^^^^^^^^ Export profiles are the extension's way to handle export settings without changing Typoscript.It is possible to have multiple profiles in parallel so you can export to various formats or export various fields. Another area of application is to export specific fields for different fe\_groups. .. _FAQ: FAQ ^^^ \- Possible subsections: FAQ .. _Adminstration: Adminstration ------------- See `Users manual <#Users%20manual%7Coutline>`_ . .. _FAQ: FAQ ^^^ \- Possible subsections: FAQ .. _Configuration: Configuration ------------- More exporters can be added to the extension using a simple plugin api. .. _Creating-Exporter-Plugins: Creating Exporter Plugins ^^^^^^^^^^^^^^^^^^^^^^^^^ **Warning! The exporter interface is still experimental. Please test your exporters thoroughly before using in production environments!** Creating exporter pluginsis very easy. If you follow these steps you won't encounter any problems. .. _Extending-the-exporter-class: Extending the exporter class """""""""""""""""""""""""""" The exporter is based on the class *tx* *\_* *saaddressexport* *\_exporterBase* which has to extended by your own exporter class. Furthermore you have to implement the functions: .. ### BEGIN~OF~TABLE ### .. _: :: ~~ .. container:: table-row function name :: exporter() description The actual export function which is called by export(). This method does all the exporting and stores it to an internal value. Default is $this->filecontent but not mandatory. You can define own values in your class. See below for returning methods. Return true on success and false on error. .. _: :: ~~ .. container:: table-row function name :: saveData() description Save the data generated by exporter() to $this->getFilename() Return true on success and false on error. .. _: :: ~~ .. container:: table-row function name :: getData() description Return the data generated $this->exporter() .. ###### END~OF~TABLE ###### As an example we want to create a plugin for the type XYZ: The three letter code XYZ will multiple times and will be printed red. It is important that the three letter code is replaced with your code. Otherwise the plugin will fail with a fatal error. .. _Create-the-class: Create the class """""""""""""""" Create the file **res/exporters/class.tx\_saaddressexport\_exporter** **XYZ** **.php** :: class tx_saaddressexport_exporterXYZ extends tx_saaddressexport_exporterBase { var $filecontent; function exporter() { //write your exporter code here $this->filecontent='my exported data'; if ($success) { return(true); } else { return(false); } } /** * Save the data to $this->getFilename() * return true on success false on failure * */ function saveData() { return(t3lib_div::writeFile($this->getFilename(),$this->getData())); } /** * Return the data exported by your class * */ function getData() { return($this->filecontent); } } As you see the th code appears in the filename an in the class name. You have to implement the three methods otherwise the exporter will die with a fatal error stating that the method is not implemented. When exporting text files you can copy saveData() and getData() you only haveto change them when exporting to binary data. .. _Editing-the-xmlfile: Editing the xmlfile """"""""""""""""""" Open the file **res/plugins.xml** in an editor. :: CSV csv XML xml HTML html XYZ zyx Add a new section to the xml file. Be sure to increment *index.* **This is very important!** Set *name* to the three letter code and *ext* to the extension of your export file. .. _Add-the-plugin-to-the-backend: Add the plugin to the backend """"""""""""""""""""""""""""" At last we must add the plugin to the list of exporters in backend. This can be a bit confusing and can lead to errors in the backend. So make a backup of your files before editing them! Open **locallang\_db.php** in an editor and search for “tx\_saaddressexport\_xportprofile.xportfunction.I”. You will find multiple entries which are numbered. The last entry's number should (index of your plugin)-1 *(see above – Editing the xml file)* copy this line, change the number to your index and change the text appropriately. This file contains Translations for every language, insert the translation for every language you know as described. Now open **tca.php** and locate sa\_addressexport/locallang\_db.php:t x\_saaddressexport\_xportprofile.xportfunction.I.This has to end with the same number as above. Copy the complete line and change the numbers the same way as you did above. Now you are done and you can use your plugin. .. _Reference: Reference """"""""" Reference (TypoScript) .. ### BEGIN~OF~TABLE ### .. _allWrap-stdWrap: allWrap /+stdWrap ~~~~~~~~~~~~~~~~~ .. container:: table-row Property allWrap /+stdWrap Data type wrap Description Wraps the whole item Default .. ###### END~OF~TABLE ###### .. _Tutorial: Tutorial -------- \- see `Users manual <#Users%20manual%7Coutline>`_ \- see `Creating Exporter Plugins <#Creating%20Exporter%20Plugins%7Coutline>`_ .. _Known-problems: Known problems -------------- \- Only the standard tt\_address is covered yet. Even is the table has been extended only standard fields will be exported. .. _To-Do-list: To-Do list ---------- - Implement the checkboxes “Address Category” and “Assigned FrontendUser” 04.09.2004 - Implement Pluginbuilder (very far away) 04.09.2004 - Split into frontend plugin and library. Libary should generic exporter. 04.09.2004 .. _Changelog: Changelog --------- \- Initial version (05.09.2004) |img-6| EXT:sa\_addressexport - 6 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. :border: 0 .. :id: Grafik2 .. :name: Grafik2 .. :width: 100% .. |img-2| image:: img-2.png .. :align: left .. :border: 0 .. :id: Grafik1 .. :name: Grafik1 .. :width: 100% .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 452 .. :id: Grafik4 .. :name: Grafik4 .. :width: 558 .. |img-4| image:: img-4.png .. :align: left .. :border: 0 .. :id: Grafik3 .. :name: Grafik3 .. :width: 100% .. |img-5| image:: img-5.png .. :align: left .. :border: 0 .. :id: Grafik5 .. :name: Grafik5 .. :width: 100% .. |img-6| image:: img-6.png .. :align: left .. :border: 0 .. :height: 32 .. :id: Graphic1 .. :name: Graphic1 .. :width: 102