Home  >  Article  >  Backend Development  >  Discuz forum’s method to prevent advertising machines

Discuz forum’s method to prevent advertising machines

巴扎黑
巴扎黑Original
2016-12-19 16:41:541786browse

source/include/post/post_newreply.php: Line 406

source/include/post/post_newthread.php: Line 125

Add content:

//If a verification code is issued, limit the length and content of the post . E If ($ SecoodeCheck) {

if (

message) & gt; 40) {

showMessage ('' New registered user post length limit to 20 Chinese characters! "

} elseif (preg_match (" " /d {5,}/", $ message)) {

// here is matched with numbers, mainly QQ and mobile phone number. S Showmessage ('The content of the system considers you published is advertising, please re -edit!');

} elseif (Stripos ($ message, '.Net')! == False

|| Stripos ($ message, ',' .com') !== FALSE

                                                                                                             || stripos( $message, '.cc') !== FALSE

                                                                                                                                                                          . Add it.

                                                                                                                                                                                          

}

My own is a movie forum. Users usually reply with things like thank you to the original poster for being a good person. Other forums can relax the content length limit appropriately.

After adding this modification, the daily number of psoriasis in my forum dropped from dozens to 0.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn