Toplists - Add a Toplist
Overview
From this dialog you will be able to add toplists. The toplist feature allows you to generate lists that will show your traders sorted by a value that you select.
For example, you may want to create a list of your traders that sent you the most unique ins in the past 24 hours. You can then display that list embedded in other
pages of your site, such as a TGP or Tube page.
Toplist Settings
When adding or editing a toplist there are several settings you can configure. Those are as follows:
Toplist Template Code
-
Source - Select the source for this toplist. The source can either be a file containing the template code, or a template that you enter in the Template field
Template - When Source is set to Template, this text input box will appear allowing you to enter the template code for this toplist
Input File - When Source is set to File, enter the full directory path and filename of the file that contains the toplist template code
Output File - Enter the full directory path and filename of the file where you want the toplist written
Groups - If you want to limit the traders that can appear in this toplist by group, select those groups here. To allow trades from any group, leave all the groups un-selected.
Categories - If you want to limit the traders that can appear in this toplist by category, select those categories here To allow trades from any category, leave all the categories un-selected.
Only trades that have thumbnails
Check this box if you want to allow only trades that have at least one thumbnail to appear in this toplist
Trade Priority - Optionally give priority to trades in your outlists. If you select anything other than All Trades, the trades in the outlist you select will have priority over other trades in this toplist. For example, if you select Forces the trades that are currently in the forces outlist will be listed first in the toplist followed by the other trades that meet the requirements you specify.
Sort By - Select how the traders should be sorted
Requirement - If you want a certain requirement to be met in order to be listed in this toplist, enter that requirement here. Multiple requirements can be added by clicking the + and - icons. Each trade must meet all of the requirements specified in order to be listed in the toplist.
The toplist templates use the same basic syntax as the other SFTrade templates and has the following template variables available:
The software configuration settings
$g_trades
The trades that are eligible for display in this toplist. You can either iterate through each trade using a {foreach} or you can access each ranked trade by number. To access each ranked trade by number, use square brackets around the rank number. For example, to access the #1 ranked site use [1] as shown below:
To access the #2 ranked site replace [1] with [2] and so on...
Thumbnails
If a trade has thumbnails you can access them using this template syntax:
Where the 1 indicates the thumbnail you want to display. For example, if you have setup to grab 3 thumbnails for each trade you can use 1, 2, or 3 to access the different thumbnails:
If you would like to have a random thumbnail selected, this template syntax can be used:
{assign var=$thumb code=rand(1,$g_trades[1].thumbnails)}
Example Templates
-
$g_timestamp - The timestamp when the build occurred
$g_date - The date when the build occurred (using Date Format setting)
$g_datetime - The date and time when the build occurred (using Date Format and Time Format settings)
The software configuration settings
$g_config.site_name - Site Name
$g_config.traffic_url - Traffic URL
$g_config.base_url - SFTrade URL
$g_config.cookie_domain - Cookie Domain
$g_config.cookie_path - Cookie Path
$g_config.email_address - E-mail Address
$g_config.email_name - E-mail Name
$g_config.date_format - Date Format
$g_config.time_format - Time Format
$g_config.flag_accept_new_trades - Accepting new trades
$g_config.flag_captcha_register - Use CAPTCHA on registration form
$g_config.flag_allow_login - Allow users to login with a password to view their stats
$g_config.site_name_min - Site name minimum length
$g_config.site_name_max - Site name maximum length
$g_config.site_description_min - Site description minimum length
$g_config.site_description_max - Site description maximum length
$g_config.flag_req_email - E-mail address required
$g_config.flag_req_site_name - Site name required
$g_config.flag_req_site_description - Site description required
$g_config.flag_req_icq - ICQ required
$g_config.flag_req_nickname - Name/Nickname required
$g_config.flag_req_banner - Banner URL required
$g_config.traffic_url - Traffic URL
$g_config.base_url - SFTrade URL
$g_config.cookie_domain - Cookie Domain
$g_config.cookie_path - Cookie Path
$g_config.email_address - E-mail Address
$g_config.email_name - E-mail Name
$g_config.date_format - Date Format
$g_config.time_format - Time Format
$g_config.flag_accept_new_trades - Accepting new trades
$g_config.flag_captcha_register - Use CAPTCHA on registration form
$g_config.flag_allow_login - Allow users to login with a password to view their stats
$g_config.site_name_min - Site name minimum length
$g_config.site_name_max - Site name maximum length
$g_config.site_description_min - Site description minimum length
$g_config.site_description_max - Site description maximum length
$g_config.flag_req_email - E-mail address required
$g_config.flag_req_site_name - Site name required
$g_config.flag_req_site_description - Site description required
$g_config.flag_req_icq - ICQ required
$g_config.flag_req_nickname - Name/Nickname required
$g_config.flag_req_banner - Banner URL required
$g_trades
The trades that are eligible for display in this toplist. You can either iterate through each trade using a {foreach} or you can access each ranked trade by number. To access each ranked trade by number, use square brackets around the rank number. For example, to access the #1 ranked site use [1] as shown below:
$g_trades[1].domain - Domain name
$g_trades[1].return_url - Traffic URL
$g_trades[1].status - Account status
$g_trades[1].email - E-mail address
$g_trades[1].nickname - Name/Nickname
$g_trades[1].icq - ICQ number
$g_trades[1].site_name - Site name
$g_trades[1].site_description - Site description
$g_trades[1].banner - Banner URL
$g_trades[1].i_raw_60 - 60 Minutes - In Raw
$g_trades[1].i_uniq_60 - 60 Minutes - In Unique
$g_trades[1].i_uniq_pct_60 - 60 Minutes - In Unique %
$g_trades[1].i_proxy_60 - 60 Minutes - In Proxy
$g_trades[1].i_ctry_g_60 - 60 Minutes - In Good Country
$g_trades[1].i_ctry_n_60 - 60 Minutes - In Normal Country
$g_trades[1].i_ctry_b_60 - 60 Minutes - In Bad Country
$g_trades[1].i_ctry_g_pct_60 - 60 Minutes - In Good Country %
$g_trades[1].i_ctry_n_pct_60 - 60 Minutes - In Normal Country %
$g_trades[1].i_ctry_b_pct_60 - 60 Minutes - In Bad Country %
$g_trades[1].o_raw_60 - 60 Minutes - Out Raw
$g_trades[1].o_proxy_60 - 60 Minutes - Out Proxy
$g_trades[1].o_ctry_g_60 - 60 Minutes - Out Good Country
$g_trades[1].o_ctry_n_60 - 60 Minutes - Out Normal Country
$g_trades[1].o_ctry_b_60 - 60 Minutes - Out Bad Country
$g_trades[1].o_ctry_g_pct_60 - 60 Minutes - Out Good Country %
$g_trades[1].o_ctry_n_pct_60 - 60 Minutes - Out Normal Country %
$g_trades[1].o_ctry_b_pct_60 - 60 Minutes - Out Bad Country %
$g_trades[1].c_raw_60 - 60 Minutes - Clicks Raw
$g_trades[1].c_proxy_60 - 60 Minutes - Clicks Proxy
$g_trades[1].c_trades_60 - 60 Minutes - Clicks To Trades
$g_trades[1].c_ctry_g_60 - 60 Minutes - Clicks Good Country
$g_trades[1].c_ctry_n_60 - 60 Minutes - Clicks Normal Country
$g_trades[1].c_ctry_b_60 - 60 Minutes - Clicks Bad Country
$g_trades[1].c_ctry_g_pct_60 - 60 Minutes - Clicks Good Country %
$g_trades[1].c_ctry_n_pct_60 - 60 Minutes - Clicks Normal Country %
$g_trades[1].c_ctry_b_pct_60 - 60 Minutes - Clicks Bad Country %
$g_trades[1].prod_60 - 60 Minutes - Productivity
$g_trades[1].t_prod_60 - 60 Minutes - Trade Productivity
$g_trades[1].return_60 - 60 Minutes - Return
$g_trades[1].skim_60 - 60 Minutes - Skim
$g_trades[1].i_raw_24 - 24 Hours - In Raw
$g_trades[1].i_uniq_24 - 24 Hours - In Unique
$g_trades[1].i_uniq_pct_24 - 24 Hours - In Unique %
$g_trades[1].i_proxy_24 - 24 Hours - In Proxy
$g_trades[1].i_ctry_g_24 - 24 Hours - In Good Country
$g_trades[1].i_ctry_n_24 - 24 Hours - In Normal Country
$g_trades[1].i_ctry_b_24 - 24 Hours - In Bad Country
$g_trades[1].i_ctry_g_pct_24 - 24 Hours - In Good Country %
$g_trades[1].i_ctry_n_pct_24 - 24 Hours - In Normal Country %
$g_trades[1].i_ctry_b_pct_24 - 24 Hours - In Bad Country %
$g_trades[1].o_raw_24 - 24 Hours - Out Raw
$g_trades[1].o_proxy_24 - 24 Hours - Out Proxy
$g_trades[1].o_ctry_g_24 - 24 Hours - Out Good Country
$g_trades[1].o_ctry_n_24 - 24 Hours - Out Normal Country
$g_trades[1].o_ctry_b_24 - 24 Hours - Out Bad Country
$g_trades[1].o_ctry_g_pct_24 - 24 Hours - Out Good Country %
$g_trades[1].o_ctry_n_pct_24 - 24 Hours - Out Normal Country %
$g_trades[1].o_ctry_b_pct_24 - 24 Hours - Out Bad Country %
$g_trades[1].c_raw_24 - 24 Hours - Clicks Raw
$g_trades[1].c_proxy_24 - 24 Hours - Clicks Proxy
$g_trades[1].c_trades_24 - 24 Hours - Clicks To Trades
$g_trades[1].c_ctry_g_24 - 24 Hours - Clicks Good Country
$g_trades[1].c_ctry_n_24 - 24 Hours - Clicks Normal Country
$g_trades[1].c_ctry_b_24 - 24 Hours - Clicks Bad Country
$g_trades[1].c_ctry_g_pct_24 - 24 Hours - Clicks Good Country %
$g_trades[1].c_ctry_n_pct_24 - 24 Hours - Clicks Normal Country %
$g_trades[1].c_ctry_b_pct_24 - 24 Hours - Clicks Bad Country %
$g_trades[1].prod_24 - 24 Hours - Productivity
$g_trades[1].t_prod_24 - 24 Hours - Trade Productivity
$g_trades[1].return_24 - 24 Hours - Return
$g_trades[1].skim_24 - 24 Hours - Skim
$g_trades[1].return_url - Traffic URL
$g_trades[1].status - Account status
$g_trades[1].email - E-mail address
$g_trades[1].nickname - Name/Nickname
$g_trades[1].icq - ICQ number
$g_trades[1].site_name - Site name
$g_trades[1].site_description - Site description
$g_trades[1].banner - Banner URL
$g_trades[1].i_raw_60 - 60 Minutes - In Raw
$g_trades[1].i_uniq_60 - 60 Minutes - In Unique
$g_trades[1].i_uniq_pct_60 - 60 Minutes - In Unique %
$g_trades[1].i_proxy_60 - 60 Minutes - In Proxy
$g_trades[1].i_ctry_g_60 - 60 Minutes - In Good Country
$g_trades[1].i_ctry_n_60 - 60 Minutes - In Normal Country
$g_trades[1].i_ctry_b_60 - 60 Minutes - In Bad Country
$g_trades[1].i_ctry_g_pct_60 - 60 Minutes - In Good Country %
$g_trades[1].i_ctry_n_pct_60 - 60 Minutes - In Normal Country %
$g_trades[1].i_ctry_b_pct_60 - 60 Minutes - In Bad Country %
$g_trades[1].o_raw_60 - 60 Minutes - Out Raw
$g_trades[1].o_proxy_60 - 60 Minutes - Out Proxy
$g_trades[1].o_ctry_g_60 - 60 Minutes - Out Good Country
$g_trades[1].o_ctry_n_60 - 60 Minutes - Out Normal Country
$g_trades[1].o_ctry_b_60 - 60 Minutes - Out Bad Country
$g_trades[1].o_ctry_g_pct_60 - 60 Minutes - Out Good Country %
$g_trades[1].o_ctry_n_pct_60 - 60 Minutes - Out Normal Country %
$g_trades[1].o_ctry_b_pct_60 - 60 Minutes - Out Bad Country %
$g_trades[1].c_raw_60 - 60 Minutes - Clicks Raw
$g_trades[1].c_proxy_60 - 60 Minutes - Clicks Proxy
$g_trades[1].c_trades_60 - 60 Minutes - Clicks To Trades
$g_trades[1].c_ctry_g_60 - 60 Minutes - Clicks Good Country
$g_trades[1].c_ctry_n_60 - 60 Minutes - Clicks Normal Country
$g_trades[1].c_ctry_b_60 - 60 Minutes - Clicks Bad Country
$g_trades[1].c_ctry_g_pct_60 - 60 Minutes - Clicks Good Country %
$g_trades[1].c_ctry_n_pct_60 - 60 Minutes - Clicks Normal Country %
$g_trades[1].c_ctry_b_pct_60 - 60 Minutes - Clicks Bad Country %
$g_trades[1].prod_60 - 60 Minutes - Productivity
$g_trades[1].t_prod_60 - 60 Minutes - Trade Productivity
$g_trades[1].return_60 - 60 Minutes - Return
$g_trades[1].skim_60 - 60 Minutes - Skim
$g_trades[1].i_raw_24 - 24 Hours - In Raw
$g_trades[1].i_uniq_24 - 24 Hours - In Unique
$g_trades[1].i_uniq_pct_24 - 24 Hours - In Unique %
$g_trades[1].i_proxy_24 - 24 Hours - In Proxy
$g_trades[1].i_ctry_g_24 - 24 Hours - In Good Country
$g_trades[1].i_ctry_n_24 - 24 Hours - In Normal Country
$g_trades[1].i_ctry_b_24 - 24 Hours - In Bad Country
$g_trades[1].i_ctry_g_pct_24 - 24 Hours - In Good Country %
$g_trades[1].i_ctry_n_pct_24 - 24 Hours - In Normal Country %
$g_trades[1].i_ctry_b_pct_24 - 24 Hours - In Bad Country %
$g_trades[1].o_raw_24 - 24 Hours - Out Raw
$g_trades[1].o_proxy_24 - 24 Hours - Out Proxy
$g_trades[1].o_ctry_g_24 - 24 Hours - Out Good Country
$g_trades[1].o_ctry_n_24 - 24 Hours - Out Normal Country
$g_trades[1].o_ctry_b_24 - 24 Hours - Out Bad Country
$g_trades[1].o_ctry_g_pct_24 - 24 Hours - Out Good Country %
$g_trades[1].o_ctry_n_pct_24 - 24 Hours - Out Normal Country %
$g_trades[1].o_ctry_b_pct_24 - 24 Hours - Out Bad Country %
$g_trades[1].c_raw_24 - 24 Hours - Clicks Raw
$g_trades[1].c_proxy_24 - 24 Hours - Clicks Proxy
$g_trades[1].c_trades_24 - 24 Hours - Clicks To Trades
$g_trades[1].c_ctry_g_24 - 24 Hours - Clicks Good Country
$g_trades[1].c_ctry_n_24 - 24 Hours - Clicks Normal Country
$g_trades[1].c_ctry_b_24 - 24 Hours - Clicks Bad Country
$g_trades[1].c_ctry_g_pct_24 - 24 Hours - Clicks Good Country %
$g_trades[1].c_ctry_n_pct_24 - 24 Hours - Clicks Normal Country %
$g_trades[1].c_ctry_b_pct_24 - 24 Hours - Clicks Bad Country %
$g_trades[1].prod_24 - 24 Hours - Productivity
$g_trades[1].t_prod_24 - 24 Hours - Trade Productivity
$g_trades[1].return_24 - 24 Hours - Return
$g_trades[1].skim_24 - 24 Hours - Skim
To access the #2 ranked site replace [1] with [2] and so on...
Thumbnails
If a trade has thumbnails you can access them using this template syntax:
![]({$g_config.base_url}/th/{$g_trades[1].domain}-1.jpg)
![]({$g_config.base_url}/th/{$g_trades[1].domain}-1.jpg)
![]({$g_config.base_url}/th/{$g_trades[1].domain}-2.jpg)
![]({$g_config.base_url}/th/{$g_trades[1].domain}-3.jpg)
![]({$g_config.base_url}/th/{$g_trades[1].domain}-{$thumb}.jpg)
Below are a few example toplist templates showing the different ways to access the trades in the $g_trades variable.
{foreach var=$trade from=$g_trades counter=$counter}
{range start=11 end=20 counter=$i}
{assign var=$trade code=$g_trades[$i]}
Accessing by Rank Number
This example shows how to access trades by their rank number in the $g_trades template variable. A total of 5 trades
will be displayed with their domain linked to their return URL setting. This will also show the raw in value from the
past 24 hours.
1. {$g_trades[1].domain} ({$g_trades[1].i_raw_24}) | 2. {$g_trades[2].domain} ({$g_trades[2].i_raw_24}) | 3. {$g_trades[3].domain} ({$g_trades[3].i_raw_24}) | 4. {$g_trades[4].domain} ({$g_trades[4].i_raw_24}) | 5. {$g_trades[5].domain} ({$g_trades[5].i_raw_24}) |
Accessing Using {foreach}
This example uses a {foreach} template function to iterate over the trades in the $g_trades template variable. A total
of 30 trades will be displayed with their domain linked to their return URL setting. The {foreachdone} triggers an exit
from displaying trades, so even if you have more than 30 available only the top 30 will be listed.
{$counter}. {$trade.domain} ({$trade.i_raw_24}) |
Accessing Using {range}
This example uses a {range} template function to iterate over the trades in the $g_trades template variable. A total
of 10 trades will be displayed with their domain linked to their return URL setting. This is useful when you want to
display trades from a certain starting point to a certain ending point. For this example, the trades ranked 11 through
20 will be displayed.
This example also shows how to display an "Add Your Site" link if there are not enough trades to fill the entire table.
{if !empty($trade)} {$i}. {$trade.domain} ({$trade.i_raw_24}) {else} {$i}. Add Your Site {/if} |