Open submit.php;
1- Find (line 569);
PHP
if ($snippet == "") { $error = 1; $field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['field_snippet']), $lang['field_required']); $msg .= (($msg != "") ? " " : "").$field_error; }
and add after;
PHP
if (!empty($config['max_post_length']) && strlen( $snippet ) > ($config['max_post_length']) ) { $msg .= (($msg != "") ? " " : "").$lang['field_snippet'].": ".$lang['post_too_long']; $error = 1; } if (!empty($config['max_post_length']) && strlen( $article ) > ($config['max_post_length']) ) { $msg .= (($msg != "") ? " " : "").$lang['field_article'].": ".$lang['post_too_long']; $error = 1; }
2- Find (line 747);
PHP
if ($captcha_enable_upload && !captcha_validate($captcha)) { $msg .= (($msg != "") ? " " : "").$lang['captcha_required']; $error = 1; }
and add after;
PHP
if (!empty($config['max_post_length']) && strlen( $snippet ) > ($config['max_post_length']) ) { $msg .= (($msg != "") ? " " : "").$lang['field_snippet'].": ".$lang['post_too_long']; $error = 1; } if (!empty($config['max_post_length']) && strlen( $article ) > ($config['max_post_length']) ) { $msg .= (($msg != "") ? " " : "").$lang['field_article'].": ".$lang['post_too_long']; $error = 1; }
3- Open global.php;
Find (line 180);
You can change it if you like:
PHP
$config['max_post_length'] = '3000'; // leave blank if no check
|