Hi,
Minimum chars only when posting a new topic? I dont want to add this function to replies, possible?
Thanks!
No need to request an extension, just installKevC wrote:going to 3.1 and requesting an extension.
Code: Select all
$error[] = $user->lang['EMPTY_SUBJECT'];
}
Code: Select all
// Check for minimum length of text with URLs excluded and only on new topic
if ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id))
{
$stringg = preg_replace('/\b(https?):\/\/[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i', '', $message_parser->message);
$lengthh = utf8_strlen($stringg);
if (!$lengthh || $lengthh < (int) $config['min_post_chars'])
{
$message_parser->warn_msg[] = (!$lengthh) ? $user->lang['TOO_FEW_CHARS'] : sprintf($user->lang['TOO_FEW_CHARS_LIMIT'], $lengthh, (int) $config['min_post_chars']);
}
}
Code: Select all
if (!$message_length || $message_length < (int) $config['min_post_chars'])
Code: Select all
//Altered statement for replies only, choose the integer of your likings
if (!$message_length || $message_length < 3)