Using Templates With AutoRank

Quick Overview

The template feature of AutoRank 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. AutoRank 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.

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

  • autorank.html

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

    Header HTML and Footer HTML Options

    These values are only recognized in the header or footer HTML

    #%MEMBERS%# - The total number of sites in the database
    #%NEXT_RERANK%# - The time and date when the list will next be reranked
    #%LAST_RERANK%# - The time and date when the list was last reranked
    #%LAST_RESET%# - The time and date when the list was last reset
    #%NEXT_RESET%# - The time and date when the list will next be reset
    #%CGI_URL%# - The full URL to the directory where the cgi files are located


    Template HTML Options

    These values are only recognized in the template HTML.

    See the HTML.html documentation file.

  • _account_add.htmlt

    This is the page webmasters will see when adding their account

    #%CAT_OPTIONS%# - The category selection field

  • _account_added.htmlt

    This is the page webmasters will see after adding their account (not reviewing new accounts).

    #%EMAIL%# - The submitted e-mail address
    #%USERNAME%# - The submitted username
    #%PASSWORD%# - The submitted password
    #%SITE_URL%# - The submitted site URL
    #%DESCRIPTION%# - The submitted site description
    #%TITLE%# - The submitted site title
    #%BANNER_URL%# - The submitted banner URL
    #%HEIGHT%# - The banner height
    #%WIDTH%# - The banner width
    #%CATEGORY%# - The submitted user category
    #%TRACK_URL%# - The URL the member should send hits to

  • _error_data.htmlt

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

    #%ERROR%# - A description of the error

  • _email_added.etmpl

    The e-mail that is sent when a member account is added

    #%ADMIN_EMAIL%# - The administrator's e-mail address
    #%TRACK_URL%# - The URL the site should send hits to
    #%USERNAME%# - The username of the account
    #%EMAIL%# - The e-mail address of the account
    #%SITE_URL%# - The site URL for the account
    #%BANNER_URL%# - The banner URL for the account
    #%HEIGHT%# - The banner height for the account
    #%WIDTH%# - The banner width for the account
    #%TITLE%# - The site title for the account
    #%DESCRIPTION%# - The site description for the account
    #%PASSWORD%# - The password for the account

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