How to modify the search. php page in discuz7.2

Source: Internet
Author: User
Modify search in discuz7.2. on the php page, I want to modify the search in discuz. the php page search type is not the original title and full-text search, but must be changed to post and user, that is, to search all posts that match the post + keyword, another is to search all posts under the user + keyword. How to modify it? in a hurry !!!!!!! ------ Solution ---------- modify the search. php page of discuz 7.2
Ladies and gentlemen, I want to modify the search in discuz. the php page search type is not the original title and full-text search, but must be changed to post and user, that is, to search all posts that match the post + keyword, another is to search all posts under the user + keyword. How to modify it? in a hurry !!!!!!!

------ Solution --------------------
You can learn from Baidu and use keywords in special formats to cut words. for example, if you want to search for topics related to the "user group" published by the admin user, you can enter "user :( admin) user group ", then, perform regular expression processing on $ keyword to obtain the username and keywords, and then spell SQL. You cannot simply search for the "admin user group" as this way, which makes it very difficult to process the program.
------ Solution --------------------
No 7.2 code modification is nothing more than the files in source \ module \ search. check that your search corresponds to that module.
------ Solution --------------------
Block a piece of code in search. php ..

// If ($ allowsearch = 2 & $ srchtype = 'fulltext '){
// Periodscheck ('searchbanperiods ');
//} Elseif ($ srchtype! = 'TITLE '){
// $ Srchtype = 'title ';
//}

Related Article

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.