In the default uchome, you cannot perform fuzzy search for a friend. If you do not know why, you cannot remember the full name of the friend and find the friend from the search, this is very bad for user experience.
After research and modification, the following code can implement the uchome fuzzy search function.
In the cp_friend.php file in source, find the statement in $ wherearr [] in the following code:
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 pagination bug fixes
In use, we found that if the ucenter user searches by time, the page in the list is incorrect, and both ucenter1.5 and 1.6 have this error. I don't know why the official team does not solve this problem. After research, the solution is as follows:
Open user. php under control/admin
Search for 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
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 ); |
You can complete the repair.