4.2. Classifieds

Top  Previous  Next

The Classifieds module includes all functions related to classified ads management, such as placing, searching and displaying ads.

Module functions:

activate_listing - activates listing according to the payment

Parameters: None

o

payment_id - the ID of a payment

o

level2Field - optional parameter, field ID for the second browsing level

Used templates:

 

 

add_listing - allows users to add listings

Parameters:

o

listing_type_id - the optional parameter pointed at listing ID. If this parameter is not specified, the function returns the list of all the available listing categories

o

listing_package_id  - ID of a package. A listing will be added according to this ID

o

input_template - the template of the input form contained listing fields

Used templates:

 

 

  add_to_comparison - adds listing to the comparison chart

      Parameters: none

      Used templates:

    o   add_to_comparison.tpl

 

 

browse -  browsing listings by any field

Parameters:

o

level1Field - mandatory parameter, field ID for the first browsing level

o

level2Field - optional parameter, field ID for the second browsing level

o

level3Field - optional parameter, field ID for the third browsing level

o

level4Field - optional parameter, field ID for the fourth browsing level

o

level5Field - optional parameter, field ID for the fifth browsing level

o

level6Field - optional parameter, field ID for the sixth browsing level

o

browse_template - template for browsing (by default, browse_items_and_results.tpl )

o

listing_type_id - optional parameter,  ID of a listing type

Used templates:

 

 

clear_comparison - clears comparison chart

      Parameters: none

      Used templates:

    o   clear_comparison.tpl

 

 

 

compared_listings - views comparison chart

      Parameters: none

      Used templates:

    o   compared_listings.tpl

 

 

 

contact_seller - sending a message to a listing owner

Parameters: None

Used templates:

 

 

delete_uploaded_file - deleting an uploaded file of a listing

Parameters:

o

listing_id - ID of a listing. A file will be deleted from this listing.

o

field_id - ID of a listing field. A file will be deleted from this listing field.

Used templates:

 

 

display_listing - displays listings

Parameters:

o

passed_parameters_via_uri - shows if the parameters should be passed to URI

o

listing_id - ID of a listing. A file will be deleted from this listing.

o

display_template - the name of the template. Information about a listing will be displayed according to this template

Used templates:

o

display_listing.tpl or the template specified in settings of a listing type

 

 

edit_listing - edits listing

Parameters:

o

listing_id - mandatory parameter, ID of an edited listing

o

edit_template - the template of input form. A listing will be edited according to this template

Used templates:

 

 

featured_listings - displays featured listings

Parameters:

o

featured_listings_template - the template to display featured listings

o

number_of_rows - number of featured ads to display horizontally

o

number_of_cols - number of featured ads to display vertically

Used templates:

 

 

  featured_listings_rss - RSS channel for the all featured listings

      Parameters: none

      Used templates:

    o featured_listings_rss.tpl

 

 

  last_listings_rss - RSS channel for the last N listings

      Parameters: none

      Used templates:

    o    last_listings_rss.tpl

 

 

loan_calculator - calculate payment for a property on time

Parameters:

o

listing_id - ID of a listing. Terms of payment will be calculated for this listing property.

Used templates:

 

 

make_featured - makes a listing featured

Parameters:

o

listing_id - the ID of the listing

o

payment_id - the ID of the payment

Used templates:

 

 

  manage_calendar - calendar management

      Parameters:

    o show_template - the template to display calendar management

      Used templates:

    o edit_calendar.tpl

 

 

my_listings - displays listings of a current user

Parameters:

o

listing_type_id - the optional parameter, listing type ID

o

sorting_field - a field for sorting by

o

sorting_order - an order of sorting

Used templates:

 

 

pay_for_listing - payment for listing activation. If activation is not free, a new payment is created for listing activation and user is redirected to the payment page. Otherwise, the system activates a listing and displays a message

Parameters:

o

listing_id - listing ID. Payment will be taken for this listing activation or for upgrading the listing to featured  

Used templates:

 

 

print_listing - displays printing-friendly listing details

Parameters:

o

display_template - the name of the template. Information about a listing will be displayed according to this template

Used templates:

 

 

rate_listing - rates listing

      Parameters: none

      Used templates:

    o   rate_listing.tpl

 

 

remove_from_comparison - removes listing from comparison chart

      Parameters: none

      Used templates:

    o   remove_from_comparison.tpl

 

 

save_listing - saves a listing in the cookies or in the database depend on a user (listings will be saved in the database for logged in users and in the cookies for not logged in users)

Parameters:

o

listing_id - mandatory parameter, ID of a saved listing

Used templates:

 

 

save_search - saves a search

Parameters:

o

search_name - the name that is assigned to a saved search

Used templates:

 

 

saved_listings - saved listings management (view, delete)

Parameters:

o

listing_id -  ID  of saved listing

Used templates:

 

 

saved_searches - saved searches management

Parameters:

o

search_id - ID of a search. According to this ID some actions may be done with the search, e.g. delete the search or enable/disable auto notify

Used templates:

 

 

search_form - displays listing search forms

Parameters:

o

listing_type_id - the optional parameter, listing type ID

o

restore - the optional parameter, restore content of form fields

o

form_template - the template for the search form

Used templates:

 

 

search_results - displays search results

Parameters:

o

default_sorting_field - the field that will be used for default sorting

o

default_sorting_order - the order that will be used for default sorting

o

default_listings_per_page - the default number of listings per page

o

results_template - according to this template search results will be displayed

Used templates:

 

 

tell_friend - sending a message about a specified listing to a friend

Parameters: None.

Used templates: