The gallery export function of TGPX allows you to export some or all of your galleries so they can be used in other TGPX installations or with third party programs. This document will describe how to export galleries from your TGPX installation.
Control Panel Interface
To use the gallery export function access the Galleries > Search Galleries function from the control panel menu. This will load the standard Search Galleries interface, which will display a drop-down list of functions at the bottom of that page. Select the Export function from the first drop down list, and an option from the second drop down list to control which galleries get exported. Those options are:
Selected Galleries - This will export the displayed galleries that have a check in their associated checkbox.
All Matching Galleries - This will export all of the galleries that match the search items you have entered at the top of the page. For example, if you only want to export galleries from a specific category you can do a search for that category in the Search Galleries interface and then select to export all matching galleries.
All Galleries - This will export all of the galleries currently in your database
|Galleries File||Enter the filename you want to use for the gallery data. This file will be generated in the data directory of your installation and the gallery data will be written to this file.|
|Thumbs File||Enter the filename you want to use for the thumbnail preview image data. This file will be generated in the data directory of your installation and the thumbnail preview images will be written to this file. If you leave this field blank, the thumbnail preview images will not be exported.|
|File Format||Select the file format to use for the export data. More on this later...|
|Delimiter||Select the delimiter (character that will separate each piece of gallery data) to use when generating a delimited text file.|
|Fields||Select the fields you want to export from the database. You can select multiple fields by holding down the ctrl key on your keyboard as you click on the name of each field.|
When exporting galleries you have a choice of 2 different file formats to use:
Raw SQL Text File
In order to maintain the database consistency, it is necessary for the software to include your sponsors, partners, categories, icons, and annotations when generating the raw SQL export file. If you use the database restore function to add the exported galleries to an existing TGPX installation it will overwrite all of the current galleries, categories, partners, sponsors, icons, and annotations.
This format will export the galleries with the SQL queries necessary to load them into another TGPX installation. Use this method if you want to transfer galleries from one TGPX installation to another. The export file that is generated will be compatible with the TGPX database restore function, so you can use that file in another TGPX installation along with the restore function to quickly add these galleries.
Delimited Text File
This format will export the galleries one-per-line into a text file. Each line will contain the data for one gallery, and each piece of data will be separated by the delimiter character that you select. Use this method if you want to transfer galleries to a third party program or to another TGPX installation without overwriting the current galleries in that installation. If you select to use the pipe (|) character as the delimiter, you will be able to use the generated file with the TGPX gallery import function in another installation to import these galleries.
Your thumbnail preview images can optionally be included in the export, and a separate file will be generated that contain these images. This file will be a plain text file with one thumbnail image per line. Each line has this format:
The thumbnail export file can be useful in two situations:
- With the Raw SQL format. When you are using this format, you can use the TGPX database restore function to import the galleries into another TGPX installation. Since
the restore function allows you to specify the filename of a thumbnail backup file, you can enter the name of the file generated by the export function.
- If you are using a third party program for which you can create a custom addon that is capable of reading the thumbnail export file.