how to change the "Upload" default error messages |
[eluser]himalking[/eluser]
hi, can I change or get every error message when upload using the Upload class so, what I want to do exactly is rather than display Quote:"The file you are attempting to upload is larger than the permitted size" I want to display the allowed size Quote:allowed size 2MB and for example istade of Quote:The filetype is not allowed I want Quote:allowed types (PNG | JPG | GIF) thanx in advance
[eluser]Mantish[/eluser]
Hi hilmaking, I have the same question. Were you able to solve it? Thank you
[eluser]BrokenLegGuy[/eluser]
How to use the upload class: http://ellislab.com/codeigniter/user-gui...ading.html How to use the form validation class (how to create custom error messages): http://ellislab.com/codeigniter/user-gui...ation.html Everything you want to know is on a combination of those two pages. Ed
[eluser]Mantish[/eluser]
Thanks BrokenLegGuy I cannot see how to combine these two libraries. Form validation library let me change the messages for each rule. However, the file uploading library uses another rules for validation. These are the ones that I'd like to change the error message.
[eluser]BrokenLegGuy[/eluser]
[quote author="Mantish" date="1300484567"]Thanks BrokenLegGuy I cannot see how to combine these two libraries. Form validation library let me change the messages for each rule. However, the file uploading library uses another rules for validation. These are the ones that I'd like to change the error message.[/quote] Okay, then I think what you're looking for is this file system/language/[your language]/upload_lang.php and the error messages are there. Let me know. Ed
[eluser]Mantish[/eluser]
[quote author="BrokenLegGuy" date="1300486504"][quote author="Mantish" date="1300484567"]Thanks BrokenLegGuy I cannot see how to combine these two libraries. Form validation library let me change the messages for each rule. However, the file uploading library uses another rules for validation. These are the ones that I'd like to change the error message.[/quote] Okay, then I think what you're looking for is this file system/language/[your language]/upload_lang.php and the error messages are there. Let me know. Ed[/quote] Thanks a lot Ed!!! It worked like a charm. I just needed to check this http://ellislab.com/codeigniter/user-gui...guage.html I copied upload_lang.php from system to application, and edited the file there.
[eluser]BrokenLegGuy[/eluser]
I haven't made it to that section of my "study the documentation" quest. Well I should say I haven't needed to go over that section yet but I think I'm going to look over the language class tonight. You learn something new everyday. Ed |
Welcome Guest, Not a member yet? Register Sign In |