Submit Code

Introduction

AutoGallery Pro includes a submit code feature which, if activated, will require submitters to copy a series of numbers from a JPEG image into a text input field. The main purpose of this feature is to prevent auto-submitters from submitting to your TGP. The submitter will actually have to visit and look at the submission page in order to correctly enter the submit code. Generally you will get higher quality galleries, with less chances of cheaters, from submitters who manually submit their galleries.

Enabling the Submit Code Feature

To enable the submit code feature, login to the control panel and click on the Edit Options link in the Setup section of the menu. You will be taken to a page where you can configure the options for your TGP. In the Other Options section of that page you will find two checkboxes:

Require general submitters to enter a submit code for gallery submission?
Require password submitters to enter a submit code for gallery submission?

Check one or the other, or both, depending on who you want to be required to enter a submit code. Once you have it set how you want it, press the Save Options button at the top or bottom of the page.

Now when you visit the submit.cgi script to submit a gallery you will see a new field for the submit code.


A. This is the submit code generated by AutoGallery Pro
B. This is the text input field where the submitter will need to copy the submit code.

The submit code itself (A) has a series of lines on the image and will rotate through different fonts (if GD has been compiled with FreeType support). This makes it much more difficult for auto-submitter programs to read the numbers from the image.

Using Your Own Fonts

If the GD library and perl module have been compiled with FreeType support on your server, you can select what fonts to use for the numbers on your submit code image. If FreeType support is not available, a default GD font will always be used.

You can add as many fonts for the submit code as you like, and it is recommended that you either add or change fonts every month or two. This keeps the auto-submit programs from adapting to your site and being able to read the submit code off the image.

AutoGallery Pro uses regular True-Type Fonts to display the submit code on the image. You can find thousands of true-type fonts on the internet at sites such as fontfile.com. Once you have located some fonts you want to use, you will need to upload them to your server. They should be uploaded in binary mode to the data/fonts directory of your AutoGallery Pro installation. Make sure you only upload .ttf files to that directory.

Some fonts do not contain numbers, or cannot be correctly rendered by FreeType. For these reasons, you should always test new fonts. Once you have uploaded a new font, you can test it with the code.cgi script. Simply enter the complete font filename (case sensitive) as the query string to the code.cgi script. For example, if you uploaded a new font named My_Font.TTF, you would call the code.cgi script as:

http://www.yoursite.com/cgi-bin/tgp/code.cgi?My_Font.TTF

When you point your browser to this URL, AutoGallery Pro will generate an image with the numbers 1234567890. You should check to make sure that all of the numbers are rendered correctly and readable. If you see a series of squares on the image, it means that the font cannot be correctly rendered and it should be removed from your server.