Home > Article > Backend Development > Discuz forum’s method to prevent advertising machines
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.