If you are currently running AutoGallery Pro on one of your sites and would like to import it's data into a TGPX installation, you can use the included agp-convert.php script to do just that. This document will outline the steps necessary to convert your AutoGallery Pro data.
To convert your AutoGallery Pro data you will need to be using version 3.0.0 or newer. If you are not using at least version 3.0.0, follow the instructions in the AutoGallery Pro software manual to upgrade your installation.
The conversion script will convert and import the following data from your AutoGallery Pro installation:
- Font files used for verification codes
- Thumbnail preview images
- Submitter e-mail log
- Blacklist settings
- Whitelist settings
- Reciprocal link settings
- Gallery data
- TGP pages and their templates
- 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 agp-convert.php /full/path/to/agp
Where /usr/local/bin/php is the full path to the PHP CLI executable on your server and /full/path/to/agp is the full path to the AutoGallery Pro installation on your server.
Follow the steps below to convert your AutoGallery Pro data:
The conversion process will not affect your AutoGallery Pro installation. The AutoGallery Pro data will be left unchanged and you will be able to continue using AutoGallery Pro 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 Pro. Partner account requests will not be copied over to TGPX, but if you process them first in AutoGallery Pro 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 Pro 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 Pro installation is currently
configured for. The TGPX installation should not point to the same Thumbnail URL as your AutoGallery Pro installation.
- Once TGPX is installed and has had it's initial settings configured through the General Settings interface, upload the agp-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 fonts directory to 777 so the font files from AutoGallery Pro can be
- Point your web browser to the agp-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 Pro installation on your server. This should point to
the directory where the agp.pl and common.pl files are located.
- Once you have filled in the directory path to your AutoGallery Pro 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 Pro installation and that you have
the correct version of AutoGallery Pro 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 Pro 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)