ROR-style Flash alerts in PHP
Although I didn't get to use Ruby on Rails in my job due to various factors I had to consider, I took some interesting concepts for the framework, namely the ROR-style flash alerts. These alerts are stored in cookies and are transferred between pages even on redirects. Pretty cool idea, so I wrote a replicate for this functionality in PHP.
Demo and the source code can be viewed here
Have fun :)
July 1st, 2006 at 10:31 pm
In the ATK framework, there's an atkMessageQueue to add messages to a queue, and an {atkmessages} Smarty plugin to display them on any later pageload, upon which they are removed from the queue.
Messages are stored in the session, which allows for more flexible message handling (you can even pass around objects), and larger messages, than in a cookie.
July 2nd, 2006 at 4:22 pm
You can't really compare a whole framework with this snippet of code :) But it's nice to know that the ATK framework has similar feature.
May 2nd, 2007 at 1:40 am
Could you re-post the source code and example? When I click the link I get a 404 error.
May 2nd, 2007 at 8:38 am
Joseph,
thanks for pointing the problem out! Looks like I don't have the code on the server anymore :/ I wonder at what point I lost it.. hm.. I'll see what I can do about it!
May 22nd, 2007 at 10:31 am
Sorry guys, the page was lost in transition :) I have recreated the sample code (I use this code basically everywhere :) - and its available at the link pointed by this article.
Have fun :)