Reply to Re: Overwrite error messages

Re: Overwrite error messages new!
by colin, 15 years, 5 months ago
There is no system to overload the error messages in the class. So you have two solutions:

1. You can edit the class, and change the error message, using file_src_size, file_max_size and file_src_name. Do this here:
if ($this->file_src_size > $this->file_max_size ) {
  $this->processed = false;
  $this->error = $this->translate('file_too_big');

2. Catch the error message if processed is false. If the error message returned by the class is equal to "File too big" (or the translated version), you can rewrite it, and complete it using the values file_src_size, file_max_size and file_src_nameReply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important