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.
Submitter IP | This will search the IP address of the user submitting the gallery |
E-mail Address | This will search the e-mail address submitted for a gallery |
Domain/URL | This will search the gallery URL submitted for a gallery |
Domain IP | This will search the IP address of the gallery URL submitted for a gallery |
DNS Server | This will search the DNS servers assigned for a gallery |
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.
Click this icon to edit the whitelist item. A window will appear where you will be able to edit all of it's settings. | |
Click this icon to delete this whitelist item. |
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.
Value(s) | The value(s) you want to add to the whitelist. You can enter one item per line to add multiple items at once. |
Regular expression | Check this box if the value(s) is a regular expression |
Type | Select the type of whitelist item you are adding (described above) |
Reason | Enter a reason why you are whitelisting this item, if you wish. |
Allow URL redirection If this is checked the gallery will be allowed to redirect to a different URL No reciprocal link required If this is checked the gallery will not be required to have a reciprocal link Auto-approve galleries If this is checked the gallery will be automatically approved No confirmation e-mail required If this is checked the gallery submitter will not be required to confirm their submission by e-mail Allow blacklisted items If this is checked the gallery will be allowed to contain blacklisted items |
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
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.