Support Forums

change listing order to > expiration date

This is a discussion on change listing order to > expiration date within the Technical Support forums, part of the Technical Support Forums category; This question may be related to a resolved thread: http://www.68classifieds.com/forums/...ead.php?t=6360 . Hello again, comming back to a "resolved" question I ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

Reply
 
Thread Tools Display Modes
Old 05-14-2010, 09:49 AM   #1
Customer
 
Join Date: May 2008
Location: Lanzarote/spain
Posts: 71
Rep Power: 11
canariasdata is on a distinguished road
Question change listing order to > expiration date

This question may be related to a resolved thread: renewed listing showing first....

Hello again,

comming back to a "resolved" question I asked a few years ago...

Again I have the problem that renewed listings not show first but stay in their position (ordered by creation date)

Now my question in regard to the last answer:
Where do I change the order of the listings so that they show ordered by expiration date instead of creation date.

Thanks,
Gregor
__________________
4.0.3 Developer
canariasdata is offline   Reply With Quote
Old 05-14-2010, 09:57 AM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,237
Rep Power: 128
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by canariasdata
Now my question in regard to the last answer:
Where do I change the order of the listings so that they show ordered by expiration date instead of creation date.

Thanks,
Gregor
I believe I answered that right above Erics reply.......

/includes/classes/kernal/Listings.php
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 05-14-2010, 01:09 PM   #3
Customer
 
Join Date: May 2008
Location: Lanzarote/spain
Posts: 71
Rep Power: 11
canariasdata is on a distinguished road
Default

Hello Larry,

thanks again!
Obviously, I wasn't reading the old post deaply enough to see the relation between your path and my question, thank you!

Could you plese confirm that the code in question is the following starting line 248 in Listings.php (V.4.0.3):

Code:
	//Sort by
		$sortfield = mysql_real_escape_string(@$_REQUEST['sortfield']);
		$sortorder = mysql_real_escape_string(@$_REQUEST['sortorder']);
		if ($sortfield == '')
		{
			if( !empty($_COOKIE['sortlistings']['sortfield'])) {
				$sortfield=$_COOKIE['sortlistings']['sortfield'];
			} elseif( !empty($options['sortfield']) ) {
				$sortfield=$options['sortfield'];
			} else {
				$sortfield = 'dateadded';
			}
		}
		else
		{
			setcookie("sortlistings[sortfield]", $sortfield, time() + 604800, '/');
		}
		if ($sortorder == '')
		{
			if( !empty($_COOKIE['sortlistings']['sortorder'])) {
				$sortorder=$_COOKIE['sortlistings']['sortorder'];
			} else if( !empty($options['sortorder']) ) {
				$sortorder=$options['sortorder'];
			} else {
				$sortorder = 'desc';
			}
		}
		else
which needs to be changed to:

Code:
}
 else {
				$sortfield = 'expiration';
			}
thanks again,
Gregor
__________________
4.0.3 Developer
canariasdata is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Expiration Date - Not Expired dexignz Technical Support 1 10-19-2008 12:38 PM
Date Added and Expiration Date suav Technical Support 2 09-10-2008 12:48 AM
How to translate expiration date - months archer Technical Support 1 05-17-2008 09:45 AM
Expiration Date goose Technical Support 2 01-01-2008 02:27 PM


All times are GMT -4. The time now is 07:28 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0