5.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:

add_listing - allows users to add listings
Parameters:
olisting_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 types
olisting_package_id  - ID of a package. A listing will be added according to this ID
oinput_template - the template of the input form contained listing fields
Used templates:
olisting_package_choice.tpl
oadd_listing_choose_listing_type.tpl
oadd_listing_success.tpl
oinput_form.tpl

 

display_listing - displays listings
Parameters:
olisting_id - the optional parameter, listing ID; if this parameter is not specified, the select-box is displays to choose listing ID
odisplay_template - the name of the template. Information about a listing will be displayed according to this template
Used templates:
ochoose_listing_sid.tpl
odisplay_listing.tpl or the template specified in settings of a listing type

 

search_form - displays listing search forms and search results
Parameters:
olisting_type_id - the optional parameter, listing type ID
orestore - the optional parameter, restore content of form fields
Used templates:
osearch_form.tpl

 

search_results - displays listing search forms and 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 sorting_field - the field for sorting that can be assigned in search results
o sorting_order - the order for sorting that can be assigned in search results
o listings_per_page  - the number of listing per page that can be assigned in search results
o page - the current page of search results
o results_template - according to this template search results will be displayed
Used templates:
osearch_results.tpl

 

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:
olisting_id - listing ID. Payment will be taken for this listing activation or for upgrading the listing to featured   
Used templates: no

 

activate_listing - activates listing according to the payment
Parameters:
opayment_sid - mandatory parameter, payment SID
Used templates:
oactivate_listing.tpl

 

edit_listing - edits listing
Parameters:
olisting_id - mandatory parameter, ID of an edited listing
oedit_template - the template of input form. A listing will be edited according to this template
Used templates:
oedit_listing.tpl

 

my_listings - displays listings of a current user
Parameters:
olistings - listing IDs created by a current user
Used templates:
omy_listings.tpl

 

manage_listing - a page of listing management (Preview, Edit, Pay for Listing)
Parameters:
olisting_id - mandatory parameter, listing ID 
Used templates:
omanage_listing.tpl

 

manage_pictures - edits listing pictures
Parameters:
olisting_id - mandatory parameter, ID of listing (edited pictures belong to this listing)   
ocaption - caption of an edited picture
opicture_id - ID of an edited picture  
Used templates:
omanage_pictures.tpl

 

listing_picture - displays a picture stored in the database
Parameters:
opicture_sid - mandatory parameter, picture SID
o type - if there is a thumb, a thumbnail is displayed, otherwise a picture is displayed. By default, there is a picture
Used templates:
ono

 

edit_picture - edits picture caption
Parameters:
opicture_id - mandatory parameter, ID of an edited picture
olisting_id - ID of listing (a picture belongs to this listing)
opicture_caption - caption that is assigned for an edited picture
Used templates:
oedit_picture.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:
olisting_id - mandatory parameter, ID of a saved listing
Used templates:
osave_listing.tpl

 

 

saved_listings - saved listings management (view, delete)
Parameters:
olisting_id -  ID  of saved listing
Used templates:
osaved_listings.tpl

 

 

save_search - saves a search
Parameters: 
osearch_name - the name that is assigned to a saved search 
Used templates:
o save_search_form.tpl
o save_search_success.tpl

 

 

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:
o saved_searches.tpl

 

 

contact_seller - sending a message to a listing owner
Parameters:
o listing_id - ID of a listing. According to this listing a message will be sent
Used templates:
o contact_seller.tpl

 

 

tell_friend - sending a message about a specified listing to a friend
Parameters:
o listing_id - ID of a listing. According to this listing a message will be sent
Used templates:
o tell_friend.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:
o loan_calculator.tpl

 

 

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.
ofield_id - ID of a listing field. A file will be deleted from this listing field.
Used templates:
o delete_uploaded_file.tpl