AutoRank PHP Overview

Adding Accounts

To signup new accounts you will need to use the accounts.php interface. Just point your browser to the URL of accounts.php on your server and you will see a page that collects the user information. This page is controlled by the _account_add.htmlt template, so you can make changes to it's look by editing that template.

If New Accounts Must Be Confirmed By E-mail

Once the user has filled in all the fields and pressed the button, they will be taken to a page confirming that their data has been recorded. It will also inform them that they will need to check their e-mail, and visit a URL in the e-mail sent by the software to activate their account. This page is controlled through the _account_confirm.htmlt template. The _email_confirm.etmpl file is the text that will be sent in the e-mail message.

The user will receive a URL which they will need to visit in order to activate their account, as well as a unique randomly generated ID that they will need to provide. The _account_doconfirm.htmlt template is the one which controls the look of the account activation page. Once they visit this page and enter their confirmation ID value, they will be shown a page which confirms the account activation. If you are reviewing new accounts in addition to using the e-mail confirmation feature, the _account_review.htmlt template will be displayed. If you are not reviewing new accounts, the _account_added.htmlt template will be displayed.

If You Are Reviewing New Accounts and Not Using E-mail Confirmation

Once the user has filled in all the fields and pressed the button, they will be taken to a page confirming that their data has been recorded. It will also inform them that their data will be reviewed before it is added to your list. This page is controlled through the _account_review.htmlt template. If you have the option enabled to e-mail members when they signup, the contents of the _email_review.etmpl e-mail template will be sent to the user.

You will want to regularly check in your administrative interface to see if there are new accounts to review. You can view the accounts which are awaiting approval by using the Review New Accounts function from the first pull down menu in the administrative interface. On the review new accounts page you will see a listing of all the new accounts. You can put a check in the box next to each account you want to approve, and then choose the function to approve the selected accounts from the drop down menu. All approved accounts will be sent the contents of the _email_approved.etmpl e-mail template.

For the accounts you want to reject, put a check next to each. You can then select which rejection e-mail you want to send to them. There will be a drop down selection menu for each account from which you can select the rejection e-mail. The default is None which will not send an e-mail to the user. To setup your own rejection e-mails, use the Edit Reject E-mails function in the administrative interface.

Once an account has been approved, it will be added to the ranking list the next time it is updated if they have sent the minimum required hits.

If You Are Not Reviewing New Accounts and Not Using E-mail Confirmation

Once the user has filled in all the fields and pressed the button, they will be taken to a page confirming that their data has been recorded. This page is controlled through the _account_added.htmlt template. If you have the option enabled to e-mail members when they signup, the contents of the _email_added.etmpl e-mail template will be sent to the user.

The account will be instantly added to your database, and ranked among the other sites the next time the list is updated. Remember, sites must send the minimum required hits before they will be listed.

Link Syntax

One of the things you want to make sure you do is to provide your members with the types of links that you want them to use when sending visitors to your site. Each member will have their a unique URL which they need to send hits to, and that URL will include their username.

There are several places where you can provide your members with link syntax. The first is the page that they see immediately after signing up. If you are reviewing new accounts, this is the _account_review.htmlt template; if you are not it is the _account_added.htmlt template. The software also includes a banner farm feature where you can add your link syntax. The HTML for the banner farm is controlled with the _account_farm.htmlt template. The banner farm is accessed through the account maintenance inteface, which you can get to by pointing your browser to accounts.php?login

On these pages you can use whatever types of links you want, from plain text links to banners, and even javascript. Deciding on and creating your links will be your responsibility. Once you have them created, you can add them to the template of your choice. To get the correct URL that all your member links should point to, use the #%TRACK_URL%# template value.

User Defined Fields

These fields allow you to collect your own information about the sites that signup for accounts. For example, if you want your members to submit the URL to a sample image from their site, you can use one of those fields. In order for your members to know what these fields are for, you will need to enter information about them in setup.php. In setup.php, you can enter the name of the field, and it will then appear on the accounts.php pages and in your administrative script. You can also require that these fields be filled in by checking the appropriate box in setup.php.

Any information can be collected with these fields, however there is a restriction on the type of form fields you can use. You are not allowed to use a <textarea> field to collect this information. Any other fields (select boxes, checkboxes, radio buttons, text fields, password fields) are allowed. Also note that the user defined fields are limited to 255 characters.

Reranks and Resets

Reranks

Lets start off with reranks. A rerank is when the software re-sorts all of the members in your database using the stats they have accumulated up to that point. The next time someone views your index.php page after a rerank, the page will be updated with the newly sorted members. Your reranks should happen more often than your resets. A fairly common setup is to have a rerank occur every hour, and a reset every 24 hours.

Resets

Resets are when the in and out hit counts are reset to zero. This does not affect the total in, total out, or average hit counts - it only affects the current in and out hit count. Generally, these occur once a day, week, or month, but you can have them happen whenever you want. They should occur less frequently than reranks. The script tracks total hits in and out, and can rank based on those values, so there really is no point in never having the list reset. You should also be aware that if the list never resets, there will not be detailed stats for the administrator or members to view.

Total Resets

This is not an automatic feature, but you can manually reset the total in, total out, and average hit counts. This function can be accessed from the first pull down menu of the administrative interface. The function will not reset the current in and out hit count, only totals and averages.

Suspended and Locked Accounts

When you suspend an account, it will be removed from the rankings and the account holder will not be allowed to login to their account. When you lock an account, it will still be displayed in the rankings, but the account holder will not be able to edit their account.

Hit Weighting

With AutoRank PHP it is possible to adjust the rankings by using a hit weight. When an account signs up, their hit weight is automatically set to 1.000. This means for every one hit they send, they are credited with one hit. Only incoming hits can be weighted, and weights are taken into effect when calculating the total hits in and hits in per day/week/month.

The weight value is pretty easy to understand. All the software does is take the hit weight and multiply it by the real number of hits sent. If an account has a hit weight of 2.000, they will be credited with 2 hits for every one real hit they send. On the other hand, if their hit weight is 0.500 they will only get credited with 1 hit for every 2 real hits they send.

The hit ratio has nothing to do with how many hits the script will send to a site. It is only used to increase or decrease an account's actual incoming hit count so you can boost one of your friend's sites or lower the hit count for a site which you feel may be cheating.

Site of the Moment

The software allows you to highlight a random site in your header or footer. Each time the list is reranked, a new site of the moment will be selected for each of your ranking pages. The site of the moment is selected from all of the sites which have sent the minimum required hits. On the overall ranking pages, the site can be from any category. On the category ranking pages, the site will be one from that category.

Search Engine and Random Link

This will give a quick overview of how the search engine and random link features work. Each time the list is reranked, the software will build a list of the sites which are displayed on your ranking pages. This includes all sites on your overall ranking pages, as well as those sites which are only on the category ranking pages. When a search is done, or the random link is clicked, the software will use that list to determine the results.

For the search engine, the software will search through the list and pull out those sites which match. The software will search all of the database fields for a match. When a match is found, it is displayed in the search results. All search results are displayed starting at the highest rank then working in decreasing order.

The random link script will choose a completely random site from the list. There is not a way to force the script to choose one site more often than the others - that is why it is called a random link.

Up/Down/Unchanged Icons

If you setup up, down, and unchanged images in setup.php, you will be able to display them next to sites in the rankings. Those images will show which direction the site has moved since the last reset. When you first install the software, they will all be the unchanged image, until the list is first reset. To display the images, you must add the #%MOVEMENT%# value to your ranking page template where you want them to appear.

During a reset, the site's ranking at the time of the reset is calculated and stored. Then, when the list reranks, the script will compare the site's current rank with the rank it was at during the last reset. If it is at a higher rank, the up image will be shown. If it is at a lower rank, the down image will be shown. If it is at the exact same rank, the unchanged image will be displayed.

Ranking Options

AutoRank PHP offers a total of 12 ranking options for you to choose from. Here we will describe each one, and let you know which template value corresponds to each ranking option. You will use setup.php to select which ranking method to use. Any time you change that ranking option, you need to change your template value as well so you are displaying the value which the sites are ranked by.

  • Hits In Since Last Reset - This will rank sites based on the number of hits they have sent since the list was last reset. Use the #%CURRENT_IN%# value in your template when sorting by Hits In. This value is set back to 0 during all resets.

  • Hits Out Since Last Reset - This will rank sites based on the number of hits that have been sent to their site since the last reset. Use the #%CURRENT_OUT%# value in your template when sorting by Hits Out. This value is set back to 0 during all resets.

  • Total Hits In - This will rank sites based on the total number of hits they have sent you since the last total hit count reset. Use the #%TOTAL_IN%# value in your template when sorting by Total Hits In. This value is only reset back to 0 when you use the reset total hit counts function in the administrative interface.

  • Total Hits Out - This will rank sites based on the total number of hits you have sent to their site since the last total hit count reset. Use the #%TOTAL_OUT%# value in your template when sorting by Total Hits In. This value is only reset back to 0 when you use the reset total hit counts function in the administrative interface.

  • Average Hits In/Day - This will rank sites based on the average number of hits they send each day. The script will take the total number of hits the site has sent since the last total hit count reset, and divide that by the number of days their account has existed. When sorting by this value, use #%IN_PER_DAY%# in your template. This value is only reset back to 0 when you use the reset total hit counts function in the administrative interface.

  • Average Hits In/Week - This will rank sites based on the average number of hits they send each week. The script will take the total number of hits the site has sent since the last total hit count reset, and divide that by the number of weeks their account has existed. When sorting by this value, use #%IN_PER_WEEK%# in your template. This value is only reset back to 0 when you use the reset total hit counts function in the administrative interface.

  • Average Hits In/Month - This will rank sites based on the average number of hits they send each month. The script will take the total number of hits the site has sent since the last total hit count reset, and divide that by the number of months their account has existed. When sorting by this value, use #%IN_PER_MONTH%# in your template. This value is only reset back to 0 when you use the reset total hit counts function in the administrative interface.

  • Average Hits Out/Day - This will rank sites based on the average number of hits sent to them each day. The script will take the total number of hits you have sent the site since the last total hit count reset, and divide that by the number of days their account has existed. When sorting by this value, use #%OUT_PER_DAY%# in your template. This value is only reset back to 0 when you use the reset total hit counts function in the administrative interface.

  • Average Hits Out/Week - This will rank sites based on the average number of hits sent to them each week. The script will take the total number of hits you have sent the site since the last total hit count reset, and divide that by the number of weeks their account has existed. When sorting by this value, use #%OUT_PER_WEEK%# in your template. This value is only reset back to 0 when you use the reset total hit counts function in the administrative interface.

  • Average Hits Out/Month - This will rank sites based on the average number of hits sent to them each month. The script will take the total number of hits you have sent the site since the last total hit count reset, and divide that by the number of months their account has existed. When sorting by this value, use #%OUT_PER_MONTH%# in your template. This value is only reset back to 0 when you use the reset total hit counts function in the administrative interface.

  • Number of Ratings - This will rank sites based on the total number of times their site has been rated. When sorting by this value, use #%NUM_RATINGS%# in your template. This value is only set back to 0 when you manually reset the ratings through the administrative script.

  • Average Rating - This will rank sites based on the average of all ratings the account has had. The script will take the total number of ratings the site has had, and divide that by the total of all of those ratings. When sorting by this value, use #%RATING%# in your template. This value is only set back to 0 when you manually reset the ratings through the administrative script.


Managing Accounts

You can manage all of your member accounts through the administrative interface. If you know the username of the account you want to work with, you can use the feature to display the account details for the username you enter. If you do not know the username, you can either do a search of your database, or view all of your accounts.

Viewing All Accounts



From the screenshot above you can see the function you need to use to view all of your member accounts. When using this function we recommend that you limit your viewing to 40 accounts per page. When you run this function you will be taken to a page with a list of your member accounts. From there you can put a checkbox next to any of the accounts, and then edit, delete, or e-mail them.

Viewing a Specific Account



From the screenshot above you can see the function you need to use to view details on a specific account. When you run this function you will be taken to a page that will display all of the current information on file for the account. From there you can select to edit, delete, or e-mail the account holder with the drop down menu of selections at the bottom of the page.

Timezone Offset

The timezone offset allows you to setup the list so that it displays the current date and time in sync with the timezone you are located in. Many times you will not be located in the same timezone as your server, so this can be useful for you to more easily track the time on your site. The easiest way to calculate your timezone offset is to do the following.
  1. Set the timezone offset to 0
  2. Make sure your ranking page includes the #%LAST_RERANK%# template value.
  3. Rerank your list.
  4. View the ranking page and look at the time inserted for #%LAST_RERANK%#
  5. Compare this time with your local time, and insert the difference between the two in your timezone offset field. Example: If the #%LAST_RERANK%# value says 10:00am and it is currently 9:00am where you are located, the offset would be -1. If #%LAST_RERANK%# is 9:00am and it is currently 11:00am where you are located, the offset would be 2.

Reciprocal Link URL

The reciprocal link URL field is for your use only, the software doesn't do anything with this URL at this time. A reciprocal URL is the URL on your member's site where they are planning on adding the link to your site. For accounts which are not sending many hits, you can look at this URL to make sure they have a link pointing to your site.

Detailed Stats

When using the Display Statistics function in the administrative interface, you have the option to view detailed stats. Detailed stats are recorded each time the list resets. You can either view the detailed stats from a specific date (if a reset occurred on that date) or a range of dates. The proper date format will be described.

To view a specific date, enter a date of the form YYYY-MM-DD in the date field. This will pull up stats for that date if a reset occurred on that date. To view a date range, enter a range of the form YYYY-MM-DD~YYYY-MM-DD, with the first date being previous to the second date.

Hit Tracking

AutoRank PHP currently offers two types of hit tracking.

Classic Method

This is the default method for hit tracking. Each member will receive a unique URL which they will need to send surfers to in order to track hits. This URL is to a PHP script (in.php) which will track each visitor to your site. Depending on what cheat protection options you have enabled, it can be set to track raw or unique hits. For a hit to be counted, all that is needed is for a valid surfer to click through the in.php script to your site.

New Method

Each member will receive a unique URL which they will need to send surfers to in order to track hits. This URL is to a PHP script (in.php) which will set a cookie in the surfer's browser which can be used to later identify them. A unique session ID is generated, and the time that the surfer first came to your site is recorded.

In order for a hit to be credited to the site they came from, the surfer will need to click an outgoing link in your ranking list (out.php). When they do this, the script will check the surfer's browser to get the cookie that was set by the in.php script. That cookie contains the information necessary to identify when they arrived and where they came from. The software can then check if it should credit a hit to the site which the surfer came from, based on a cheat protection algorithm.

Note: The new method of hit tracking is not suitable for all sites. It depends on surfers clicking outgoing links in your list, so if your traffic is not very good quality you probably will not want to use the new method. The incoming hit counts can be significantly lower when using this method of hit tracking.

Setting Up The New Method

To setup the new method of hit tracking, use the following steps.
  1. Locate the in.php, out.php, and _setup_main.php files in the tracking directory of the software distribution. Upload the in.php and out.php files to your server, replacing the current versions. Make sure to set 666 permissions on both of those files. Upload the _setup_main.php file to the include directory of your AutoRank PHP installation. Finally, make sure the _in.phpt file has been uploaded from the templates directory of the distribution to the templates directory on your server.

  2. Once all of the files have been uploaded, you will need to login to the setup.php interface. Scroll to near the bottom of the page and setup the cheat protection options you want to use. Even if you do not want to make any changes to the cheat protection options, you will need to press the button at the bottom of the setup.php page. This will save all of the necessary settings to enable the new hit tracking method.

Empty List

In order for the new style hit tracking to work, the list must have some members for surfers to click on. To accomplish this, the software has a new feature where it will display members even if they have not sent the minimum required hits. It will only do this when it determines that no sites have sent the minimum. As soon as one site has met the minimum, no other sites will be listed until they too meet the minimum.

This will ensure that the list is never empty, and will always have at least one site for the surfers to click on. Note that only the first page of your overall ranks works in this manner. The category pages will not display sites which do not meet the minimum under any circumstances. This feature is only enabled when you are using the new method of hit tracking.