View Full Version : sort order of ads when ''all ads'' ...
February 14th, 2008, 12:30 PM
How do I change the default order of showed ads when the ''all ads'' link is clicked?
Also where do I change number of ads per page?
February 14th, 2008, 03:10 PM
If you use all ads your not sorting by a category hense you can not set a default sort therefore it defaults to the default sort in the code which is latest. You can edit the code and change the 2 to a different number. As far as perpage thats a number multiplied by the number of rows you show so 4 rows is 12 and 5 is 15. You can look also in showcat.php and change the 2x 3x 4x to higher numbers like 5x 6x 7x etc.
if ( empty($sort) )
$sortparam = ( isset($catsortorder) && $catsortorder > 0 ? $catsortorder : 2 );
$sortparam = $sort;
February 14th, 2008, 03:50 PM
Ok thanks Chuck, althought I did not have any problems changing default number of ads I still cannot change the default sort order for ''all ads''. My showcat file shows $catsortorder : 2 but the ads are actually default sorted by ''most views''...
February 14th, 2008, 03:55 PM
well change the 2 to some other sort number, The default sort if no sort is defined is 2 as noted in the code I posted.
February 14th, 2008, 04:03 PM
Perfect ''1'' means most recent. Thanks Chuck!
February 14th, 2008, 04:39 PM
;) Glad you got it sorted
June 9th, 2008, 03:37 AM
Perfect - just was looking for this.
June 9th, 2008, 09:15 AM
Glad this helped have a good day and keep cool. It is 100 on the east coast today ;)
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.