View Full Version : Listings order

September 22, 2013, 11:45 AM
Hello there,

I've 3 types of paid accounts on the escort website:


The Gold account have the "featured" option, so they will stay always on top of the pages.

The Silver and Bronze don't have the "featured" option, so they come out at the bottom. I would like to show the Silver escorts, before the Bronze escorts. How can I do that? I really appreciate your help guys, I'm blocked on these fussy things. Bye!

September 26, 2013, 10:14 AM
If I understand correctly it will help you.

Open the file /includes/classes/rlListings.class.php
(!) Before you change the files, back up the files to be modified.

OK, let's try to implement this feature ;)

function getListingsByAccount [line: ~726]
Find the code below:

$sql .= "IF(TIMESTAMPDIFF(HOUR, `T1`.`Featured_date`, NOW()) <= `T4`.`Listing_period` * 24 OR `T4`.`Listing_period` = 0, '1', '0') `Featured` ";

And replace to:

$sql .= "IF(TIMESTAMPDIFF(HOUR, `T1`.`Featured_date`, NOW()) <= `T4`.`Listing_period` * 24 OR `T4`.`Listing_period` = 0, '1', '0') `Featured`, ";
$sql .= "IF(`T2`.`Key` = 'your_plan_key_here', 1, 0) `Silver` ";

The same function slightly below: [line ~775]
Add the code that is highlighted in bold green.

$sql .= "ORDER BY `Featured`, `Silver` DESC ";

P.S. Don't forget replace: your_plan_key_here

FAQ: Where i can find the plan key?
- Admin Panel > Listing Plans >> Edit plan; Look on first field Key