The script page templates are the templates that control the appearance of the end-user interfaces such as the gallery submission form and partner account request and maintenance pages. This document will give you an overview of the variables available in each of the script page templates.
Editing Script Page Templates
To edit the script page templates access the Templates > Script Pages function from the control panel menu. This will display a page where you can select which template you want to edit. Once you have selected the template you want to edit, press the Load Template button. You will be returned to the same page, but there will now be a large text box where you can make changes to the template. When you are done making changes, press the Save Template button to save your changes.
Templates and Their Variables
This section will describe all of the available templates and the variables you can use within each template.
-
crop.css
This is the style sheet used for the web-based thumbnail cropping interface
-
No template variables
default-tgp.tpl
This template will be used as the template for every new TGP page that you add through the Manage Pages interface. If you would like to make some changes (for example, adding your traffic trading script code) so that all of your newly added TGP pages automatically have this code, edit this template file. This template uses the functions and variables as described in the TGP Page Templates section of this manual.
error-fatal.tpl
This template will be displayed when a fatal, unrecoverable error has occurred.
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$error} - The error message
{$trace} - A stack trace showing what functions were called
{$file} - The file that the error occurred in
{$line} - The line number where the error occurred
error-nice.tpl
This template will be displayed when the user has done some action to trigger an error condition
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$error} - The error message
global-header.tpl
This is the global header that will be included at the top of all of the other templates.
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
global-footer.tpl
This is the global footer that will be included at the bottom of all of the other templates.
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
partner-edit.tpl
This template is shown when a partner chooses to edit their account
-
{$errors} - Any errors that occurred with the account editing (array value)
{$updated} - A flag to indicate that the account has been successfully updated
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$partner} - The partner account data; see the Common Variables section for details
{$user_fields} - The user defined fields for this account (array value)
partner-galleries.tpl
This template is shown when a partner chooses to view their current galleries
-
{$disabled} - A flag to indicate that a gallery has been disabled
{$disabled_id} - The ID number of the gallery that has been disabled
{$galleries} - The partner's galleries (array value)
{$pagination} - The pagination values; see the Common Variables section for details
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$partner} - The partner account data; see the Common Variables section for details
{$user_fields} - The user defined fields for this account (array value)
{$errors} - If any errors were encountered when editing the account, this value will contain them
partner-login.tpl
This template is shown when a partner wants to login to their account
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$errors} - Errors encountered during the login process (array value)
{$login.login_username} - The username entered on the login form
{$logged_out} - A flag to indicate that the user has logged out of their account
partner-overview.tpl
This template value is shown when a partner logs into their account or chooses to view their account overview
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$partner} - The partner account data; see the Common Variables section for details
{$stats.galleries} - The total number of galleries this partner has in the database
{$stats.clicks} - The total number of clicks this partner's galleries have received
{$stats.unconfirmed} - The number of unconfirmed galleries this partner has in the database
{$stats.pending} - The number of pending galleries this partner has in the database
{$stats.approved} - The number of approved galleries this partner has in the database
{$stats.used} - The number of used galleries this partner has in the database
{$stats.holding} - The number of holding galleries this partner has in the database
{$stats.disabled} - The number of disabled galleries this partner has in the database
partner-request-complete.tpl
This template will be displayed after a user submits a partner account request
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$request.username} - The username submitted with the request
{$request.name} - The name/nickname submitted with the request
{$request.email} - The e-mail address submitted with the request
{$user_fields} - The user defined fields submitted with the request (array value)
partner-request.tpl
This template will be displayed when a user wants to submit a partner account request
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$errors} - If any errors were encountered, this value will contain them (array value)
{$request.username} - The username submitted with the request
{$request.name} - The name/nickname submitted with the request
{$request.email} - The e-mail address submitted with the request
{$user_fields} - The user defined partner account fields (array value)
partner-reset-confirm.tpl
This template will display when a partner requests that their password be reset
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$partner} - The partner account data; see the Common Variables section for details
partner-reset-confirmed.tpl
This template will be shown when a partner has confirmed their password reset by e-mail and clicked on the link contained in that e-mail message
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$partner} - The partner account data; see the Common Variables section for details
partner-reset.tpl
This template will be shown when a partner wants to reset their password
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$errors} - If any errors were encountered, this value will contain them (array value)
report-complete.tpl
This template will be shown after a surfer submits a cheater/broken gallery link report
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$report.referrer} - The page that the surfer came from before submitting the report
{$report.report_id} - The ID number assigned to their report
report-main.tpl
This template will be shown when a surfer wants to submit a cheater/broken gallery link report
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$errors} - If any errors were encountered, this value will contain them (array value)
{$gallery} - Data for the gallery being reported; see the Common Variables section for details
{$report.reason} - The value the surfer enters for the reason this gallery is being reported
{$referrer} - The URL the surfer came from to get to the cheat report page
search-results.tpl
This template will be shown when a surfer performs a search
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$search_term} - The search term that the user entered
{$search_too_short} - A flag to indicate if the search term entered is too short
{$results} - The search results (array value, each item is a {$gallery} Common Variable)
{$pagination} - Values for generating pagination of search results (array value)
{$pagination.next} - A flag to indicate if there is a next page of results
{$pagination.next_page} - The numerical value of the next page of results
{$pagination.prev} - A flag to indicate if there is a previous page of results
{$pagination.prev_page} - The numerical value of the previous page of results
{$pagination.start} - The starting position of the search results on the current page
{$pagination.end} - The ending position of the search results on the current page
{$pagination.total} - The total number of search results
style.css
This is the stylesheet that is used throughout the script page templates
-
No template variables
submit-closed.tpl
This is the template will be shown when gallery submissions are not being accepted
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
submit-complete.tpl
This template will display after a user has successfully submitted a gallery
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$confirmed} - A flag to indicate if this is being displayed as the result of a confirmation by e-mail
{$gallery} - The gallery data submitted; see the Common Variables section for details
{$user_fields} - The user defined gallery fields submitted
submit-confirm.tpl
This template will be shown if you are requiring that users enter their confirmation code on a form instead of clicking a link in the confirmation e-mail message
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$errors} - If any errors were encountered, this value will contain them (array value)
{$request.id} - The confirmation ID that the user entered
submit-crop.tpl
This template will display the web-based thumbnail preview cropping interface
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$gallery] - The submitted gallery information
submit-full-global.tpl
This template will display when no further gallery submissions are being accepted for today
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
submit-main.tpl
This template displays the gallery submission form
-
{$config} - The TGPX configuration settings; see the Common Variables section for details
{$errors} - Any error messages that indicate a problem with the information submitted (array value)
{$gallery} - The gallery data that was submitted
{$categories} - The categories that the user can select from for their gallery (array value)
{$user_fields} - The user defined gallery database fields