问题已经解决.
下面是替换代码解决方法.
找到\source\function\目录下function_category.php该文件.
代码大约在920行左右.
复制以下代码进行替换
- //首页搜索区
- function searchindex($mod) {
- global $_G;
- $districtsearchlist = array();
- foreach($_G['cache']['category_arealist_'.$mod]['city'] as $aid => $city) {
- $citysearchlist[$aid] = $city;
- }
- $sortarray = $selectarray = array();
- $sorthtml = $selecthtml = $urlhtml = '';
- foreach($_G['cache']['category_sortlist_'.$mod] as $sortid => $sort) {
- $sortarray[$sortid]['name'] = $sort['name'];
- loadcache(array('category_option_'.$sortid));
- $sortoptionarray = $_G['cache']['category_option_'.$sortid];
- $quicksearchlist = quicksearch($sortoptionarray);
- $selectarray[$sortid] = $quicksearchlist;
- }
- return createhtml($sortarray, $selectarray, $citysearchlist);
- }
- function createhtml($sortarray, $selectarray, $citysearchlist) {
- $sorthtml = $selecthtml = $urlhtml = '';
- $displaynone = ' style="display:none;"';
- $firstsortid = 0;
- $sortcount = count($sortarray);
- $sorthtml = '<ul>';
- foreach($sortarray as $sortid => $sort) {
- if(empty($firstsortid)) {
- $firstsortid = $sortid;
- }
- if($sortid == $firstsortid) {
- $classhtml = 'class="a"';
- } else {
- $classhtml = 'class=""';
- }
- $sorthtml .= '<li id="searchsort_'.$sortid.'" '.$classhtml.' style="cursor:pointer;"><span onclick="changesort('.$sortid.', '.$sortcount.')">'.$sort['name'].'</span></li>';
- }
- $sorthtml .= '</ul>';
- foreach($selectarray as $sortid => $quicksearchlist) {
- $selecthtml .= '<div id="searchselect_'.$sortid.'" class="bbda cgs pns pbn cl"';
- if($sortid != $firstsortid) {
- $selecthtml .= $displaynone;
- }
- $selecthtml .= '><form method="post" autocomplete="off" name="searhsort" id="searhsort" action="house.php?mod=list&sortid='.$sortid.'">';
- foreach($quicksearchlist as $optionid => $option) {
- if(($option['type'] == 'select' && $option['choices']) || ($option['type'] == 'range' && $option['choices'])) {
- $selecthtml .= '<span class="ftid"><select name="searchoption['.$optionid.'][value]" id="'.$option['identifier'].'_'.$sortid.'"><option value="0">'.$option['title'].lang('block/categorylist', 'categorylist_any').'</option>';
- foreach($option['choices'] as $id => $value) {
- $selecthtml .= '<option value="'.$id.'">'.$value.'</option>';
- }
- $selecthtml .= '</select></span>';
- $selecthtml .= '<input type="hidden" name="searchoption['.$optionid.'][type]" value="'.$option['type'].'"><script type="text/javascript" reload="1">simulateSelect(\''.$option['identifier'].'_'.$sortid.'\');</script>';
- }
- if($option['type'] == 'text' && !$option['choices']) {
- $selecthtml .= '<input type="hidden" name="searchoption['.$optionid.'][type]" value="'.$option['type'].'"><input type="text" name="searchoption['.$optionid.'][value]" size="15" id="'.$option['identifier'].'_'.$sortid.'" class="px" value="'.$option['title'].'" onclick="$(\''.$option['identifier'].'_'.$sortid.'\').value = \'\'" />';
- }
- }
- $selecthtml .= '<button type="submit" class="pn" name="searchsortsubmit"><em>'.lang('block/categorylist', 'categorylist_submit').'</em></button></form>';
- $selecthtml .= '</div>';
- }
- foreach($selectarray as $sortid => $quicksearchlist) {
- $urlhtml .= '<div class="cgsq ptn pbm" id="url_'.$sortid.'"';
- if($sortid != $firstsortid) {
- $urlhtml .= $displaynone;
- }
- $urlhtml .= '><dl class="cl"><dt>';
- $urlhtml .= lang('block/categorylist', 'categorylist_area').': </dt><dd><ul>';
- foreach($citysearchlist as $did => $city) {
- $urlhtml .= '<li><a href="house.php?mod=list&filter=all&city='.$did.'&sortid='.$sortid.'">'.$city.'</a></li>';
- }
- $urlhtml .= '</ul></dd></dl>';
- foreach($quicksearchlist as $optionid => $option) {
- if(in_array($option['type'], array('select', 'radio')) || ($option['type'] == 'range' && $option['choices'])) {
- $urlhtml .= '<dl class="cl"><dt>'.$option['title'].':</dt><dd><ul>';
- foreach($option['choices'] as $id => $value) {
- $urlhtml .= '<li><a href="house.php?mod=list&filter=all&sortid='.$sortid.'&'.$option['identifier'].'='.$id.'">'.$value.'</a></li>';
- }
- $urlhtml .= '</ul></dd></dl>';
- }
- }
- $urlhtml .= '</div>';
- }
- return array('sorthtml' => $sorthtml, 'otherhtml' => $selecthtml.$urlhtml);
- }
复制代码
从这里开始
//首页搜索区
function searchindex($mod) {
global $_G;
到以下结尾
$selecthtml.$urlhtml);
}
整个部分全部替换..
OK问题解决. |