Listings
Listings class handles actions specific to listings.
Located in /includes/classes/kernel/Listings.php (line 16)
addFeatures (line 1226)
Updates a listing with new extra options. Like bold, featured, highlighted.
- int $id: The listing id.
- array $data: Array of the selected features
addListing (line 988)
Add Listing
- array $data: An array of listing data
- boolean $admin: Not used.
addListingFields (line 1027)
Add extra fields to a listing
- int $id: The id of the listing
changeDisplay (line 814)
User Change Listing Status
Available options for status is:
- Y: Active
- N: Inactive
- 5: Delete
- str $status: The new status.
- int $id: The listing id to get.
- $orderid
countByUser (line 2059)
Count a specific user's listings
- integer $userid
daysDiff (line 646)
Gets the number of days between two dates
- string $start_date: The starting date
- string $end_date: The ending date
deleteListing (line 925)
Delete Listing
- int $id: The listing id to delete.
- int $userid: Not used if inside admin.
- string $cron: Only used if inside cron file.
deleteUsersListings (line 961)
Delete all UsersListing
- int $userid: The user id to delete.
editListing (line 1114)
Edit Listing
- array $data: An array of listing data
editListingFields (line 1257)
Adds extra fields to a listing when modifying it.
- int $id: The listing id.
extra_listing_fields (line 1776)
Gets extra fields when adding a listing
- int $section: The category the listing is placed in.
extra_listing_fields_validation (line 1940)
Generate javascript validation for extra fields.
- int $section: The category the listing is placed in.
- string $modify: Whether the listing is being modified or added.
getAllListings (line 115)
Gets all listings by the parameters. This method is used anywhere listings are shown in a grid.
Please do not mess with this file if you do not know what you are doing.
- array $options: The search parameters
- integer $current_row: The current page number
- integer $max: The maximum number of rows per page
getCategoryForListing (line 1209)
Get a category based off the listing id.
- int $id: The listing id.
getCategoryNameById (line 675)
Get a category name by its id.
- int $id: The category id.
getExtraField (line 519)
Get Single Extra Field Value. This is useful for using with getAllListings. It allows you to pull out extra fields and dislay them in showlistings.
Example: If you have an extra field with the id of 2:
- int $id: The listing id.
- int $fieldid: The field id.
getListingById (line 29)
Get Listing
Gets a single listing by its ID. Then assigns it to the template class.
- int $id: The listing id to get.
- $action
getListingByOrderID (line 1192)
Get a listing based off an order id.
- int $orderid: The order id.
getListingFields (line 2003)
Get Listing extra fields.
- int $section: The category the listing is placed in.
- $id
getListingImages (line 713)
Get a single listings images
- int $id: The listing id.
getListingsForMember (line 581)
Get listings for a member
- array $options: The search parameters
- integer $current_row: The current page number
- integer $max: The maximum number of rows per page
- $userid
getListingSingleImage (line 760)
Get a single image for a listing
- int $id: The listing id.
getStatusByValue (line 544)
Gets the listings status by its ID
- int $id: The status id.
getUserNameById (line 658)
Gets a users name by their id.
- int $id: The user id.
isFavorite (line 693)
Find out if a listing is a favorite for a user.
- int $id: The listing id.
- int $userid: The user's id.
modify_listing_fields (line 1528)
Gets extra fields when modifying a listing
- int $id: The id of the listing
- int $section: The category the listing is placed in.
removeExtraFields (line 1427)
Update the Search Count. Used when viewing a listing on showlistings.php or searchresults.php
- int $id: The id of the listing
removeImages (line 1444)
- $id
removeOneImage (line 1485)
- $id
setExpiration (line 853)
This sets the expiration for a listing based off the order id.
- int $id: The product id to get.
- int $orderid: The order id to get.
- bool $renewal: True or False if it is a renewal.
- $listingid
updateHitCount (line 1385)
Update the Hit Count. Used when viewing the viewlisting.php file.
- int $id: The id of the listing
updateRepliedCount (line 1364)
Update the replied count for a listing. Used when someone contacts the owner.
- int $id: The id of the listing
updateSearchCount (line 1406)
Update the Search Count. Used when viewing a listing on showlistings.php or searchresults.php
- int $id: The id of the listing

