The WorksForWeb Community Forums
Welcome to the WorksForWeb community forums. Here you can discuss WorksForWeb products with others and contribute to the rapidly growing WorksForWeb community. Please note that while WorksForWeb staff try to maintain presence on the forums, this is not the most reliable way to contact WorksForWeb staff. In case you require a timely response from WorksForWeb on an issue, please open a support ticket here. For pre-sales questions, please open a sales ticket here.

Welcome, Guest. Please login or register.
February 09, 2012, 12:10:16 AM

Login with username, password and session length
Search:     Advanced search
Added the iLister-related Boards

Rate My Site Boards Added

Merged iAuto and iRealty Support Forums together

Several new tips in the Tips and Tricks section
1,602 Posts in 623 Topics by 1,179 Members
Latest Member: bobsteam
* Home Help Search Login Register
+  The iAuto/iRealty/iLister Support Forum
|-+  iAuto and iRealty v.2.x - 3.x
| |-+  General iRealty Discussions
| | |-+  Sorting Listings in Descending Order by Default
« previous next »
Pages: [1] Print
Author Topic: Sorting Listings in Descending Order by Default  (Read 928 times)
sinkorsurf
Newbie
*

Karma: 0
Posts: 6


View Profile
« on: August 03, 2007, 03:28:10 PM »

I have my search results set to sort by Listing ID. How do I get these results to default to decending order so the newest listings will display first when a visitor lands on the search results page?
Logged
Rodion
Guest
« Reply #1 on: August 13, 2007, 12:36:51 PM »

sinkorsurf ,
to make search results sorted by id descending order by default, you'll need to modify lines 255 - 256 in \system\modules\classifieds\user\functions\db_search.php file.
You should change
Code:
else
$order.='ID';
to
Code:
else {
$order.='ID';
$_REQUEST['sorting'] = 0;
}

That will make search results sorted by id descending order if no sorting parameter is provided.
After that you'll need to set "Default sorting field" for "Not set" for you search forms.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Classified Software by Worksforweb Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!