Hi Dinkum, to solve your problem for you:
1) modify file /system/modules/classifieds/config.php
replace
'featured_listings' => array
(
'display_name' => 'Featured Listings',
'script' => 'featured_listings.php',
'type' => 'user',
'access_type' => array('user'),
'params' => array ('featured_listings_template', 'number_of_rows', 'number_of_cols'),
),
to 'featured_listings' => array
(
'display_name' => 'Featured Listings',
'script' => 'featured_listings.php',
'type' => 'user',
'access_type' => array('user'),
'params' => array ('featured_listings_template', 'number_of_rows', 'number_of_cols', 'listing_type_id'),
),
2) modify file /system/lib/classifieds/Listing/ListingManager.php
replace
function getFeaturedListings($number_of_listings) {
$listings_info = DB::query("SELECT * FROM listings WHERE featured = 1 AND active = 1 ORDER BY featured_last_showed ASC LIMIT 0, ?n", $number_of_listings);
$listings = array();
tofunction getFeaturedListings($number_of_listings) {
if(isset($_REQUEST['listing_type_id']))
{
$listing_type_sid = ListingTypeManager::getListingTypeSIDByID($_REQUEST['listing_type_id']);
$listings_info = DB::query("SELECT * FROM listings WHERE listing_type_sid = ?n AND featured = 1 AND active = 1 ORDER BY featured_last_showed ASC LIMIT 0, ?n", $listing_type_sid, $number_of_listings);
}
else
$listings_info = DB::query("SELECT * FROM listings WHERE featured = 1 AND active = 1 ORDER BY featured_last_showed ASC LIMIT 0, ?n", $number_of_listings);
$listings = array();
3) if you show featured listing in template by code
{module name="classifieds" function="featured_listings"}
, add to this construction parametr listing_type_id, for example,
{module name="classifieds" function="featured_listings" listing_type_id="HomesforSale"}
if you show featured listing by call user page, then modify your userpage, in this page added parametr listing_type_id, fill them