Table of Contents
Introduction

The whitelist feature of TGPX allows you to create and manage a list of items that will allow special privileges for galleries submitted that match one or more of these items. For example, if you want to allow galleries from a certain domain to be able to redirect surfers you can add that domain to the whitelist and specify that redirection is allowed for that domain. This document will give an overview of the whitelist feature of TGPX.

Whitelist Types

There are several different whitelist types which allow you to configure your whitelist to accurately find and allow the items that you want to appear which otherwise would be rejected. Each of the whitelist types are described below. Whitelist Search Type

When you add a whitelist item you have the option of specifying if it is a regular expression. Regular expressions are more complex than standard searches that simply look for the item as-is, but they add a great amount of flexibility. In TGPX the Perl Compatible Regular Expressions format is used for regular expressions. If you are not familiar with regular expressions, please see the Pattern Syntax portion of the PHP manual for additional information. If you check the Regular Expression box on the whitelist add/edit form, the item(s) you enter will be treated as regular expressions and used to match against the values that are submitted by the user.

If the values you enter are not regular expressions, be sure to leave that box unchecked. This will cause a normal search to occur which will match the item you enter anywhere within the field that is being searched. For example, if you enter the word "@hotmail.com" as a whitelisted e-mail address and someone submits with an e-mail address of "johnny@hotmail.com", this will match the "@hotmail.com" whitelist word item since it appears in the e-mail address. Note that the search is case-insensitive and will match not only exact words, but also portions of words.

Viewing/Searching Whitelist Items

To view or search your currently configured whitelist items, access the Settings > Manage Whitelist function from the control panel menu. This will display a page where you will be able to see the currently configured whitelist items and search them if you wish.

In the table that displays the whitelist items, you will find a couple of functions that you can run on a single whitelist item. Each of those functions are described below. In addition to running these functions on single whitelist items, you can also run the delete function on multiple whitelist items at once. To run the delete function, put a check in the checkbox next to the whitelist items you want to delete, then press the Delete button at the bottom of the page.

Adding a Whitelist Item

To add a new whitelist item access the Settings > Manage Whitelist function from the control panel menu. This will display your currently configured whitelist items. Near the top of the page in the header bar that reads "Whitelist Items" click on the icon. This will display a popup window where you will be able to enter the data for the new whitelist item that you want to add. Each of the form fields are described below.
When adding multiple whitelist items at once you can use a special format in the Value(s) field to add both the item and reason at the same time. This special format still has one item per line, however after the item you want to whitelist enter a | character (pipe) followed by the reason. For example:

galleries.sponsor.com|These are galleries from a trusted sponsor
www.mysite.com|This is my own site

Once you have filled in all of the fields as you want them, press the Add Whitelist Item button. This will add the new item to the database, and it will be activated immediately.

Editing a Whitelist Item

To edit a whitelist item you will first need to locate it through the View/Search interface. When you locate the item you want to edit, click on the icon to bring up the whitelist item editing interface. This interface is nearly identical to the whitelist item addition interface, and has the same form fields with the same properties. You can make the changes that you want, and then press the Update Whitelist Item button to save your changes.

Deleting a Whitelist Item

To delete a whitelist item you will first need to locate it through the View/Search interface. When you locate the item you want to delete, click on the icon, which will ask you to confirm the deletion.

You can also delete several items at once by putting a check in the box next to the items you want to delete, then pressing the Delete button at the bottom of the page.