Implementation of fuzzy search in uchome and fixing of paging bugs

Source: Internet
Author: User
Tags php file

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.