Using Templates With AutoPost Pro

  Templates Overview

The template feature of AutoPost Pro makes the script extremely easy to integrate into your site. These files are very easy to edit, but you need to follow a few guidelines. You should be able to edit all of the .htmlt files in any html editor and be ok. All of the .etmpl files need to be edited in an ASCII text editor such as Notepad in Windows or Pico in Unix.

  The Template in admin.cgi

In admin.cgi when you choose to edit the HTML for one of your main pages, you will be presented with a page that has text boxes for the header, template, and footer. In this file we will discuss the template, header, and footer portions of that page. This template works the same way as all the others; the only difference is that you will be entering the HTML you create into a web-based form instead of editing a template file.

When you edit the template, you will only enter the HTML for a single post. The script will then use that HTML for each of the postings on the page. If you find yourself inserting #%PURL%#, #%PDES%#, or any of those values in #%%# more than once in the template, then you are most likely doing something wrong.

A different template can be used for each of your pages, so don't feel like you have to stick with the same look throughout your main page and categories.

  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: #%TO%#
From: #%FROM%#
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. Of the .htmlt files, there are only certain ones you should edit. Never, ever, edit any .htmlt file that begins with _admin. Those are used for the administrative script, and only you the administrator will see them.

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.

  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. They follow a certain format which needs to be maintained in order for the e-mails to be sent. That order is:

To: user@domain.com
From: your-email@domain.com
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.

  After Editing The Templates

After you have edited the templates to your liking, simply upload them in ASCII mode to the templates directory you created. If your FTP client asks you if you want to replace the current version, select yes. You can verify that the new versions have been uploaded properly by pointing your browser to post.cgi to see if your HTML appears.

  Descriptions of Each Template

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

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

    Header HTML and Footer HTML Options

    These values are only recognized in the header or footer HTML

    #%LUPDT%# - The last updated time
    #%TPSTS%# - Total number of posts on this page

    Template HTML Options

    These values are only recognized in the template HTML.

    #%ID%# - The ID assigned to this post
    #%PDES%# - The pic description
    #%URL%# - The URL to the pic page
    #%CAT%# - The category of the pic
    #%DATE%# - Date pic was posted
    #%TIME%# - Time pic was posted
    #%COLOR%# - Font color for this post*
    #%SIZE%# - Font size for this post*
    #%ICONS%# - Icons for this post*
    #%[B]%# - Opening bold tag*
    #%[/B]%# - Closing bold tag*

    *These items are used to distinguish normal and partner posts.


  • Rejection E-mails in admin.cgi

    These are the e-mails sent to rejected posts.

    #%PID%# - The post's ID number
    #%TO%# - The e-mail address for the To: field
    #%PURL%# - The pic URL
    #%RURL%# - The reciprocal link for the pic
    #%CAT%# - The category for the pic
    #%SDATE%# - The submission date
    #%STIME%# - The submission time
    #%BURL%# - The banner URL
    #%SURL%# - The site URL
    #%SDES%# - The site description
    #%PDES%# - The pic description


  • _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

    #%CATS%# - The category selection field


  • _post_queued.htmlt

    This is the page webmasters will see after posting a pic

    #%PID%# - The ID assigned to this post
    #%MAIL%# - The submitted e-mail address
    #%PURL%# - The submitted pic URL
    #%PDES%# - The submitted pic description
    #%BURL%# - The submitted banner URL
    #%SURL%# - The submitted site URL
    #%SDES%# - The submitted site description
    #%CAT%# - The submitted pic category
    #%TYPE%# - The submitted post type
    #%RURL%# - The submitted reciprocal link
    #%WILL%# - Produces 'will' or 'will not' if e-mail confirmation was requested


  • _partner_edit.htmlt

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

    #%PID%# - The partner's username
    #%PASS%# - The partner's password
    #%NAME%# - The partner's name
    #%MAIL%# - The partner's e-mail address
    #%SURL%# - 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.

    #%PID%# - The partner's username
    #%PASS%# - The partner's password
    #%NAME%# - The partner's name
    #%MAIL%# - The partner's e-mail address
    #%SURL%# - 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.

    #%CATS%# - 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.

    #%PID%# - The ID assigned to this post
    #%MAIL%# - The submitted e-mail address
    #%PURL%# - The submitted pic URL
    #%PDES%# - The submitted pic description
    #%BURL%# - The submitted banner URL
    #%SURL%# - The submitted site URL
    #%SDES%# - The submitted site description
    #%CAT%# - The submitted pic category
    #%TYPE%# - The submitted post type


  • _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.

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


  • _pic_page.htmlt

    This is the page that will be used to display the pics.

    #%SURL%# - The site URL for this post
    #%PURL%# - The pic URL for this post
    #%SDES%# - The site description for this post
    #%PDES%# - The pic description for this post
    #%PID%# - The post ID
    #%BURL%# - The banner URL for this post
    #%CAT%# - The category for this post
    #%BAN1%# - Random banner #1 selected from rotation
    #%BAN2%# - Random banner #2 selected from rotation


  • _error_data.htmlt

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

    #%SERR%# - A short error message
    #%LERR%# - A long descriptive error message


  • _error_lwp.htmlt

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

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


  • _email_addmod.etmpl

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

    #%TO%# - E-mail address for the To: field
    #%FROM%# - E-mail address for the From: field
    #%NAME%# - The name of the moderator
    #%USER%# - The username assigned to the moderator
    #%PASS%# - The password assigned to the moderator
    #%CGI%# - The CGI URL

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


  • _email_addprt.etmpl

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

    #%TO%# - E-mail address for the To: field
    #%FROM%# - E-mail address for the From: field
    #%NAME%# - The name of the moderator
    #%USER%# - The username assigned to the moderator
    #%PASS%# - The password assigned to the moderator
    #%CGI%# - 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.

    #%PID%# - The ID assigned to this post
    #%TO%# - The TO e-mail address
    #%PURL%# - The submitted pic URL
    #%PDES%# - The submitted pic description
    #%BURL%# - The submitted banner URL
    #%SURL%# - The submitted site URL
    #%SDES%# - The submitted site description
    #%RURL%# - The submitted recip URL
    #%CAT%# - The submitted pic category

    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

    #%TO%# - E-mail address for the To: field
    #%FROM%# - E-mail address for the From: field
    #%USER%# - The username assigned to the moderator
    #%PASS%# - The password assigned to the moderator
    #%CGI%# - The CGI URL

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