The TGP page templates are the templates that control the appearance of the pages that TGPX generates which contain the links to your galleries and that your surfers will be viewing. This document will give you an overview of the custom functions and variables available in each of the directory templates.
Editing TGP Page Templates
To edit the TGP page templates access the TGP Pages > Edit Templates function from the control panel menu. This will display a page where you will be able to view and modify your TGP page templates. When you first access the TGP page template editing interface you will see a list of your defined TGP pages. You will need to select one of those pages and then click on the icon to load that template for editing. When you click on the icon the page will reload and you will now see the HTML and template code for this TGP page in a large text input box. There will also be a number of icons displayed across the top of the page, each of which is described below.
Click on this icon to load the template for a page. When you click on this icon a selection box will appear that will allow you to choose which template you want to edit. Once you have selected the template you want to edit, click the to load that template. | |
Click on this icon to refresh the currently loaded template. This is useful if you have used the search-and-replace function and need to update the template code with the new code that has been generated by the search-and-replace. | |
Click on this icon to save the currently loaded template. You will be asked to confirm if you want to save your changes before they are actually saved. | |
Click on this icon to save the currently loaded template and build the associated TGP page. You will be asked to confirm if you want to save your changes before they are actually saved and the page is built. This will run the standard Build function only on the currently loaded page. | |
Click on this icon to save the currently loaded template with additional options. This function will allow you to save the template for more than one page and also optionally build the saved pages. When you click this icon, a selection box will appear that will allow you to select the pages that you want to save this template for. In the selection list you can hold down the ctrl key on your keyboard while you click each page name to select multiple pages at once. You can also check the 'Build these pages after save' box to have the selected pages built after the template has been saved. Once you have selected the pages to save this template for, click on the icon. | |
Click on this icon to access the Search and Replace interface. |
TGPX allows you to make quick changes to your templates in bulk with the Search and Replace function. When you access the Search and Replace function a popup window will appear that will allow you to select the pages that you want to perform this action on, the code to search for in the template, and the replacement code to use. Multiple pages can be selected by holding down the shift or ctrl keys on your keyboard as you click on pages in the selection list. Once you have selected the pages and entered the search and replacement code, press the Search and Replace button to start the task. Once completed a message will appear at the top of the window letting you know how many replacements were made.
Custom Functions
In addition to the standard template functions, the directory templates have several custom functions available which allow you to display your categories and galleries. Each of those custom functions are described here.
-
{phpcode}
This function is different from the {php} function because it will output the PHP code to the actual TGP page so that the PHP code gets executed every
time someone views your TGP page. The code within a {php} function will be executed only when the page is being built and becomes a static part of the
generated TGP page.
{define}
-
name
globaldupes or pagedupes. This it the name of the value to set.
value
true or false. The value to assign to the named variable
The {define} template function should appear at the top of your template so that the values are defined before any {galleries} functions. Once you have set these values, it is no longer necessary to set them in the {galleries} function, although you can do that if you want to override the {define} setting.
{storeglobal}
-
name (required)
The name to use for the stored global value. This name will be used later with the {getglobal} template function to retrieve the data.
value (required)
The value to assign to the stored global value. This can be a template variable or a text string.
Any data that you store using this template function will only be available on TGP pages that are built after the page on which this function appears.
{getglobal}
-
name (required)
The name of the stored global value from which to retrieve the data. This must match the name attribute from a previous {storeglobal} template function.
var (required)
The template variable to which the data will be assigned.
galleries(optional, defaults to false)
true or false. If the data you are loading is stored galleries, set this value to true so that the software can mark them as being used on the page. For any other data, set this to false.
Any data that you store using this template function will only be available on TGP pages that are built after the page on which this function appears.
{ad}
-
order (optional, defaults to times_displayed, (unique_clicks/times_displayed) DESC)
The order in which advertisements will be pulled from the database. The following order options are available:
times_displayed | The number of times the advertisements has been displayed |
raw_clicks | The number of raw clicks the advertisement has received |
unique_clicks | The number of unique clicks the advertisement has received |
weight | The weight value assigned to the advertisement |
All of these values can be modified with DESC to sort in descending order instead of ascending order. Additionally, these values may be combined together to generate sub-sorting options. Here are a few examples: |
|
raw_clicks DESC | Sort by the number of raw clicks on the advertisement, from most to least |
weight DESC | Sort by the weight assigned to the advertisement, from largest to smallest |
(unique_clicks/times_displayed) DESC | A productivity value taking into account the number of times the advertisement has been displayed and the number of unique clicks it has received. Ordered from most productive to least productive. |
weight (optional, defaults to any)
Use this option to specify what advertisement weights can be pulled for display. You can use any type of comparison operator here, followed by the weight value that you want to restrict. See the weight attribute of the {galleries} template function documentation for examples.
tags (optional)
Use this option to specify a boolean mode search term in the tags assigned to your advertisements. See the keywords attribute of the {galleries} template function documentation for examples.
globaldupes (optional, defaults false)
true or false. Use this option to specify whether or not advertisements which have already been displayed on other pages can be pulled for display again on this page. If you set this to true, repeats will be allowed. Setting this to false means that no repeats will be allowed.
pagedupes (optional, defaults false)
Use this option to specify whether or not advertisements which have already been displayed on this page can be pulled for display again on this page. If you set this to true, repeats will be allowed. Setting this to false means that no repeats will be allowed.
category (optional, defaults to MIXED)
Use this option to restrict which categories can be pulled from the database. If you want any category to be allowed, used the keyword MIXED. If you want a specific category to be pulled, list the category name exactly as it appears in the Manage Categories interface. You may also use a list of several categories by separating each category by a comma. See the category attribute of the {galleries} template function documentation for examples and more info.
MIXED has a special meaning on pages that have been assigned to a specific category. On those pages, only advertisements from the category to which the
page is assigned will be displayed. The software will automatically convert MIXED to the appropriate category!
{searches}
-
var (required)
The name of the template variable that the search data will be loaded into
amount (optional, defaults to all)
Specify a numerical value to limit the number of search terms that are pulled, or enter the text string all to have all search terms pulled
order (optional, defaults to searches DESC)
The order in which the searches will be displayed. The following order options are available:
term | Sort alphabetically by the search term itself |
searches | Sort numerically by the number of searches that have been executed for each term |
date_last_search | Sort by the date that this term was most recently searched for |
All of these values can be modified with DESC to sort in descending order instead of ascending order. Additionally, these values may be combined together to generate sub-sorting options. Here are a few examples: |
|
searches DESC | Sort by the number of searches that have been executed, from most to least |
date_last_search DESC | Sort by the date that this term was most recently searched for, from newest to oldest |
searches DESC, date_last_search DESC | Sort by the number of searches that have been executed, from most to least. If two search terms have the same number of searches, they will be sub-sorted by the date that this term was most recently searched for, from newest to oldest |
alphabetize (optional, defaults to false)
true or false. If this is set to true, the search terms will be alphabetized after having the order sorting option applied. If set to false, no alphabetizing will be applied. This is useful, for example, if you want to pull the to 50 most searched terms but display them alphabetized rather than in order of how many searches have been performed for each.
{pages}
-
var (required)
The name of the template variable that the page data will be loaded into
category (optional)
The category name or ID number of the category that you want to load pages for. If you leave this option out, all pages will be loaded. If you set this to 0, the pages assigned to display MIXED galleries will be loaded.
tags (optional)
Use this option to specify a boolean mode search term in the tags assigned to pages. Here are some examples:
-
tags=main
Pull pages that have the word main in their tag list
tags=movies videos
Pull pages that have either the word movies or videos in their tag list
tags=+movies +main
Pull pages that have both the word movies and main in their tag list
tags=movies -main
Pull pages that have the word movies but not the word main in their tag list
urlcontains (optional)
Use this option to specify a string that must appear in the page URL in order for it to be pulled. Here are some examples:
-
urlcontains=movies
Pull pages that have the string movies in the page URL
urlcontains=.shtml
Pull pages that have the string .shtml in the page URL (useful for pulling pages with a specific file extension)
amount (optional)
Specify a numerical value to limit the number of pages that are pulled.
{categories}
-
var (required)
The name of the template variable that the categories will be loaded into
order (optional, defaults to name)
The order in which the categories will be displayed. The following order options are available:
name | Sort alphabetically by the category name |
galleries |
Sort by the total number used and approved galleries in this category |
used |
Sort by the total number used galleries in this category |
clicks |
Sort by the total number of clicks that the used galleries in this category have received |
build_counter |
Sort by total number of builds that the used galleries in this category have gone through |
RAND() | Sort randomly |
All of these values can be modified with DESC to sort in descending order instead of ascending order. Additionally, these values may be combined together to generate sub-sorting options. Here are a few examples: |
|
galleries DESC | Sort by number of used and approve galleries, from most to least |
clicks DESC | Sort by the total number of clicks that the used galleries in this category have received, from most to least |
clicks/build_counter DESC | This will generate an average productivity value for the galleries in this category and then sort the categories based on which has the highest average productivity, from most to least. |
amount (optional, defaults to all)
The maximum number of categories to load, or the string "all" if you want to load all categories
exclude (optional)
A comma separated list of category names to exclude from being selected
startswith (optional)
A single character or string that the category name must start with in order to be pulled for display
The select option is intended for advanced users who are comfortable writing MySQL queries and have a decent knowledge of the
TGPX database structure and internals.
select (optional)
Use this option to specify the exact SQL query that will be used to pull categories from the database. If you specify this option, it will override all of the other settings except the var setting.
{galleries}
-
var (required)
The name of the variable that the galleries will be loaded into. This variable name will be used later with a {foreach} template function to actually display the galleries.
fillvar (optional)
This setting can be used to pull filler galleries if a previous {galleries} section did not pull the full amount specified. Set this value to the variable name from the previous {galleries} directive. If that previous variable does not have at least the amount value you have specified in this {galleries} function, galleries will be pulled in this {galleries} section to fill in the empty spots from the previous galleries section. See the filler_galleries.txt example template for an example of using this option.
preview (optional, defaults to any)
true, false or any. Setting this to false will only allow galleries that do not have a preview thumbnail. Setting this to true will only allow galleries that have a preview thumbnail. Setting this to any will allow any gallery no matter if it has a preview thumbnail.
type (optional, defaults to submitted)
submitted, permanent or any. Setting this to submitted will allow only galleries of type Submitted to be pulled for display. Setting this to permanent will allow only galleries of type Permanent to be pulled for display. To display either permanent or submitted galleries use any.
format (optional, defaults to any)
pictures, movies or any. Setting this to pictures will allow only Picture galleries to be pulled for display. Setting this to movies will allow only Movies galleries to be pulled for display. Setting this to any will allow both Pictures and Movies galleries to be pulled for display.
category (optional, defaults to MIXED)
Use this option to restrict which categories can be pulled from the database. If you want any category to be allowed, used the keyword MIXED. If you want a specific category to be pulled, list the category name exactly as it appears in the Manage Categories interface. You may also use a list of several categories by separating each category by a comma. To exclude a category, prefix it's name with a - character. Here are some examples:
-
category=Hardcore
Pull only galleries in the Hardcore category
category=Hardcore,Fetish,Amateur
Pull only galleries in the Hardcore, Fetish, or Amateur categories
category=MIXED,-Fetish
Pull galleries from any category except the Fetish category
MIXED has a special meaning on pages that have been assigned to a specific category. On those pages, only galleries from the category to which the
page is assigned will be displayed. The software will automatically convert MIXED to the appropriate category!
amount (required)
Use this option to specify how many galleries to load into the specified variable.
sponsor (optional, defaults to any)
Set this to any or a specific sponsor name. Use this option to restrict which sponsors can be pulled for display. If you want any sponsor to be allowed, you can either leave this option out or set it to any. If you want a specific sponsor to be pulled for display, list the sponsor name exactly as it appears when you assigned it to one or more galleries. You may also use a list of several sponsors by separating each sponsor by a comma. To exclude a sponsor, prefix it's name with a - character. Here are some examples:
-
sponsor=PlatinumBucks
Pull only galleries from the sponsor PlatinumBucks
sponsor=PlatinumBucks,EasyCash,MakinMoney
Pull only galleries from the PlatinumBucks, EasyCash, or MakinMoney sponsors
any,-EasyCash
Pull galleries from any sponsor except the EasyCash sponsor
Use this option to specify what gallery weights can be pulled for display. You can use any type of comparison operator here, followed by the weight value that you want to restrict. Below are all of the comparison options you can use. Note that you are not restricted to using 10, that is only there as an example. You can use any valid weight value in it's place.
-
weight="= 10"
Pull galleries that have a weight of exactly 10
weight="!= 10"
Pull galleries that have a weight which is anything except 10
weight="> 10"
Pull galleries that have a weight greater than 10
weight="< 10"
Pull galleries that have a weight less than 10
weight=">= 10"
Pull galleries that have a weight greater than or equal to 10
weight="<= 10"
Pull galleries that have a weight less than or equal to 10
previewsize (optional, only takes affect when the preview attribute is set to true)
Use this option to restrict the dimensions of preview thumbnails that will be pulled for display. This value must be in WIDTHxHEIGHT format. Here are some examples:
-
previewsize=100x100
Pull galleries that have a preview thumbnail of size 100 width and 100 height
previewsize=120x150
Pull galleries that have a preview thumbnail of size 120 width and 150 height
true or false. Use this option to specify whether or not galleries which have already been displayed on other pages can be pulled for display again on this page. This setting will override the globaldupes setting of the {define} function. If you set this to true, repeats will be allowed. Setting this to false means that no repeats will be allowed.
pagedupes (optional, defaults to the pagedupes setting of the {define} directive)
Use this option to specify whether or not galleries which have already been displayed on this page can be pulled for display again on this page. This setting will override the pagedupes setting of the {define} directive. If you set this to true, repeats will be allowed. Setting this to false means that no repeats will be allowed.
order (optional, defaults to date_approved)
Use this option to specify how you want the galleries sorted when they are pulled from the database. This sorting method will be used for Build With New type builds. All of the available sorting options are described below.
tx_galleries.gallery_id | The gallery's assigned ID number |
weight | The gallery's assigned weight |
clicks | The number of clicks the gallery has received (must have click tracking enabled) |
thumbnails | The number of thumbnails on the gallery |
date_added | The date and time that the gallery was added to the database |
date_approved | The date and time that the gallery was approved |
date_displayed | The date and time that the gallery was selected for display |
times_selected | The number of times the gallery has been selected from the approved queue for display |
used_counter | A counter that increments for all galleries that are used during a page build. |
build_counter | A counter that increments for all Used and Holding galleries each time a page build is done. |
RAND() | Sort randomly |
All of these values can be modified with DESC to sort in descending order instead of ascending order. Additionally, these values may be combined together to generate sub-sorting options. Here are a few examples: |
|
clicks DESC | Sort by number of clicks each gallery has received, from most clicked to least clicked |
date_displayed DESC | Sort by the date and time the gallery was selected for display, from newest to oldest |
DATE(date_displayed) DESC, clicks DESC | Sort by the date the gallery was selected for display, then by the number of clicks the gallery has received. Galleries with the same display date will be grouped together with the most clicked galleries in each date at the top of their associated date group. |
clicks/used_counter DESC | This will generate a productivity value for each gallery and sort the galleries from highest productivity to lowest productivity |
weight * RAND() DESC | This will sort galleries by their assigned weight multiplied by a random number. Galleries with a larger weight will have a better chance of being displayed before galleries that have a lower weight. |
reorder (optional, defaults to date_displayed DESC, date_approved)
Use this option to specify how you want the galleries sorted when they are pulled from the database. This sorting method will be used for Build type builds. All of the available sorting options are the same as those you can use for the order option and are described above.
minage (optional)
Use this to specify the minimum age of galleries that can be pulled for display. If you are using this value, it should be a non-negative integer. For example, setting this to 1 means that the gallery must be at least one day old to be pulled for display. Valid values start from 0 for today and continue upwards: 1 for yesterday, 2 for 2 days ago, etc.
maxage (optional)
Use this to specify the maximum age of galleries that can be pulled for display. If you are using this value, it should be a non-negative integer. For example, setting this to 5 means that the gallery must be at most 5 days old to be pulled for display. Valid values start from 0 for today and continue upwards: 1 for yesterday, 2 for 2 days ago, etc.
age (optional)
Use this value to specify an exact age of galleries that can be pulled for display. If you are using this value, it should be a non-negative integer. For example, setting this to 2 means that the gallery must be exactly 2 days old to be pulled for display. Valid values start from 0 for today and continue upwards: 1 for yesterday, 2 for 2 days ago, etc. This option cannot be used if you are using the maxage or minage options
getnew (optional, defaults to true)
true or false. Use this value to specify if new galleries should be pulled for display. When this value is set to true, galleries with Approved status will be pulled for display when a Build With New type of build is done. When this value is set to false, galleries that have previously been selected for display from Approved status will be pulled for display.
allowused (optional, defaults to true)
true or false. Use this value to specify if previously used galleries should be allowed in this section even when the getnew option is set to true and a Build With New type of build is being executed. When this value is set to true, previously used galleries will be pulled for display if there are not enough Approved galleries available to meet the amount requirement when a Build With New type of build is done.
description (optional, defaults to false)
true or false. Use this value to specify if galleries must have a description to be pulled for display. Set this value to true to require that every gallery pulled for display have a defined description, or false if a description is not required.
keywords (optional)
Use this option to specify a boolean mode search term in the keywords assigned to a gallery. Here are some examples:
-
keywords=blonde
Pull galleries that have the word blonde in their keyword list
keywords=blonde lesbian
Pull galleries that have either the word blonde or lesbian in their keyword list
keywords=+blonde +lesbian
Pull galleries that have both the word blonde and lesbian in their keyword list
keywords=blonde -lesbian
Pull galleries that have the word blonde but not the word lesbian in their keyword list
tags (optional)
Use this option to specify a boolean mode search term in the tags assigned to a gallery. This works exactly like the keywords option but searches in the gallery tags instead.
partner (optional)
Use this option to specify a partner account username whose galleries can appear in this section. If you use this option, only galleries from the specified partner account can be pulled for display in this section.
The select and reselect options are intended for advanced users who are comfortable writing MySQL queries and have a decent knowledge of the
TGPX database structure and internals.
select (optional)
Use this option to specify the exact SQL query that will be used to pull galleries from the database during a Build With New type of build. If you specify this option, it will override all of the other settings except the var and reselect settings.
reselect (optional)
Use this option to specify the exact SQL query that will be used to pull galleries from the database during a Build type of build. If you specify this option, it will override all of the other settings except the var and reselect settings.
{intermix}
The {intermix} function has three attributes which must be set:
-
var
The variable name that the mixed arrays will be assigned to. The two original arrays will remain unchanged, while the results of this function will be stored in the variable you specify for this attribute. You can then use the {foreach} template function to loop over the contents of the array generated by this function.
from
The names of two array variables separated by a comma.
location
This will specify how the two arrays should be intermixed. There are four possible values you can use for this setting:
-
location=end
Using the end random will append the contents of the second array to the end of the first array.
location=random
Using the keyword random will randomly put items from the second array into the first array, while still maintaining the order of both arrays.
location=+5
Using + followed by a number will put items from the second array into the first array at a consistent interval. Using +5 as an example would put one item from the second array after every 5th item of the first array.
location=5,10,15
Using a comma separated list of numbers will put items from the second array into the first array at the exact positions you specify.
Template Variables
The following section will describe all of the available template variables you can use on your TGP page templates
-
Global Variables For Use Anywhere in Your TGP Page Template
Values defined by the General Settings interface
{$config.install_url} - TGPX installation URL
{$config.preview_url} - The thumbnail URL setting
{$config.from_email} - E-mail Address setting
{$config.from_email_name} - E-mail Name setting
{$config.date_format} - Date Format setting
{$config.time_format} - Time Format setting
{$config.timezone} - Timezone setting
{$config.dec_point} - Decimal Point setting
{$config.thousands_sep} - Thousands Separator setting
Other values
{$total_galleries} - The total number of galleries in the database
{$total_thumbnails} - The total number of thumbnails in the database
{$total_categories} - The total number of categories in the database
{$page_category.name} - The name of the current page's category
{$page_category.category_id} - The ID of the current page's category
{$page_galleries} - The number of galleries linked to from the current page
{$page_thumbnails} - The number of thumbnails on the galleries linked to from the current page {$this_page.page_id} - The ID number of the page being built
{$this_page.page_url} - The full URL of the page being built
{$this_page.tags} - The tags assigned to the page being built
Gallery Data Variables
When you use the {galleries} function to load some galleries into a variable, you will be able to loop over that variable using the {foreach} function. Inside that {foreach} function you will be able to access the values for each gallery. Assuming you use the name $gallery for the var attribute of the {foreach} function, those available values are:
Remember, you may not always be using the $gallery prefix to access the gallery data. The specific value you use will
depend on the var attribute of the {foreach} function that is being used to loop over the array. For example, if you use
this {foreach} function:
{foreach var=$gal from=$galleries}
You would need to replace $gallery in each of the below values with $gal
{foreach var=$gal from=$galleries}
You would need to replace $gallery in each of the below values with $gal
{$gallery.gallery_id} - The gallery's ID number
{$gallery.gallery_url} - The gallery URL
{$gallery.description} - The gallery description
{$gallery.keywords} - The keywords assigned to the gallery
{$gallery.thumbnails} - The number of thumbnails that appear on the gallery
{$gallery.email} - The e-mail address associated with the gallery
{$gallery.nickname} - The name/nickname associated with the gallery
{$gallery.weight} - The gallery's assigned weight
{$gallery.clicks} - The number of clicks the gallery has received
{$gallery.submit_ip} - The IP address of the gallery submitter
{$gallery.gallery_ip} - The IP address of the gallery itself
{$gallery.type} - The type of gallery, either submitted or permanent
{$gallery.format} - The format of the gallery, either pictures or movies
{$gallery.date} - The date and time that the gallery was selected for display
{$gallery.partner} - The username of the partner account that submitted the gallery
{$gallery.has_recip} - A flag to indicate if the gallery has a reciprocal link to your site; 1 for yes, 0 for no
{$gallery.has_preview} - A flag to indicate if the gallery has one or more preview thumbnails; 1 for yes, 0 for no
{$gallery.times_selected} - The number of times the gallery has been selected for display from approved status
{$gallery.used_counter} - The number of times the gallery has been used during a build
{$gallery.build_counter} - The number of builds that have occurred since the gallery was selected for display
{$gallery.tags} - The tags assigned to the gallery
{$gallery.category} - The category name that this gallery is assigned to
{$gallery.categories} - All of the categories assigned to this gallery (array value, available only on MIXED pages)
{$gallery.icons} - An array of icons assigned to the gallery
{$gallery.preview_url} - The full URL to the preview thumbnail for this gallery, if it has one
{$gallery.preview_width} - The width of the preview thumbnail, if it has one
{$gallery.preview_height} - The width of the preview thumbnail, if it has one
{$gallery.report_url} - The full URL to the report.php script to report this gallery as broken, cheating
{$gallery.sponsor} - The name of the sponsor assigned to this gallery
{$gallery.sponsor_url} - The URL of the sponsor assigned to this gallery
In addition to these default values, all of your user defined gallery fields will be available from this template value as well. So, for example, if you create a user defined field with the name icq_number you can access this value using {$gallery.icq_number}
Category Values
When you use the {categories} function to load some categories into a variable, you will be able to loop over that variable using the {foreach} function. Inside that {foreach} function you will be able to access the values for each category. Assuming you use the name $category for the var attribute of the {foreach} function, those available values are:
Remember, you may not always be using the $category prefix to access the category data. The specific value you use will
depend on the var attribute of the {foreach} function that is being used to loop over the array. For example, if you use
this {foreach} function:
{foreach var=$cat from=$categories}
You would need to replace $category in each of the below values with $cat
{foreach var=$cat from=$categories}
You would need to replace $category in each of the below values with $cat
{$category.name} - The name of this category
{$category.galleries} - The total number of used and approved galleries in this category
{$category.used} - The total number of used galleries in this category as of the last build
{$category.clicks} - The total click count for the galleries in this category
{$category.build_counter} - The total build_counter value for all galleries in this category
{$category.page_url} - The URL to the first page in this category (the page with the lowest build number assigned to this category)
Page Values
When you use the {pages} function to load some pages into a variable, you will be able to loop over that variable using the {foreach} function. Inside that {foreach} function you will be able to access the values for each page. Assuming you use the name $page for the var attribute of the {foreach} function, those available values are:
Remember, you may not always be using the $page prefix to access the page data. The specific value you use will
depend on the var attribute of the {foreach} function that is being used to loop over the array. For example, if you use
this {foreach} function:
{foreach var=$p from=$pages}
You would need to replace $page in each of the below values with $p
{foreach var=$p from=$pages}
You would need to replace $page in each of the below values with $p
{$page.page_url} - The full URL to the page
{$page.name} - The name of the category this page is assigned to (this will be empty for MIXED pages)
Search Values
When you use the {searches} function to load search terms into a variable, you will be able to loop over that variable using the {foreach} function. Inside that {foreach} function you will be able to access the values for each search term. Assuming you use the name $search for the var attribute of the {foreach} function, those available values are:
Remember, you may not always be using the $search prefix to access the search data. The specific value you use will
depend on the var attribute of the {foreach} function that is being used to loop over the array. For example, if you use
this {foreach} function:
{foreach var=$s from=$searches}
You would need to replace $search in each of the below values with $s
{foreach var=$s from=$searches}
You would need to replace $search in each of the below values with $s
{$search.term} - The search term
{$search.searches} - The number of searches done for this term
{$search.font_size} - The font size (in percent) to use for the search term (useful for tag clouds)