If you are currently running AutoGallery SQL on one of your sites and would like to import it's data into a TGPX installation, you can use the included ags-convert.php script to do just that. This document will outline the steps necessary to convert your AutoGallery SQL data.
To convert your AutoGallery SQL data you will need to be using the latest snapshot release (currently 3.6.2-SS). If you are not using the latest AutoGallery SQL snapshot release, follow the instructions in the AutoGallery SQL software manual to upgrade or patch your installation.
The conversion script will convert and import the following data from your AutoGallery SQL installation:
- Font files used for verification codes
- Annotation font files and images
- Thumbnail preview images
- Submitter e-mail log
- Blacklist settings
- Whitelist settings
- Reciprocal link settings
- 2257 search code
- Annotation settings
- Gallery data
- TGP pages and their templates
- PERL directives cannot be converted; Perl code is not supported in TGPX templates
- GALLERIES directives that use the WHERE or REWHERE options cannot be converted
- RANDOM directives cannot be converted
- The DATEFORMAT and TIMEFORMAT settings cannot be converted; TGPX uses different format strings for it's date and times
- The FILL, FILLORDER, and FILLREORDER options cannot be converted
- The SWITCH sub-directive cannot be converted
- Script page templates (gallery submission form, partner request form, etc) cannot be converted
You will need shell access (through telnet or SSH) to your server to run the conversion script from the command line
The conversion script can be run from the command line of your server, and this is the recommended method if you have a large number of galleries to convert (20,000+). The conversion process is the same as listed below, however instead of accessing the conversion script through your browser you will run it from the command line of your server using the PHP CLI executable. The command you will use will be something like this:
/usr/local/bin/php ags-convert.php /full/path/to/ags
Where /usr/local/bin/php is the full path to the PHP CLI executable on your server and /full/path/to/ags is the full path to the AutoGallery SQL installation on your server.
Follow the steps below to convert your AutoGallery SQL data:
The conversion process will not affect your AutoGallery SQL installation. The AutoGallery SQL data will be left unchanged and you will be able to continue using AutoGallery SQL as normal after the conversion has been completed.
Before you start the conversion you should process all of the waiting partner account requests in AutoGallery SQL. Partner account requests will not be copied over to TGPX, but if you process them first in AutoGallery SQL it won't matter since you will have either created the necessary partner accounts or deleted the requests you don't want.
- Install a clean copy of TGPX on your server using the standard installation instructions. Do not add any
galleries, categories, or setup any pages before you convert your AutoGallery SQL data. Anything that you configure in TGPX will be deleted during
the conversion process. You will need to setup the TGPX settings through the General Settings interface, however.
- When configuring the TGPX settings, make sure you use a different Thumbnail URL setting than what your AutoGallery SQL installation is currently
configured for. The TGPX installation should not point to the same Thumbnail URL as your AutoGallery SQL installation.
- Once TGPX is installed and has had it's initial settings configured through the General Settings interface, upload the ags-convert.php file
from the utilities directory of the TGPX distribution to the admin directory of your TGPX installation on your server.
- You will need to temporarily change the permissions on the TGPX annotations and fonts directories to 777 so the annotation and font files from AutoGallery SQL can be
- Point your web browser to the ags-convert.php script that you uploaded to the admin directory of your TGPX installation. This will load a
page where you will need to enter the full directory path to the location of the AutoGallery SQL installation on your server. This should point to
the directory where the ags.pl and common.pl files are located.
- Once you have filled in the directory path to your AutoGallery SQL installation, you can press the Convert Data button. You will be asked to confirm
that you do want to convert this data.
- The conversion script will run a few tests to make sure you have entered a valid directory path to your AutoGallery SQL installation and that you have
the correct version of AutoGallery SQL installed. If any errors are encountered, it will display them and terminate the conversion process.
- If all of the pre-conversion tests pass, the script will begin converting your AutoGallery SQL data. The conversion process can take anywhere from a few
seconds to several minutes depending on the size of your gallery database. During the conversion process, the script will output some text to let you know what
it is doing. Don't be alarmed if you don't see any text, as some web servers will wait for the script to complete before outputting the information it is generating.
You can also check the convert.log file which will be located in the data directory of your TGPX installation.
- When the conversion process is complete you will see a message that says "Data conversion complete!" (check the convert.log file in the data directory of your
TGPX installation if you don't get output in your browser). You can login to your TGPX control panel to check
that all of the data has been properly imported.
- Run the TGP Pages > Recompile TGP Templates function to force the software to recompile all of the imported TGP page templates.
- Change the permissions on the annotations and fonts directories back to their original setting (generally 755)