hi there, i have a phpBB forum and always get ths stupid spam, even if i have captcha enabled and guest postings disabled. im trying do modify the script so that members with less than 10 postings cant post anything with "[url", "http://", "www" or ".info/" in it. my problem is that i just cant find the code where "insert posting into database" happens (have checked posting.php for "Submit" and "Insert Into"). can someone just point in the right direction please? and is there already an $var which holds the number of postings this user made so far or must i count it by myself?
Try adding a custom security question in your sign up page, this stopped my problem.... 100%... look at my forum: www.soccerod.com The world cup question.
thanks everyone, here is what i did: //spamcheck $text = $post_message; if($userdata['user_posts']<10) { if(strpos($text, "[url")!==false || strpos($text, "http://")!==false || strpos($text, "www")!==false || strpos($text, ".info")!==false) { //get lost! message_die(GENERAL_ERROR, 'Error in posting: You are not allowed to post any websites here at the moment.'); } } //end spamcheck Code (markup): insert this code before $edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : ""; Code (markup): in includes/function_post.php hope this will do it
Thank you for the code falcondriver. However, I was unable to get it to work where you suggested including it. Instead, I placed it in the prepare_post function in the function_post.php file. I also changed the error reporting to: $error_msg .= (!empty($error_msg)) ? '<br />' : ""; $error_msg .= 'Error in posting: You are not allowed to post any websites here at the moment.'; PHP: It does not seem to matter when the code segment is placed inside the function, I put it just before the "// Handle poll stuff" comment. If an error_msg is created, that function does not post the message. It returns the error to the user in the style of the site.