This article to give you a detailed introduction of the uchome in the implementation of fuzzy search and the repair of the page bug some specific methods, you need to know the friend can refer to this article to set.
In the default Uchome, a friend's search can not be blurred search, I do not know why, some people can not remember the full name of a friend can not find the friend in the search, which is very bad for the user experience.
After the research changes the following code can realize Uchome's fuzzy search function.
In the file cp_friend.php in source, find the following statement in the code to modify $wherearr[]:
| The code is as follows |
Copy Code |
if ($searchkey = Stripsearchkey ($_get[' Searchkey ')) { $wherearr [] = "(S.name like '%". ") $searchkey "." % ' OR s.username like '% '. " $searchkey "." %')"; } else { foreach (Array (' uid ', ' username ', ' name ', ' Videostatus ', ' Avatar ') as $value) { if ($_get[$value]) { $wherearr [] = "s. $value = ' {$_get[$value]} '"; } } } |
Search for bug fixes for paging
Users found Ucenter in use if you add time to search, the list of pagination is wrong, ucenter1.5 and 1.6 have this error, do not know why the official does not solve the problem. After research, the solution is as follows:
Open the user.php under Control/admin
Find Code
| The code is as follows |
Copy Code |
$multipage = $this->page ($num, UC_PPP, $_get[' page '], ' admin.php?m=user&a=ls&srchname= '. $srchname. ' &srchregdate= '. $srchregdate); |
Change it to
| The code is as follows |
Copy Code |
$multipage = $this->page ($num, UC_PPP, $_get[' page '], ' admin.php?m=user&a=ls&srchname= '. $srchname. ' &srchregdatestart= '. $srchregdatestart. ' &srchregdateend= '. $srchregdateend); |
can complete the repair.
http://www.bkjia.com/PHPjc/632087.html www.bkjia.com true http://www.bkjia.com/PHPjc/632087.html techarticle This article to give you a detailed introduction of the uchome in the implementation of fuzzy search and the repair of the page bug some specific methods, you need to know the friend can refer to this article to set. In the default ...