Welcome Guest, Not a member yet? Register   Sign In
Notifier Library
#1

[eluser]textnotspeech[/eluser]
Here's another little piece of code I wrote to handle simple notifications. If you haven't noticed, I don't write fancy monolithic libraries, just cute little ones to do a simple job elegantly (at least IMHO). If you don't want to write any more success and error message HTML for your flashdata, this is the library for you.

http://daytonnolan.com/notifier-library-...-extension
#2

[eluser]trice22[/eluser]
Thanks!

Some thoughts on the subject:
I've been playing around with the same kind of library for a while now, but it always bothered me, that I still have to catch CI's status messages like validation errors or upload errors etc. from all over the place.
I'm looking for a tool that catches all errors for me in the BG and allows me to attach my own messages as well. Then everything's pushed out just in the manner your library does it.
This tool could as well check, if the flash data can be used or if the "same page" is reloaded (—anyone an idea on that?) and would offer some a way to display the errors depending on e.g. input IDs and not all on top of the form.
—But that's just my five cents. Hope I get around to write this library some day Big Grin .

—trice
#3

[eluser]textnotspeech[/eluser]
You could populate the errors variable with the results of the validation_errors() function inside the class itself (if it returns empty you'd want to make sure errors is set to FALSE). I don't use the upload file upload class, the error function for that is a little bit trickier but I'm sure you could find a way to get those error results in the array as well. If the errors array is set, you'll get an "error" message. It's something to think about for expanding the library though. It would be nice if the notice was just a persistent variable that always "knew" what to display.
#4

[eluser]trice22[/eluser]
Sounds good—gotta try it.

[quote author="textnotspeech" date="1233685179"]It would be nice if the notice was just a persistent variable that always "knew" what to display.[/quote]
YEP—that's exactly what I meant. Maybe I find some time to play around with it. I'll let you know if it goes somewhere.
—trice




Theme © iAndrew 2016 - Forum software by © MyBB