#2 Mar 20, 2012 09:07
1) Which hook is best used for field validation and display errors on the form? I tried to do it on BeforeCommentFormInsert() but the error is displayed on a different page. Is checking values in $_POST the correct way to check user input?
2) This is totally unrelated, but I was testing out GetSpamKarmaForComment(), just put a single dummy line; return 100 in this function. Shouldn't the comment always be treated as spam when this is the case? But the comment was able to submit through and was saved into database. Is there a way to prevent this from happening if it's 100? Or this is the wrong hook to use?
You need to configure Antispam setting for delete threshold in order to use karma. Make sure it's < 100, e.g. 99