Home > Backend Development > C#.Net Tutorial > Discuz forum's method to prevent advertising machines

Discuz forum's method to prevent advertising machines

巴扎黑
Release: 2016-12-19 16:41:54
Original
1807 people have browsed it

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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template