When a gallery is submitted or scanned TGPX will check the to see if it contains information regarding the US 2257 legislation for record keeping. To search for this code, you will need to tell TGPX what it should look for on the gallery pages. The 2257 Code function allows you to do just that, and this document covers this topic.
2257 Code Search Type
When you add a 2257 code 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 2257 code add/edit form, the item(s) you enter will be treated as regular expressions and used to match against the HTML code of the gallery page.
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 HTML code. For example, if you enter the code "18 USC 2257" as a 2257 code and someone submits a gallery with the HTML code "<a href="2257.html">18 USC 2257 Records</a>", this will match the "18 USC 2257" 2257 code since it appears in the HTML code. Note that the search is case-insensitive and will match not only exact HTML code, but also portions of code.
Viewing/Searching 2257 Codes
To view or search your currently configured 2257 codes, access the Settings > Manage 2257 Code function from the control panel menu. This will display a page where you will be able to see the currently configured 2257 codes and search them if you wish.
In the table that displays the 2257 codes items, you will find a couple of functions that you can run on a single 2257 code. Each of those functions are described below.
|Click this icon to edit the 2257 code. A window will appear where you will be able to edit all of it's settings.|
|Click this icon to delete this 2257 code.|
Adding a 2257 Code
To add a new 2257 code, access the Settings > Manage 2257 Code function from the control panel menu. This will display your currently configured 2257 codes. Near the top of the page in the header bar that reads "2257 Code" click on the icon. This will display a popup window where you will be able to enter the data for the new 2257 code that you want to add. Each of the form fields are described below.
|Identifier||A short identifier string|
|Regular expression||Check this box if the 2257 code is a regular expression|
|Link Code||The 2257 code to search for in the HTML of the submitted gallery|
Editing a 2257 Code
To edit a 2257 code 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 2257 code editing interface. This interface is nearly identical to the 2257 code 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 2257 Code button to save your changes.
Deleting a 2257 Code
To delete a 2257 code 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 2257 codes at once by putting a check in the box next to the codes you want to delete, then pressing the Delete button at the bottom of the page.