Chabbal wrote:PM me if some mod like this is available...
it would be highly appreciated...
Thanks!
Chabbal wrote:again...Chabbal wrote:PM me if some mod like this is available...
it would be highly appreciated...
Thanks!
Code: Select all
$post_data['post_subject'] = utf8_normalize_nfc(request_var('subject', '', true));
Code: Select all
$post_data['post_subject'] = str_replace(array('..',',,','??','!!'), array('','','',''), $post_data['post_subject']);
This is not a good detecting but, can detect the title containing repetitive "??", "..", "!!",",,"MaLeKo wrote:How about detect if a post contains those repeative signs in title on submitting. if it does, block submitting and return an error message
Code: Select all
$post_data['post_subject'] = utf8_normalize_nfc(request_var('subject', '', true));
Code: Select all
if (str_replace(array('..',',,','??','!!'), array('','','',''), $post_data['post_subject']) != $post_data['post_subject'])
{
$error[] = "Please do not use repetitive characters in your title.";
}