Hi, I need someone to make this code only apply in certain forums and only when a user is making a new topic. // Word needed to post / 4seven / 2010 if(strpos(utf8_normalize_nfc(request_var('message', '', true)), 'MY-MAGIC-WORD') !== false){ $submit = true;} else{ $submit = false;} // Word needed to post / 4seven / 2010 Code (markup): The code goes in posting.php after: // Store message, sync counters if (!sizeof($error) && $submit) { Code (markup): If someone can do this I will be very greatful. Thanks.
// Word needed to post / 4seven / 2010 if($mode != 'post' || !in_array($forum_id, array(1, 2, 3)) || strpos(utf8_normalize_nfc(request_var('message', '', true)), 'MY-MAGIC-WORD') !== false){ $submit = true;} else{ $submit = false;} // Word needed to post / 4seven / 2010 PHP: Replace "array(1, 2, 3)" with an array of ids for the forums you want this to apply to.
OMG. Thank you so much!!!!!!!!!. Is there anyway of making it only apply for the first post (Starting a topic)?
I've got two ideas what you might mean when you say you want "it" to apply when starting a thread. The first being that you want the whole functionality to apply only when starting a new thread which appears not to be the case and the other being maybe you only want the exclusion to apply when it's starting a new thread. Try replacing this $mode != 'post' || !in_array($forum_id, array(1, 2, 3)) Code (markup): with this ($mode == 'post' && !in_array($forum_id, array(1, 2, 3))) Code (markup):
Don't worry. It work before without add or editing anything. If I have another problem or request, I'll post it here. Thanks for all the help Joebert.