PDA

View Full Version : How to moderate new thread on certain condition


random1231231231
04-25-2014, 06:20 AM
Removed

kh99
04-25-2014, 07:54 AM
I haven't haven't had a chance to test this, but I think if you use hook location newpost_process you can use code like this:

if ($type == 'thread' AND $post['visible'] AND !can_moderate($foruminfo['forumid']))
{
if (strpos($post['message'], 'viagra') !== false)
{
$dataman->set('visible', 0);
$post['visible'] = 0;
}
}