5.2. Classifieds

Top  Previous  Next

□

input_form.tpl - the template for adding classifieds of any type (by default)

•

Local variables:

o

$errors -  the associated array where keys include coding of errors and values include additional text data

o

$listing_package_id  -  listing package ID  

o

$listing_type_id  -  listing type ID

o

$form_fields  -  the array contained information about form fields. Each element is the associated array where keys include captions of field properties and values include values of these properties.  

Field properties:

▪

id  -  field ID

▪

caption  -  field caption

▪

is_required - shows whether a field is required or not

•

Used functions:

o

{input} -  displays the input field for a property

Parameters:

▪

property  -  property ID

▪

template  -  a name of a template for a field

o

{include} -  includes another file

Parameters:

▪

file - the name of included file

 

□

activate_listing.tpl - this template displays errors during activation or the message about successful activation

•

Local variables:

o

$errors -  the associated array where keys include coding of errors and values include additional text data

 

□

add_listing_success.tpl - displays information after a listing was successfully added

•

Local variables:

o

$listing_sid - listing SID

o

$no_more_active_listing  -  shows that a user can't activate listings anymore      

o

$is_free  -  shows that listing activation is free

 

□

edit_listing.tpl - the template to edit listing

•

Local variables:

o

$errors -  the associated array where keys include coding of errors and values include additional text data

o

$listing_package_id  -  listing package ID  

o

$listing_type_id  -  listing type ID

o

$form_fields  -  the array contained information about form fields. Each element is the associated array where keys include captions of field properties and values include values of these properties.  

Field properties:

▪

id  -  field ID

▪

caption  -  field caption

▪

is_required - shows whether a field is required or not

•

Used functions:

o

{input} -  displays the input field for a property

Parameters:

▪

property  -  property ID

▪

template  -  a name of a template for a field

o

{include} -  includes another file

Parameters:

▪

file - the name of included file

 

□

choose_listing_sid.tpl - offers to choose listing SID for displaying

•

Local variables:

o

$listing_sids - the array contained SIDs of all listings in the system

Array keys:

▪

sid  -  listing SID

 

□

error.tpl - displays system errors

•

Local variables:

o

$errors - the associated array where keys include coding of errors and values include additional text data

 

□

field_errors.tpl - displays errors of  filling in form fields

•

Local variables:

o

$errors -  the associated array where keys contain coding of errors and values contain additional text data

 

□

add_listing_choose_listing_type.tpl - offers to choose listing type for adding

•

Local variables:

o

$listing_types_info - the array contained information about a listing type where keys are ID of properties and values are values  

Keys:

▪

id  - type ID

▪

sid  -  type SID

▪

name  - a name of a type

▪

input_form_template  -  the input form template for a type

▪

display_form_template  -  the display form template for a type

 

□

search_form.tpl - displays search form

•

Local variables:

o

$form_fields  -  the array contained information about form fields. Each element is the associated array where keys include captions of field properties and values include values of these properties.  

Field properties:

▪

id  -  field ID

▪

caption  -  field caption

▪

is_required - shows whether a field is required or not

•

Used functions:

o

{search} -  displays the search field for a property

Parameters:

▪

property  -  property ID

▪

template  -  a name of a template for a field

 

□

search_results.tpl - displays search results

•

Local variables:

o

$listings_sids  -  the array contained SID of found listings  

•

Used functions:

o

{display} -  displays the property value

Parameters:

▪

property  -  property ID

▪

object_sid  - SID of the object that a property belongs to

▪

template  -  a name of a template for a field

 

□

listing_package_choice.tpl - allows to choose a package for listing adding

•

Local variables:

o

$listing_packages  -  the array contained information about a package

Keys:  

▪

id  -  package ID

▪

name  -  package name

 

□

my_listings.tpl - allows to choose a type of listings belonged to a user and edit / activate / deactivate / delete them

•

Local variables:

o

$show_results  -  shows whether the results need to be displayed or not

o

$listings_sids  -  the array contained SID of found listings

•

Used functions:

o

{display}  -  displays the property value

Parameters:  

▪

property  -  property ID

▪

object_sid  -  SID of the object that a property belongs to

▪

assign  -  saves the value returned by a function in a variable

▪

template  -  a name of a template for a field

o

{search}  -  displays the search field for a property

Parameters:  

▪

property  -  property ID

▪

template  -  a name of a template for a field

 

□

display_listing.tpl - displays information about listing

•

Local variables:

o

$form_fields  -  the array contained information about form fields. Each element is the associated array where keys include captions of field properties and values include values of these properties.  

Field properties:

▪

id  -  field ID

▪

caption  -  field caption

▪

is_required - shows whether a field is required or not

 

□

edit_picture.tpl - edits picture caption

•

Local variables:

o

$picture_sid  -  picture SID

o

$listing_sid  -  listing SID

o

$picture  -  information about a picture (thumbnail_url, picture_url, caption)

 

□

manage_listing.tpl - the page of listing management

•

Local variables:

o

$errors  -  the array contained errors (PARAMETERS_MISSED, WRONG_PARAMETERS_SPECIFIED, NOT_OWNER)

o

$listing  -  information about a listing

o

$user  -  information about a user

 

□

manage_pictures.tpl -  the page of picture management

•

Local variables:

o

$field_errors  -  the array of errors for edit form fields where keys contain coding of errors and values contain additional text data

o

$errors  -  the array contained errors (PARAMETERS_MISSED, WRONG_PARAMETERS_SPECIFIED, NOT_OWNER)

o

$listing  -  information about a listing

o

$pictures  -  the array where each element contains information about a picture

 

□

save_listing.tpl -  informs that a listing was saved successfully

•

Local variables:

o

$error  -  displays error if the listing which had to be saved is not specified

 

□

saved_listings.tpl -  view and deleting of saved listings; if there are no saved listings then the corresponding message will be displayed

•

Local variables:

o

$saved_listing_sid  -  the array of saved listings SID

 

□

save_search_form.tpl -  displays the form of search saving (it is necessary to specify a name  of a saved search)

•

Local variables: no

 

□

save_search_success.tpl -  displays the message that a search was saved successfully

•

Local variables: no

 

□

saved_searches.tpl -  management (view and deleting) of saved searches; the interface for   management of notifications about new listings corresponded to parameters of saved search is available for authorized users

•

Local variables:

o

$saved_searches  -  the array contained information about saved searches

o

$user_logged_in  -  this flag means whether a user is authorized or not

 

 

□

featured_listings.tpl -  this template is used to display the featured listings block

•

Local variables:

o

$listings - array of featured listing structures

o

$number_of_cols - number of listings horizontally

o

$number_of_rows - number of listings vertically

 

 

□

browse_items_and_results.tpl -  this template is used to display browsing components and browsing results

•

Local variables:

o

$browse_level - current browsing level, '1' corresponds to the first level

o

$browse_values - the list of  browsing parameter values composed of URL data

o

$browseItems - the list of browsing items, where each item is a structure:

▪

caption  -  unique in the list of property values

▪

url  -  SEO friendly values to pass them to browsing parameters (URL)

▪

count  -  number of listings corresponded to browsing criteria

•

Note:

o

to display browsing results, the 'search_results.tpl'  template is used

o

to display errors, the 'error.tpl'  template is used