Using Templates With AutoRank PHP

Quick Overview

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

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:

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:

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

  • Ranking Pages

    Header & Footer

    #%CAT_SELECT%# - The options fields for the search category selection
    #%TOTAL_MEMBERS%# - The total number of members in your database
    #%LAST_RERANK%# - The date and time of the last rerank
    #%LAST_RESET%# - The date and time of the last reset
    #%NEXT_RERANK%# - The date and time of the next rerank
    #%NEXT_RESET%# - The date and time of the next reset
    #%PAGE_BUILT%# - The date and time the ranking page was built
    #%BASE_URL%# - The base URL of your software installation
    #%CURRENT_CATEGORY%# - The category of the current page

    Filler

    #%ROW_COLOR%# - The color to use for the current row
    #%BASE_URL%# - The base URL of your software installation
    #%OVERALL_RANK%# - The overall rank for the position being filled
    #%CATEGORY_RANK%# - The category rank for the position being filled

    Template

    See the HTML.html documentation file

  • E-mail Templates

    #%ADMIN_EMAIL%# - The administrator's e-mail
    #%USERNAME%# - The site's username
    #%SITE_URL%# - The direct URL to the site (does not track hits)
    #%BANNER_URL%# - The site's banner URL
    #%BANNER_HEIGHT%# - The site's banner height
    #%BANNER_WIDTH%# - The site's banner width
    #%SITE_TITLE%# - The site's title
    #%DESCRIPTION%# - The site's description
    #%CATEGORY%# - The site's category
    #%FIELD_1%# - User defined field 1 for the site
    #%FIELD_2%# - User defined field 2 for the site
    #%FIELD_3%# - User defined field 3 for the site
    #%OUT_URL%# - The outgoing URL for the site (tracks hits)

  • _account_add.htmlt

    This is the first page webmasters will see when adding their account

    #%CAT_OPTIONS%# - The options fields for the category selection
    #%FIELD_1_NAME%# - Name of user defined field 1
    #%FIELD_2_NAME%# - Name of user defined field 2
    #%FIELD_3_NAME%# - Name of user defined field 3


  • _account_added.htmlt

    Shown when account has been added (not reviewing new accounts)

    #%FIELD_1_NAME%# - Name of user defined field 1
    #%FIELD_2_NAME%# - Name of user defined field 2
    #%FIELD_3_NAME%# - Name of user defined field 3
    #%LOGIN_URL%# - The URL where the webmaster can login to their account
    #%TRACK_URL%# - The URL where the webmaster should send hits
    #%IMAGE_URL%# - The URL to use for displaying an image on their site
    #%USERNAME%# - The site's username
    #%PASSWORD%# - The site's password
    #%SITE_URL%# - The direct URL to the site
    #%BANNER_URL%# - The site's banner URL
    #%BANNER_HEIGHT%# - The site's banner height
    #%BANNER_WIDTH%# - The site's banner width
    #%SITE_TITLE%# - The site's title
    #%DESCRIPTION%# - The site's description
    #%CATEGORY%# - The site's category
    #%FIELD_1%# - User defined field 1 for the site
    #%FIELD_2%# - User defined field 2 for the site
    #%FIELD_3%# - User defined field 3 for the site


  • _account_confirm.htmlt

    This page is shown when an account needs to be confirmed before adding it

    #%FIELD_1_NAME%# - Name of user defined field 1
    #%FIELD_2_NAME%# - Name of user defined field 2
    #%FIELD_3_NAME%# - Name of user defined field 3
    #%LOGIN_URL%# - The URL where the webmaster can login to their account
    #%TRACK_URL%# - The URL where the webmaster should send hits
    #%IMAGE_URL%# - The URL to use for displaying an image on their site
    #%USERNAME%# - The site's username
    #%PASSWORD%# - The site's password
    #%RECIP_URL%# - The site's recip URL
    #%EMAIL%# - The site's e-mail address
    #%SITE_URL%# - The direct URL to the site
    #%BANNER_URL%# - The site's banner URL
    #%BANNER_HEIGHT%# - The site's banner height
    #%BANNER_WIDTH%# - The site's banner width
    #%SITE_TITLE%# - The site's title
    #%DESCRIPTION%# - The site's description
    #%CATEGORY%# - The site's category
    #%FIELD_1%# - User defined field 1 for the site
    #%FIELD_2%# - User defined field 2 for the site
    #%FIELD_3%# - User defined field 3 for the site


  • _account_doconfirm.htmlt

    This page is where webmasters will enter their confirmation ID

    There are no template values for this template

  • _account_edit.htmlt

    This page is shown when a member is editing their account

    #%CAT_OPTIONS%# - The options fields for the category selection
    #%FIELD_1_NAME%# - Name of user defined field 1
    #%FIELD_2_NAME%# - Name of user defined field 2
    #%FIELD_3_NAME%# - Name of user defined field 3
    #%USERNAME%# - The site's username
    #%PASSWORD%# - The site's password
    #%RECIP_URL%# - The site's recip URL
    #%EMAIL%# - The site's e-mail address
    #%SITE_URL%# - The direct URL to the site
    #%BANNER_URL%# - The site's banner URL
    #%BANNER_HEIGHT%# - The site's banner height
    #%BANNER_WIDTH%# - The site's banner width
    #%SITE_TITLE%# - The site's title
    #%DESCRIPTION%# - The site's description
    #%CATEGORY%# - The site's category
    #%FIELD_1%# - User defined field 1 for the site
    #%FIELD_2%# - User defined field 2 for the site
    #%FIELD_3%# - User defined field 3 for the site


  • _account_edited.htmlt

    This page is shown when an account has been successfully edited

    #%FIELD_1_NAME%# - Name of user defined field 1
    #%FIELD_2_NAME%# - Name of user defined field 2
    #%FIELD_3_NAME%# - Name of user defined field 3
    #%LOGIN_URL%# - The URL where the webmaster can login to their account
    #%TRACK_URL%# - The URL where the webmaster should send hits
    #%IMAGE_URL%# - The URL to use for displaying an image on their site
    #%USERNAME%# - The site's username
    #%PASSWORD%# - The site's password
    #%RECIP_URL%# - The site's recip URL
    #%EMAIL%# - The site's e-mail address
    #%SITE_URL%# - The direct URL to the site
    #%BANNER_URL%# - The site's banner URL
    #%BANNER_HEIGHT%# - The site's banner height
    #%BANNER_WIDTH%# - The site's banner width
    #%SITE_TITLE%# - The site's title
    #%DESCRIPTION%# - The site's description
    #%CATEGORY%# - The site's category
    #%FIELD_1%# - User defined field 1 for the site
    #%FIELD_2%# - User defined field 2 for the site
    #%FIELD_3%# - User defined field 3 for the site


  • _account_ereview.htmlt

    This page is shown to the webmaster when you are reviewing account edits

    #%FIELD_1_NAME%# - Name of user defined field 1
    #%FIELD_2_NAME%# - Name of user defined field 2
    #%FIELD_3_NAME%# - Name of user defined field 3
    #%LOGIN_URL%# - The URL where the webmaster can login to their account
    #%TRACK_URL%# - The URL where the webmaster should send hits
    #%IMAGE_URL%# - The URL to use for displaying an image on their site
    #%USERNAME%# - The site's username
    #%PASSWORD%# - The site's password
    #%RECIP_URL%# - The site's recip URL
    #%EMAIL%# - The site's e-mail address
    #%SITE_URL%# - The direct URL to the site
    #%BANNER_URL%# - The site's banner URL
    #%BANNER_HEIGHT%# - The site's banner height
    #%BANNER_WIDTH%# - The site's banner width
    #%SITE_TITLE%# - The site's title
    #%DESCRIPTION%# - The site's description
    #%CATEGORY%# - The site's category
    #%FIELD_1%# - User defined field 1 for the site
    #%FIELD_2%# - User defined field 2 for the site
    #%FIELD_3%# - User defined field 3 for the site


  • _account_farm.htmlt

    This page shows the proper link syntax for the webmaster to use

    #%TRACK_URL%# - The URL where the webmaster should send hits
    #%IMAGE_URL%# - The URL to use for displaying an image on their site

  • _account_login.htmlt

    This page shows the login screen for webmasters

    There are no template values for this template

  • _account_remind.htmlt

    This page shows the e-mail reminder screen

    There are no template values for this template

  • _account_reminded.htmlt

    This page shows confirmation that a reminder e-mail has been sent

    #%EMAIL%# - The e-mail address that was supplied

  • _account_review.htmlt

    This page is shown to the webmaster when you are reviewing new accounts

    #%FIELD_1_NAME%# - Name of user defined field 1
    #%FIELD_2_NAME%# - Name of user defined field 2
    #%FIELD_3_NAME%# - Name of user defined field 3


  • _account_statsb.htmlt

    This is the footer for the account stats page



  • _account_statse.htmlt

    This shows a message if an invalid date was entered



  • _account_statsm.htmlt

    This shows the detailed stats, if available



  • _account_statst.htmlt

    This is the header for the account stats page



  • _comments_footer.htmlt

    This is the footer for the page which displays the account's comments

    #%TOTAL%# - The number of comments for the site
    #%MAX_RATING%# - The maximum allowed rating
    #%START%# - The starting position of the current page
    #%END%# - The ending position of the current page
    #%NEXT_PAGE%# - A link to the next page of comments
    #%PREV_PAGE%# - A link to the previous page of comments

  • _comments_header.htmlt

    This is the header for the page which displays the account's comments

    #%TOTAL%# - The number of comments for the site
    #%MAX_RATING%# - The maximum allowed rating
    #%START%# - The starting position of the current page
    #%END%# - The ending position of the current page
    #%NEXT_PAGE%# - A link to the next page of comments
    #%PREV_PAGE%# - A link to the previous page of comments

  • _comments_template.htmlt

    This is the template for the page which displays the account's comments

    #%DATE%# - The date the comment was added
    #%TIME%# - The time the comment was added
    #%RATING%# - The rating the commenter gave
    #%COMMENT%# - The comment itself
    #%NAME%# - The commenter's name
    #%EMAIL%# - The commenter's e-mail

  • _compact_break.htmlt

    This file holds the HTML to use the the compact list's breaks

    There are no template values for this template

  • _compact_fill.htmlt

    This file holds the HTML to use the the compact list's filler

    #%BASE_URL%# - The base URL setting from setup.php
    #%OVERALL_RANK%# - The overall rank for the location being filled

  • _compact_main.htmlt

    This file holds the HTML to use the the compact list accounts

    #%USERNAME%# - The site's username
    #%OVERALL_RANK%# - The site's overall rank
    #%CATEGORY_RANK%# - The site's category rank
    #%CURRENT_IN%# - The site's current incoming hit count
    #%CURRENT_OUT%# - The site's current outgoing hit count
    #%TOTAL_IN%# - The site's total incoming hit count
    #%TOTAL_OUT%# - The site's total outgoing hit count
    #%PREV_IN%# - The site's previous incoming hit count
    #%PREV_OUT%# - The site's previous outgoing hit count
    #%PREV_SORT%# - The value that the site was previously sorted by
    #%PREV_ORANK%# - The site's previous overall rank
    #%PREV_CRANK%# - The site's previous category rank
    #%INACTIVE%# - The number of resets the account has been inactive for
    #%NUM_RATINGS%# - The total number of ratings the site has received
    #%SITE_URL%# - The direct URL to the site (does not track hits)
    #%BANNER_URL%# - The site's banner URL
    #%BANNER_HEIGHT%# - The site's banner height
    #%BANNER_WIDTH%# - The site's banner width
    #%SITE_TITLE%# - The site's title
    #%DESCRIPTION%# - The site's description
    #%CATEGORY%# - The site's category
    #%ICONS%# - Icons selected for the site
    #%FIELD_1%# - User defined field 1 for the site
    #%FIELD_2%# - User defined field 2 for the site
    #%FIELD_3%# - User defined field 3 for the site
    #%BANNER_HTML%# - The complete HTML for the site's banner
    #%OUT_URL%# - The outgoing URL for the site (tracks hits)
    #%NEW_ICON%# - The new icon for the site
    #%COMMENT_URL%# - The URL to view comments for the site
    #%RATE_URL%# - The URL to rate the site
    #%IN_PER_DAY%# - The average hits in per day for the site
    #%IN_PER_WEEK%# - The average hits in per week for the site
    #%IN_PER_MONTH%# - The average hits in per month for the site
    #%OUT_PER_DAY%# - The average hits out per day for the site
    #%OUT_PER_WEEK%# - The average hits out per week for the site
    #%OUT_PER_MONTH%# - The average hits out per month for the site
    #%HALF%# - The site's rating to the nearest half number
    #%PERCENT%# - The site's rating as a percentage
    #%RATING%# - The site's rating

  • _error_data.htmlt

    This page is used when errors are encountered

    #%ERROR%# - The error message to be displayed

  • _error_submit.htmlt

    This page is used when errors are encountered during account submission

    #%ERROR_LIST%# - A list of the errors that were found

  • _footer.htmlt

    This is the footer that is used by all of the accounts.php templates

    There are no template values for this template

  • _header.htmlt

    This is the header that is used by all of the accounts.php templates

    #%TITLE%# - The title to use for the page

  • _new_footer.htmlt

    This is the footer for the new sites list

    There are no template values for this template

  • _new_header.htmlt

    This is the header for the new sites list

    There are no template values for this template

  • _new_template.htmlt

    This is the template for the new sites list

    #%USERNAME%# - The site's username
    #%SITE_URL%# - The direct URL to the site (does not track hits)
    #%BANNER_URL%# - The site's banner URL
    #%BANNER_HEIGHT%# - The site's banner height
    #%BANNER_WIDTH%# - The site's banner width
    #%SITE_TITLE%# - The site's title
    #%DESCRIPTION%# - The site's description
    #%CATEGORY%# - The site's category
    #%FIELD_1%# - User defined field 1 for the site
    #%FIELD_2%# - User defined field 2 for the site
    #%FIELD_3%# - User defined field 3 for the site
    #%OUT_URL%# - The outgoing URL for the site (tracks hits)

  • _quick_footer.htmlt

    This is the footer for the quick list

    There are no template values for this template

  • _quick_header.htmlt

    This is the header for the quick list

    There are no template values for this template

  • _quick_template.htmlt

    This is the template for the quick list

    #%USERNAME%# - The site's username
    #%SITE_URL%# - The direct URL to the site (does not track hits)
    #%SITE_TITLE%# - The site's title
    #%OVERALL_RANK%# - The site's overall rank
    #%OUT_URL%# - The outgoing URL for the site (tracks hits)

  • _rate_done.htmlt

    This is shown after a site has been rated

    #%RATING%# - The rating given to the site
    #%COMMENT%# - The comment provided

  • _rate_main.htmlt

    This is shown when rating a site

    #%MAX_RATING%# - The maximum allowed rating
    #%USERNAME%# - The site's username
    #%SITE_URL%# - The direct URL to the site (does not track hits)
    #%BANNER_URL%# - The site's banner URL
    #%BANNER_HEIGHT%# - The site's banner height
    #%BANNER_WIDTH%# - The site's banner width
    #%SITE_TITLE%# - The site's title
    #%DESCRIPTION%# - The site's description
    #%CATEGORY%# - The site's category
    #%FIELD_1%# - User defined field 1 for the site
    #%FIELD_2%# - User defined field 2 for the site
    #%FIELD_3%# - User defined field 3 for the site
    #%OUT_URL%# - The outgoing URL for the site (tracks hits)

  • _search_footer.htmlt

    This is the footer for the search results page

    #%SEARCH_TIME%# - The number of seconds taken to do the search
    #%NUM_RESULTS%# - The number of results in the search set
    #%KEYWORD%# - The keyword that was searched for
    #%START%# - The starting position of the current page
    #%END%# - The ending position of the current page
    #%NEXT_PAGE%# - A link to the next page of search results
    #%PREV_PAGE%# - A link to the previous page of search results

  • _search_header.htmlt

    This is the header for the search results page

    #%SEARCH_TIME%# - The number of seconds taken to do the search
    #%NUM_RESULTS%# - The number of results in the search set
    #%KEYWORD%# - The keyword that was searched for
    #%START%# - The starting position of the current page
    #%END%# - The ending position of the current page
    #%NEXT_PAGE%# - A link to the next page of search results
    #%PREV_PAGE%# - A link to the previous page of search results

  • _search_template.htmlt

    This is the template for the search results page

    #%USERNAME%# - The site's username
    #%OVERALL_RANK%# - The site's overall rank
    #%CATEGORY_RANK%# - The site's category rank
    #%CURRENT_IN%# - The site's current incoming hit count
    #%CURRENT_OUT%# - The site's current outgoing hit count
    #%TOTAL_IN%# - The site's total incoming hit count
    #%TOTAL_OUT%# - The site's total outgoing hit count
    #%PREV_IN%# - The site's previous incoming hit count
    #%PREV_OUT%# - The site's previous outgoing hit count
    #%PREV_SORT%# - The value that the site was previously sorted by
    #%PREV_ORANK%# - The site's previous overall rank
    #%PREV_CRANK%# - The site's previous category rank
    #%INACTIVE%# - The number of resets the account has been inactive for
    #%NUM_RATINGS%# - The total number of ratings the site has received
    #%SITE_URL%# - The direct URL to the site (does not track hits)
    #%BANNER_URL%# - The site's banner URL
    #%BANNER_HEIGHT%# - The site's banner height
    #%BANNER_WIDTH%# - The site's banner width
    #%SITE_TITLE%# - The site's title
    #%DESCRIPTION%# - The site's description
    #%CATEGORY%# - The site's category
    #%ICONS%# - Icons selected for the site
    #%FIELD_1%# - User defined field 1 for the site
    #%FIELD_2%# - User defined field 2 for the site
    #%FIELD_3%# - User defined field 3 for the site
    #%BANNER_HTML%# - The complete HTML for the site's banner
    #%OUT_URL%# - The outgoing URL for the site (tracks hits)
    #%NEW_ICON%# - The new icon for the site
    #%COMMENT_URL%# - The URL to view comments for the site
    #%RATE_URL%# - The URL to rate the site
    #%IN_PER_DAY%# - The average hits in per day for the site
    #%IN_PER_WEEK%# - The average hits in per week for the site
    #%IN_PER_MONTH%# - The average hits in per month for the site
    #%OUT_PER_DAY%# - The average hits out per day for the site
    #%OUT_PER_WEEK%# - The average hits out per week for the site
    #%OUT_PER_MONTH%# - The average hits out per month for the site
    #%HALF%# - The site's rating to the nearest half number
    #%PERCENT%# - The site's rating as a percentage
    #%RATING%# - The site's rating