Quote:
Originally Posted by kh99
Create a new plugin using hook location newpost_process and this code:
PHP Code:
if (!preg_match('/^[A-Za-z0-9\s]+$/', $post['title'])) $errors[] = "Only letters, number, and spaces are allowed in title.";
|
I think plugin hook should be changed to newthread_post_start
OR
code should be modified to
PHP Code:
iif (!preg_match('/^[A-Za-z0-9\s]+$/', $post['title']) AND $type == 'thread')
$errors[] = "Only letters, number, and spaces are allowed in title.";
Because the present code will check for new reply also. and generally new reply title are like this