Using Templates With AutoGallery Pro

Quick Overview

The template feature of AutoGallery Pro makes the script extremely easy to integrate into your site. These templates are very easy to edit, but you need to follow a few guidelines. AutoGallery Pro allows you to edit the template files through a web-based editor in the administrative script, but you can also edit them in your normal HTML editor. You should use whichever you feel more comfortable with.

Rejection E-mails In admin.cgi

These are used as templates for the e-mails that are sent when a post is rejected. You can add any number of rejection e-mail templates as you like, and select which one should be sent for each post. They follow a certain format which needs to be maintained in order for the e-mails to be sent. That order is:

To: #%EMAIL%#
From: #%ADMIN_EMAIL%#
Subject: The subject

The body of the message
Note that there must be a blank line between the Subject line and the body of the message. Failure to leave that blank line will result in e-mails not being sent.

The .htmlt Files

These files are used to generate the HTML that the scripts output. In each of the files you will find standard HTML and pieces of text surrounded by #%%#. Anything surrounded by #%%# should not be edited. These are items that will be inserted by the script. You can move it around all you want, but do not change the value inside the #%%#.

Basically you can use any HTML you want. You should first use the script with the default templates so you can get a feel of what each #%%# item is replaced with. Once you have a feel for how they are working, you can go in and put your HTML in.

Be sure to watch out for hidden form fields in these templates. In almost all cases, those hidden fields are required in order for the software to function correctly, so be sure to leave all of them in place.

The .etmpl Files

These files are used as templates for the e-mails that are sent when a member signs up, or when a member needs reminded of their password. All of the .etmpl files will be located in the templates directory of your installation. You can download them in ASCII mode when you want to make changes to them. They follow a certain format which needs to be maintained in order for the e-mails to be sent. That order is:
To: #%EMAIL%#
From: #%ADMIN_EMAIL%#
Subject: The subject

The body of the message
Note that there must be a blank line between the Subject line and the body of the message. Failure to leave that blank line will result in e-mails not being sent.

The same format is used in the .etmpl files as is used in the .htmlt files. All items that the script will insert are surrounded by #%%#. Again, do not edit these. You can move them around all you want within the e-mail. Make sure you edit these files in an ASCII text editor such as Notepad if you are not using the built in template file editor.

After Editing The Templates

If you are editing the templates through the web based interface, you do not need to do anything else after you have made the changes you want. However, if you are editing in your HTML editor, you will need to upload the template files to the server in ASCII mode when you have completed editing them.

Descriptions of Each Template

  • "Edit HTML For [page]" template in admin.cgi

    This is the HTML that will be used for the selected page.

    Main HTML Values

    These values are only recognized in the header or footer HTML

    #%CGI_URL%# - The full URL to the directory where the cgi files are located
    #%LAST_UPDATE%# - The date and time the pages were last rebuilt
    #%TOTAL_PICS%# - The total number of pictures linked to from this page
    #%TOTAL_GALLERIES%# - The total number of galleries linked to from this page
    #%CURRENT_CAT%# - Displays the page's category (if this page is an archive page)

    To display your galleries you will use template values with numbers in them to denote the gallery that should be placed in that location. For the archive pages and if you are not using a categorized main page you will use the following template values:

    #%GALLERY_1%#
    #%GALLERY_2%#
    #%GALLERY_3%#
    ...

    If you want your main page categorized, you will need to use the following syntax. Note that the category name must match exactly what you have entered in setup.cgi for your category names:

    #%Hardcore_1%#
    #%Hardcore_2%#
    #%Hardcore_3%#
    ....

    #%Softcore_1%#
    #%Softcore_2%#
    #%Softcore_3%#
    ...

    Template HTML Options

    These values are only recognized in the template HTML.

    See the HTML.html documentation file.

  • _post_disabled.htmlt

    This is the page that will be shown when post.cgi is disabled.

    This page has no script variables.


  • _post_main.htmlt

    This is the page webmasters will see when posting galleries

    #%CAT_OPTIONS%# - The category selection field


  • _post_queued.htmlt

    If not in auto-approve mode and not requiring confirmation through e-mail, this is the page webmasters will see after submitting a gallery.

    #%POST_ID%# - The ID assigned to this post
    #%EMAIL%# - The submitted e-mail address
    #%GALLERY_URL%# - The submitted gallery URL
    #%DESCRIPTION%# - The submitted gallery description
    #%NUM_PICS%# - The submitted number of pics
    #%CATEGORY%# - The submitted gallery category
    #%PERMANENT%# - Yes if the gallery is permanent, no otherwise
    #%RECIP_URL%# - The submitted reciprocal URL
    #%CONFIRM%# - Yes if a confirm e-mail will be sent, no otherwise


  • _post_approved.htmlt

    When using the auto-approve feature but not the e-mail confirm feature, this is the page webmasters will see after submission. This page will also be displayed if you are using the auto-approve feature and the e-mail confirm feature. In that case it will appear when the user clicks on the link to confirm their submission.

    #%POST_ID%# - The ID assigned to this post
    #%EMAIL%# - The submitted e-mail address
    #%GALLERY_URL%# - The submitted gallery URL
    #%DESCRIPTION%# - The submitted gallery description
    #%NUM_PICS%# - The submitted number of pics
    #%CATEGORY%# - The submitted gallery category
    #%PERMANENT%# - Yes if the gallery is permanent, no otherwise
    #%RECIP_URL%# - The submitted reciprocal URL


  • _post_confirm.htmlt

    When using the e-mail confirm feature, this is the page webmasters will see after submission.

    #%POST_ID%# - The ID assigned to this post
    #%EMAIL%# - The submitted e-mail address
    #%GALLERY_URL%# - The submitted gallery URL
    #%DESCRIPTION%# - The submitted gallery description
    #%NUM_PICS%# - The submitted number of pics
    #%CATEGORY%# - The submitted gallery category
    #%PERMANENT%# - Yes if the gallery is permanent, no otherwise
    #%RECIP_URL%# - The submitted reciprocal URL
    #%CONFIRM%# - Yes if a confirm e-mail will be sent, no otherwise


  • _post_confirmed.htmlt

    When using the e-mail confirm feature but not the auto-approve feature, this is the page webmasters will see after submission.

    #%POST_ID%# - The ID assigned to this post
    #%EMAIL%# - The submitted e-mail address
    #%GALLERY_URL%# - The submitted gallery URL
    #%DESCRIPTION%# - The submitted gallery description
    #%NUM_PICS%# - The submitted number of pics
    #%CATEGORY%# - The submitted gallery category
    #%PERMANENT%# - Yes if the gallery is permanent, no otherwise
    #%RECIP_URL%# - The submitted reciprocal URL
    #%CONFIRM%# - Yes if a confirm e-mail will be sent, no otherwise


  • _partner_edit.htmlt

    This is the page partners will see when editing their details.

    #%PARTNER_ID%# - The partner's username
    #%PASSWORD%# - The partner's password
    #%CONTACT%# - The partner's name
    #%EMAIL%# - The partner's e-mail address
    #%SITE_URL%# - The partner's site URL

    Do not edit any of the hidden fields on this page! Doing so can cause the script to stop functioning properly.


  • _partner_edited.htmlt

    This is the page partners see confirming their details have been updated.

    #%PARTNER_ID%# - The partner's username
    #%PASSWORD%# - The partner's password
    #%CONTACT%# - The partner's name
    #%EMAIL%# - The partner's e-mail address
    #%SITE_URL%# - The partner's site URL


  • _partner_login.htmlt

    This is the page partners will see to login and make changes.

    This page has no script variables.


  • _partner_main.htmlt

    This is the page partners will see to post their galleries.

    #%CAT_OPTIONS%# - The category selection field

    Do not edit any of the hidden fields on this page! Doing so can cause the script to stop functioning properly.


  • _partner_posted.htmlt

    This is the page partners will see confirming their post has been added.

    #%POST_ID%# - The ID assigned to this post
    #%GALLERY_URL%# - The submitted gallery URL
    #%DESCRIPTION%# - The submitted gallery description
    #%NUM_PICS%# - The submitted number of pics
    #%CATEGORY%# - The submitted gallery category
    #%PERMANENT%# - Yes if the gallery is permanent, no otherwise


  • _partner_remind.htmlt

    This is the page partners will see if they need their password sent.

    This page has no script variables.


  • _partner_reminded.htmlt

    This is the page partners will see once their password has been sent.

    #%EMAIL%# - The e-mail address where login info was sent


  • _report_main.htmlt

    This is the page surfers will see when reporting dead/cheating sites

    #%POST_ID%# - The post ID that is being reported
    #%DATABASE%# - The database that post is in

    Do not edit any of the hidden fields on this page! Doing so can cause the script to stop functioning properly.


  • _report_sent.htmlt

    This is the page surfers will see when their report has been recorded

    #%CHEAT_ID%# - The ID assigned to this report
    #%DESCRIPTION%# - The description of this report
    #%TGP_URL%# - The URL back to the main TGP page


  • _error_data.htmlt

    This is the page surfers/webmasters will see if there is a data error.

    #%ERROR%# - A description of the error


  • _error_http.htmlt

    This is the page webmasters will see if there is an error connecting to their server.

    #%URL%# - The URL trying to be accessed
    #%ERROR%# - An error message describing the problem


  • _email_moderator.etmpl

    The e-mail that is optionally sent to a moderator when they are added

    #%EMAIL%# - The moderator's e-mail address
    #%ADMIN_EMAIL%# - The TGP administrator's e-mail address
    #%NAME%# - The name of the moderator
    #%USERNAME%# - The username assigned to the moderator
    #%PASSWORD%# - The password assigned to the moderator
    #%CGI_URL%# - The CGI URL

    Remember to leave a blank line between the subject line and the message body!


  • _email_partner.etmpl

    The e-mail that is optionally sent to a partner when they are added

    #%EMAIL%# - The partner's e-mail address
    #%ADMIN_EMAIL%# - The TGP administrator's e-mail address
    #%CONTACT%# - The name of the moderator
    #%PARTNER_ID%# - The username assigned to the partner
    #%PASSWORD%# - The password assigned to the partner
    #%CGI_URL%# - The CGI URL

    Remember to leave a blank line between the subject line and the message body!


  • _email_approved.etmpl

    The e-mail sent when a post is approved.

    #%POST_ID%# - The post's ID number
    #%EMAIL%# - The e-mail address of the submitter
    #%ADMIN_EMAIL%# - The TGP administrator's e-mail address
    #%GALLERY_URL%# - The gallery URL
    #%DESCRIPTION%# - The gallery description
    #%NUM_PICS%# - The # of pics in the gallery
    #%RECIP_URL%# - The reciprocal link for the gallery
    #%CATEGORY%# - The category for the gallery
    #%SUBMIT_DATE%# - The submission date
    #%SUBMIT_TIME%# - The submission time

    Remember to leave a blank line between the subject line and the message body!


  • _email_remind.etmpl

    The e-mail that is sent when a partner requests login information

    #%EMAIL%# - The partner's e-mail address
    #%ADMIN_EMAIL%# - The TGP administrator's e-mail address
    #%PARTNER_ID%# - The username assigned to the moderator
    #%PASSWORD%# - The password assigned to the moderator
    #%CGI_URL%# - The CGI URL

    Remember to leave a blank line between the subject line and the message body!


  • _email_confirm.etmpl

    The e-mail that is sent when using the e-mail confirm feature

    #%POST_ID%# - The post's ID number
    #%EMAIL%# - The e-mail address of the submitter
    #%ADMIN_EMAIL%# - The TGP administrator's e-mail address
    #%GALLERY_URL%# - The gallery URL
    #%DESCRIPTION%# - The gallery description
    #%NUM_PICS%# - The # of pics in the gallery
    #%RECIP_URL%# - The reciprocal link for the gallery
    #%CATEGORY%# - The category for the gallery
    #%SUBMIT_DATE%# - The submission date
    #%SUBMIT_TIME%# - The submission time
    #%CONFIRM_URL%# - The URL they must visit to confirm their submission

    Remember to leave a blank line between the subject line and the message body!


  • Rejection E-mails in admin.cgi

    These are the e-mails sent to rejected posts.

    #%POST_ID%# - The post's ID number
    #%EMAIL%# - The e-mail address of the submitter
    #%ADMIN_EMAIL%# - The TGP administrator's e-mail address
    #%GALLERY_URL%# - The gallery URL
    #%DESCRIPTION%# - The gallery description
    #%NUM_PICS%# - The # of pics in the gallery
    #%RECIP_URL%# - The reciprocal link for the gallery
    #%CATEGORY%# - The category for the gallery
    #%SUBMIT_DATE%# - The submission date
    #%SUBMIT_TIME%# - The submission time