Script Page Templates

Introduction

AutoRank PHP's template system allows you to control the HTML that is displayed by your account creation and maintenance pages as well as the search engine and gateway pages. Your templates can be changed at any time through the control panel. This makes it quick and easy to integrate these pages into your existing site design.

Control Panel Editing Interface

All changes to your script page templates will be made through the control panel. From the control panel menu, locate and click on the Script Pages link in the Templates section. AutoRank PHP will load a page where you will be able to select which of the template files you want to edit. Select the template you want to edit from the list, and press the Load Template button.

You will be returned to the same page, however now there will be a large text input box where you will edit your HTML code. The first time you do this, the text input box will contain AutoRank PHP's default HTML. You can edit that HTML or paste your own HTML code into this text input box. When you are satisfied with the changes you have made, click on the Save button at the top or bottom of the page.

All of the changes you make will be immediate. The next time you visit the submit form, the updated template will be used.

Global Control Structures

These templates will use some control structures, however you should not need to edit or add any to your customized templates. The only thing you may need to do is move the control structures to different locations in the template. For that reason, they will only briefly be covered here. There are also some control structures that will work only on specific template pages; those will be described below in the section that contains specific information about each of the templates. Template Values

Each of the template files has it's own set of valid template values.

user_style.css
This is the style sheet that is included on most of the script page templates.

No template values for this template

accounts_add.tpl
This is the form that will be shown to webmasters who want to create an account.

##Name_Field_1## - The name of user defined field 1 taken from the value you entered in the Edit Options interface
##Name_Field_2## - The name of user defined field 2 taken from the value you entered in the Edit Options interface
##Name_Field_3## - The name of user defined field 3 taken from the value you entered in the Edit Options interface
##Max_Title## - The maximum number of characters allowed in the site title
##Max_Desc## - The maximum number of characters allowed in the site description
##Category## - Used in the category loop to display all of the available categories

accounts_added.tpl
This is the page that will be displayed after a webmaster has created an account.

##Tracking_URL## - The URL that the webmaster should send hits to in order for them to be tracked
##Email## - The e-mail address that the webmaster submitted
##Site_URL## - The site URL that the webmaster submitted
##Title## - The site title that the webmaster submitted
##Description## - The description that the webmaster submitted
##Banner_URL## - The banner URL that the webmaster submitted
##Banner_Width## - The banner width that the webmaster submitted
##Banner_Height## - The banner height that the webmaster submitted
##Category## - The category that the webmaster submitted
##Recip_URL## - The reciprocal link URL that the webmaster submitted
##Field_1## - The value submitted for user defined field 1
##Field_2## - The value submitted for user defined field 2
##Field_3## - The value submitted for user defined field 3
##Username## - The username that the webmaster selected
##Password## - The password that the webmaster selected
##Name_Field_1## - The name of user defined field 1 taken from the value you entered in the Edit Options interface
##Name_Field_2## - The name of user defined field 2 taken from the value you entered in the Edit Options interface
##Name_Field_3## - The name of user defined field 3 taken from the value you entered in the Edit Options interface

accounts_edit.tpl
This is the form members will see when they want to edit their account.

##Email## - The e-mail address on file for the account
##Site_URL## - The site URL on file for the account
##Title## - The site title on file for the account
##Description## - The description on file for the account
##Banner_URL## - The banner URL on file for the account
##Banner_Width## - The banner width on file for the account
##Banner_Height## - The banner height on file for the account
##Category## - The category on file for the account (only valid inside the Categories loop)
##Recip_URL## - The reciprocal link URL on file for the account
##Field_1## - The value on file for user defined field 1
##Field_2## - The value on file for user defined field 2
##Field_3## - The value on file for user defined field 3
##Username## - The username of the account
##Password## - The password for the account
##Name_Field_1## - The name of user defined field 1 taken from the value you entered in the Edit Options interface
##Name_Field_2## - The name of user defined field 2 taken from the value you entered in the Edit Options interface
##Name_Field_3## - The name of user defined field 3 taken from the value you entered in the Edit Options interface
##Max_Title## - The maximum number of characters allowed in the site title
##Max_Desc## - The maximum number of characters allowed in the site description
##Category## - Used in the category loop to display all of the available categories

accounts_edited.tpl
This is the confirmation page that will be displayed when a member edits their account.

##Email## - The e-mail address that the webmaster submitted
##Site_URL## - The site URL that the webmaster submitted
##Title## - The site title that the webmaster submitted
##Description## - The description that the webmaster submitted
##Banner_URL## - The banner URL that the webmaster submitted
##Banner_Width## - The banner width that the webmaster submitted
##Banner_Height## - The banner height that the webmaster submitted
##Category## - The category that the webmaster submitted
##Recip_URL## - The reciprocal link URL that the webmaster submitted
##Field_1## - The value submitted for user defined field 1
##Field_2## - The value submitted for user defined field 2
##Field_3## - The value submitted for user defined field 3
##Username## - The username of this account
##Password## - The password that the webmaster selected
##Name_Field_1## - The name of user defined field 1 taken from the value you entered in the Edit Options interface
##Name_Field_2## - The name of user defined field 2 taken from the value you entered in the Edit Options interface
##Name_Field_3## - The name of user defined field 3 taken from the value you entered in the Edit Options interface

user_error.tpl
This template is used to display error messages to the person creating or maintaining their account.

##Error## - A message indicating what the specific error is

accounts_links.tpl
This template is displayed when the account holder selects to view banners and links from the login page.

##Username## - The account username
##Tracking_URL## - The URL that the webmaster should send hits to in order for them to be tracked

accounts_login.tpl
This template is displayed when the account holder wishes to manage their account.

No template values for this template

accounts_remind.tpl
This template is displayed when an account holder needs to be reminded of their username or password.

##Email## - The e-mail address that the account login information was sent to

accounts_statistics.tpl
This template is displayed when an account holder views their statistics.

##Signup_Date## - The signup date and time of the account
##Last_Reset## - The date and time of the last reset
##Total_Reset## - The date and time of the last total reset
##Weighted_In## - The number of hits the member has sent to your site since the last reset, with the weight applied
##Weighted_Out## - The number of hits you have sent to the member site since the last reset, with the weight applied
##Weighted_Total_In## - The total number of hits the member has sent to your site since the last total reset, with the weight applied
##Weighted_Total_Out## - The total number of hits you have sent to the member site since the last total reset, with the weight applied
##In_Per_Day## - The average number of hits the member has sent to your site each day since the last total reset
##In_Per_Week## - The average number of hits the member has sent to your site each week since the last total reset
##In_Per_Month## - The average number of hits the member has sent to your site each month since the last total reset
##Out_Per_Day## - The average number of hits you have sent to the member site each day since the last total reset
##Out_Per_Week## - The average number of hits you have sent to the member site each week since the last total reset
##Out_Per_Month## - The average number of hits you have sent to the member site each month since the last total reset

Valid inside the HistoricalStats loop:
##Date## - The date for these stats
##Prod_In## - The number of hits the member site sent to you with productivity bonus and weight applied
##Weighted_Out## - The number of hits you sent to the member site with weight applied
##Overall_Rank## - The member site's overall ranking
##Category_Rank## - The mebmber site's ranking within it's category

in_gateway.tpl
This is the gateway page template for the in.php script.

##In_URL## - The URL of the in.php script
##Session## - The session identifier created by the software
##ID## - The username of the account that generated this hit

search_main.tpl
This template is displayed when a search is done by a surfer.

##Keyword## - The value that the user searched for
##Start## - The starting point of the search results displayed on the current page
##End## - The ending point of the search results displayed on the current page
##Total## - The total number of search results
##Prev_Page## - The URL to the next page of search results
##Next_Page## - The URL to the previous page of search results

Valid inside the Results loop:
##Overall_Rank## - The site's current overall rank
##Category_Rank## - The site's category rank
##Email## - The e-mail address of the account
##Site_URL## - The site URL of the account
##Title## - The site title of the account
##Description## - The description of the account
##Banner_URL## - The banner URL of the account
##Banner_Width## - The banner width of the account
##Banner_Height## - The banner height of the account
##Category## - The category of the account
##Recip_URL## - The reciprocal link URL of the account
##Field_1## - The value submitted for user defined field 1
##Field_2## - The value submitted for user defined field 2
##Field_3## - The value submitted for user defined field 3
##Weighted_In## - The number of hits the member has sent to your site since the last reset, with the weight applied
##Prod_In## - The number of hits the member has sent to your site since the last reset, with the weight and productivity bonus applied
##Weighted_Out## - The number of hits you have sent to the member site since the last reset, with the weight applied
##Weighted_Total_In## - The total number of hits the member has sent to your site since the last total reset, with the weight applied
##Prod_Total_In## - The total number of hits the member has sent to your site since the last total reset, with the weight and productivity bonus applied
##Weighted_Total_Out## - The total number of hits you have sent to the member site since the last total reset, with the weight applied

Special control structure:
<!--[Search Start]-->
PERPAGE 20
<!--[Search End]-->

You will find this control structure at the top of the search_main.tpl template, and it must remain in place at all times. This value tells the software how many search results to display per page. You can adjust the PERPAGE setting to whatever value you want, just make sure it always appears at the top of this template.

Special control structure:
<!--[Results Start]-->
<!--[Results End]-->

This control structure acts just like a normal Loop control structure. It will loop through the available search results and display the HTML between the start and end tags for each search result.

comments_main.tpl
This will display the user submitted comments for an account

##Total## - The total number of comments for this account
##Start## - The starting point of the comments displayed on the current page
##End## - The ending point of the comments displayed on the current page
##Prev_Page## - The URL to the next page of comments
##Next_Page## - The URL to the previous page of comments
##Username## - The username of the account that the surfer is viewing comments for

Valid inside the Comments loop:
##Comment## - The comment that the user left
##Name## - The name of the person who left the comment
##Rating## - The rating that the person left for the site
##Date## - The date the comment was added

Special control structure:
<!--[Lookup Start]-->
PERPAGE 10
<!--[Lookup End]-->

You will find this control structure at the top of the comments_main.tpl template, and it must remain in place at all times. This value tells the software how many comments to display per page. You can adjust the PERPAGE setting to whatever value you want, just make sure it always appears at the top of this template.

Special control structure:
<!--[Comments Start]-->
<!--[Comments End]-->

This control structure acts just like a normal Loop control structure. It will loop through the available comments and display the HTML between the start and end tags for each comment.

new_main.tpl
This will display newly added sites

Valid inside the Newsites loop:
##Overall_Rank## - The site's current overall rank
##Category_Rank## - The site's category rank
##Email## - The e-mail address of the account
##Site_URL## - The site URL of the account
##Title## - The site title of the account
##Description## - The description of the account
##Banner_URL## - The banner URL of the account
##Banner_Width## - The banner width of the account
##Banner_Height## - The banner height of the account
##Category## - The category of the account
##Recip_URL## - The reciprocal link URL of the account
##Field_1## - The value submitted for user defined field 1
##Field_2## - The value submitted for user defined field 2
##Field_3## - The value submitted for user defined field 3
##Signup_Date## - The date the account was created
##Weighted_In## - The number of hits the member has sent to your site since the last reset, with the weight applied
##Prod_In## - The number of hits the member has sent to your site since the last reset, with the weight and productivity bonus applied
##Weighted_Out## - The number of hits you have sent to the member site since the last reset, with the weight applied
##Weighted_Total_In## - The total number of hits the member has sent to your site since the last total reset, with the weight applied
##Prod_Total_In## - The total number of hits the member has sent to your site since the last total reset, with the weight and productivity bonus applied
##Weighted_Total_Out## - The total number of hits you have sent to the member site since the last total reset, with the weight applied

Special control structure:
<!--[Define Start]-->
AMOUNT 50
<!--[Define End]-->

You will find this control structure at the top of the new_main.tpl template, and it must remain in place at all times. This value tells the software how many new sites to show. You can adjust the AMOUNT setting to whatever value you want, just make sure it always appears at the top of this template.

Special control structure:
<!--[Newsites Start]-->
<!--[Newsites End]-->

This control structure acts just like a normal Loop control structure. It will loop through the available new sites and display the HTML between the start and end tags for each new site in the database.

rate_main.tpl
This will display the interface where surfers can rate and leave comments for accounts

##Maximum_Rating## ##Session## ##Username## - The username of the account that the surfer is rating
##Site_URL## - The site URL of the account that the surfer is rating
##Title## - The site title of the account that the surfer is rating
##Description## - The description of the account that the surfer is rating
##Banner_URL## - The banner URL of the account that the surfer is rating
##Banner_Width## - The banner width of the account that the surfer is rating
##Banner_Height## - The banner height of the account that the surfer is rating
##Category## - The category of the account that the surfer is rating
##Field_1## - The value for user defined field 1 of the account that the surfer is rating
##Field_2## - The value for user defined field 2 of the account that the surfer is rating
##Field_3## - The value for user defined field 3 of the account that the surfer is rating

rate_added.tpl
This will display the page confirming that a surfer rating has been recorded

##Rating## - The rating that the surfer gave this account