Quote:
Originally Posted by kh99
Good point. But changing the hook to newthread_post_start doesn't seem to work. Your second suggestion works except that you have 'iff' at the beginning (is that a typo?).
Checking for $type == 'thread' will allow any characters in reply titles, but the OP does specifically say "thread titles", so maybe that's OK.
Gripi, sorry for any problems this may have caused on your forum. 
|
YA ITS
IF NOT IIF
PHP Code:
if (!preg_match('/^[A-Za-z0-9\s]+$/', $post['title']) AND $type == 'thread')
$errors[] = "Only letters, number, and spaces are allowed in title.";
For newthread_post_start hook we need to modify the code to this
PHP Code:
if (!preg_match('/^[A-Za-z0-9\s]+$/', $vbulletin->GPC[subject]))
standard_error("Only letters, number, and spaces are allowed in title.");