This topic is locked

Advanced Search Date Drop Down Lists

7/4/2005 4:08:45 PM
PHPRunner General questions
author

Hello,
Is there a way to change years in the date dropdown boxes on the Advanced Search page to just include 2002-2005 - instead of 1955-2055?
Thanks
Regards

Sergey Kornilov admin 7/5/2005

you need to modify function WriteYears in functions.php file for this purpose. See my changes in bold.

function WriteYears($y)

{

global $cYearRadius;

$tm=localtime(time(),true);

$ret='<option value=""> </option>';

for($i=2002;$i<=2005;$i++)

$ret.='<option value="'.$i.'" '.($i==$y?"selected":"").'>'.$i.'</option>';

return $ret;

}

500277 7/5/2005

Sergey Thanks!
The modification works great.
Regards