+ Reply to Thread
Results 1 to 5 of 5

Thread: Display listings new to old

  1. #1

    Display listings new to old

    Where do I change the listing order so it displays from new to old? Currently, new listings are sent to the last page.

    thank you

  2. #2
    Hello,

    FTP > includes > rlListings.class.php - find function getListings( and in this function find $sql .= ", `ID` DESC "; and replace on $sql .= ", `ID` ASC ";
    FTP > includes > rlSearch.class.php - find function search( and in this function find $sql .= ", `T1`.`ID` DESC "; and replace on $sql .= ", `T1`.`ID` ASC ";

    Thanks.
    Last edited by Dmitry; January 11, 2013 at 03:14 AM.

  3. #3
    I tried the suggestions above and it didn't work. This is how I currently have:

    function getListings( $category_id = false, $order = 'id', $order_type = 'ASC', $start = 0, $limit = 10 )
    {


    Could you tell me what is preventing the listings from displaying new to old?

    thank you

  4. #4
    Anyone? I need to display listings from new to old, and it's currently not in this order.

    thanks for your time.

  5. #5
    Guru
    Join Date
    Jan 2013
    Location
    Australia
    Posts
    2,028
    Quote Originally Posted by huyhnh12 View Post
    Anyone? I need to display listings from new to old, and it's currently not in this order.
    thanks for your time.
    I do not know if this will help you or if it is what you want but I have have added sort by date posted to the listings, this allows the user to select that option, keep in mind it will preference featured item first ( from what I can see )

    To do this go to listing fields and create a new listing field called < date created > or what ever suits, then in the key section add < posted_date > / check your language file first but should be fine ? then uncheck add a page and just leave the detail page option ticked. For the field data you can just select a dropdown box then leave everything else and save it.

    From there in you forms add it anywhere on the submit form ( right up the top is fine ) / you will need to add it here so you can then choose it to add to the top of the short form which will allow it to be shown as in the example below. ( you can remove it from the submit form now if you want to )

    date sort.jpg
    Last edited by Pete Young; March 12, 2013 at 03:54 AM.
    Getting Started or Starting Over with Your Classified Site? then Get Ready Set Fly V 4.7.1 > quietSecrets.net

+ Reply to Thread