5.4. Field Types

Top  Previous  Next

IAuto has several field types described below. There are different templates for each field type which are used in:

input forms templates:

Admin Panel -> Site Layout -> Module Templates -> Classifieds engine ->

input_form.tpl

input_form_default.tpl

input_form_car.tpl

listing_type_templates/input/default_input.tpl

listing_type_templates/input/car.tpl

display forms templates:

Admin Panel -> Site Layout -> Module Templates -> Classifieds engine ->

listing_display.tpl

listing_type_templates/display/car.tpl

listing_type_templates/display/default_result.tpl

listing_type_templates/display/car_result.tpl

listing_type_templates/display/default_view.tpl

search forms templates:

Admin Panel -> Site Layout -> Module Templates -> Classifieds engine ->

quick_search.tpl

search_form.tpl

listing_type_templates/search/default_search.tpl

listing_type_templates/search/car.tpl

 

o

boolean.tpl - template for Boolean type

Local variables:

$id  -  field ID

$value  -  field value

 

o

calendar.tpl - template for Calendar type

Local variables:

$listing_sid - the ID of a listing

$months  -  the array of 3 months from current

$mdays - the array of days in a month

$day.wday - a day of a week

$day.status - a status of a day (reserved/free)

$day.is_current - contains the data if the chosen day is current

$day.mday - current day of the month (today)

$GLOBALS.site_url - the global variable containing a full URL of the site

$field_sid - the ID of the Calendar field

$month - current month

 

o

file.tpl - template for File type

Local variables:

$id  -  field ID

$value.file_url  -  the URL to upload a file

$value.file_name -  the file name

$GLOBALS.site_url - the global variable containing a full URL of the site

$listing_id - the id of the listing

$id - the ID of the File field

$value - contains the data if there is a file uploaded to a listing

 

o

float.tpl - template for Float type

Local variables:

$id  -  field ID

$value.not_less  -  the lower value of the field to search

$value.not_more  -  the maximum value of the field to search

$value  -  the value of the field

$signs_num -  the number of decimals signs which are defined for each float-type field in its properties ("Edit" a field)

 

o

geo.tpl - template for Geo type

Local variables:

$id  -  field ID

$value.radius - the search radius distance

$GLOBALS.radius_search_unit - the units for search radius distance which is defined in Admin Panel -> System Configuration -> System Settings -> General Settings -> Radius Search Unit (miles/kilometers)

$value.location - the zip code of the location, which is used as a center for the radius distance search

$select_box_field_distance - the value for search radius distance

$input_text_field_location - the value for the zip code of the location to search from

$value  -  field value

 

o

integer.tpl - template for Integer type

Local variables:

$id  -  field ID

$value  -  field value

 

o

list.tpl - template for List type

Local variables:

$id  -  field ID

$value  -  field value

$list_values  -  the array of all the available values of List type where each element is an array with elements of this value 'id' and 'caption'

 

o

password.tpl - template for Password type

Local variables:

$id  -  field ID

 

o

picture.tpl - template for Picture type

Local variables for input and search forms:

$id  -  field ID

$value.file_url  -  URL for listing pictute$value  -  field value

Local variables for display forms:

$pictures  -  the array where each element contains information about a picture (thumbnail_url, picture_url, caption)

 

o

rating.tpl - template for Rating type

Local variables:

$listing_sid  -  system id of listing

$rating -  listing rating

$count - votes count for listing

$field_sid - system id of field

 

o

string.tpl - template for String type

Local variables:

$id  -  field ID

$value  -  field value

 

o

text.tpl - template for Text type

Local variables:

$id  -  field ID

$value  -  field value

 

o

tree.tpl - template for Tree type

Local variables:

$id  -  field ID

$value  -  field value

$tree_values  -  the key is parent sid, the value is the array of child elements, each of them is the array contained information about an element of the tree (caption, sid, level, order, parent_sid, field_sid)

$tree_depth  -  the number of tree levels

$display_value  -  the list of values (heading) for an element stating from the root  

 

o

tree_level1.tpl - template for Tree type level 1

Local variables:

$id  -  field ID

$value  -  field value

$tree_values  -  the key is parent sid, the value is the array of child elements, each of them is the array contained information about an element of the tree (caption, sid, level, order, parent_sid, field_sid)

$levels_captions  -  the array of elements captions

$tree_depth  -  the number of tree levels

 

o

tree_level2.tpl - template for Tree type level 2

Local variables:

$id  -  field ID

$value  -  field value

 

o

unique_string.tpl - template for UniqueString system type (user name, user group id, etc)

Local variables:

$id  -  field ID

$value  -  field value

 

o

video.tpl - template for Video type

Local variables:

$id  -  field ID

$value.file_name  -  video file name

 

o

boolean.tpl - template for Boolean type

Local variables:

$id  -  field ID

$minimum  -  minimum value

$maximum  -  maximum value

$value  -  field value