<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Flash messages</title>
	<atom:link href="http://blog.agilephp.com/2008/06/03/flash-messages/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.agilephp.com/2008/06/03/flash-messages/</link>
	<description>Dagfinn Reiersøl on PHP, agile development, Ruby and other addictive substances</description>
	<lastBuildDate>Fri, 23 Jul 2010 20:17:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Flash Messenger for Expression Engine &#124; Aviblock.com</title>
		<link>http://blog.agilephp.com/2008/06/03/flash-messages/comment-page-1/#comment-563</link>
		<dc:creator>Flash Messenger for Expression Engine &#124; Aviblock.com</dc:creator>
		<pubDate>Wed, 20 May 2009 01:39:28 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/?p=1364#comment-563</guid>
		<description>[...] of HTTP is with sessions. There is a pattern that takes advantage of this called a &#8220;flash message&#8220;. The basic idea is to store a value in a session when the form is submitted, and to echo it [...]</description>
		<content:encoded><![CDATA[<p>[...] of HTTP is with sessions. There is a pattern that takes advantage of this called a &#8220;flash message&#8220;. The basic idea is to store a value in a session when the form is submitted, and to echo it [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dagfinn</title>
		<link>http://blog.agilephp.com/2008/06/03/flash-messages/comment-page-1/#comment-69</link>
		<dc:creator>dagfinn</dc:creator>
		<pubDate>Tue, 10 Jun 2008 07:55:59 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/?p=1364#comment-69</guid>
		<description>&lt;p&gt;That&#039;s interesting. I&#039;ve noticed that Zend Framework also has a more general approach, though perhaps not as general as this.&lt;/p&gt;
&lt;p&gt;It seems like a good idea as long as it doesn&#039;t make the API too complex for the application programmer.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>That&#8217;s interesting. I&#8217;ve noticed that Zend Framework also has a more general approach, though perhaps not as general as this.</p>
<p>It seems like a good idea as long as it doesn&#8217;t make the API too complex for the application programmer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chuck Hagenbuch</title>
		<link>http://blog.agilephp.com/2008/06/03/flash-messages/comment-page-1/#comment-68</link>
		<dc:creator>Chuck Hagenbuch</dc:creator>
		<pubDate>Tue, 10 Jun 2008 00:09:47 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/?p=1364#comment-68</guid>
		<description>&lt;p&gt;Horde has had this thing only recently dubbed &quot;flash messages&quot; for years - you get a $notification object, and you can push as many notices onto it as you want, with different message levels. When you want to display them, you pull them off the stack. It&#039;s not limited to the absolute next request; they stay there until you need them. And because of the more general architecture you can use it for things like calendar alarms, also, which we do - alarms even have custom output that lets you snooze or dismiss them.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Horde has had this thing only recently dubbed &#8220;flash messages&#8221; for years &#8211; you get a $notification object, and you can push as many notices onto it as you want, with different message levels. When you want to display them, you pull them off the stack. It&#8217;s not limited to the absolute next request; they stay there until you need them. And because of the more general architecture you can use it for things like calendar alarms, also, which we do &#8211; alarms even have custom output that lets you snooze or dismiss them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dagfinn</title>
		<link>http://blog.agilephp.com/2008/06/03/flash-messages/comment-page-1/#comment-71</link>
		<dc:creator>dagfinn</dc:creator>
		<pubDate>Tue, 03 Jun 2008 22:12:25 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/?p=1364#comment-71</guid>
		<description>&lt;p&gt;@Tomek: Yes, the unique ID is exactly what I&#039;ve done too. Web apps should be safe for &quot;power users&quot;. I&#039;ve had some ugly experiences with some that weren&#039;t, even losing data sometimes.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>@Tomek: Yes, the unique ID is exactly what I&#8217;ve done too. Web apps should be safe for &#8220;power users&#8221;. I&#8217;ve had some ugly experiences with some that weren&#8217;t, even losing data sometimes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kenrick</title>
		<link>http://blog.agilephp.com/2008/06/03/flash-messages/comment-page-1/#comment-70</link>
		<dc:creator>Kenrick</dc:creator>
		<pubDate>Tue, 03 Jun 2008 19:04:48 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/?p=1364#comment-70</guid>
		<description>&lt;p&gt;I created a really simple flash class for when I ported web.py to php. You can find the class here:&lt;br /&gt;
http://code.google.com/p/webpy-php-port/source/browse/trunk/webphp/lib/flash.php&lt;/p&gt;
&lt;p&gt;its really simple to use and uses $_SESSION data similar to many other classes.&lt;/p&gt;
&lt;p&gt;Flash::add(&#039;notice&#039;, &#039;your message&#039;);&lt;/p&gt;
&lt;p&gt;then retrieve it after the request:&lt;br /&gt;
if($msg = Flash::get(&#039;notice&#039;)) {&lt;br /&gt;
echo $msg;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;I find the flash pattern to be really helpful.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>I created a really simple flash class for when I ported web.py to php. You can find the class here:<br />
<a href="http://code.google.com/p/webpy-php-port/source/browse/trunk/webphp/lib/flash.php" rel="nofollow">http://code.google.com/p/webpy-php-port/source/browse/trunk/webphp/lib/flash.php</a></p>
<p>its really simple to use and uses $_SESSION data similar to many other classes.</p>
<p>Flash::add(&#8216;notice&#8217;, &#8216;your message&#8217;);</p>
<p>then retrieve it after the request:<br />
if($msg = Flash::get(&#8216;notice&#8217;)) {<br />
echo $msg;<br />
}</p>
<p>I find the flash pattern to be really helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johny</title>
		<link>http://blog.agilephp.com/2008/06/03/flash-messages/comment-page-1/#comment-73</link>
		<dc:creator>Johny</dc:creator>
		<pubDate>Tue, 03 Jun 2008 10:23:07 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/?p=1364#comment-73</guid>
		<description>&lt;p&gt;I never had the idee of giving out the error or status somewhere in code mostly defined them in template or language file and printed them out, but this way is also interesting.&lt;br /&gt;
But the method with get variable seems very vulnerable &lt;/p&gt;
&lt;p&gt;?message=(url encoded html code with link to my viagra site)&lt;/p&gt;
&lt;p&gt;I still think the messages should not be defined inside the php code, just id identifier of messages in a text definition or language file&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>I never had the idee of giving out the error or status somewhere in code mostly defined them in template or language file and printed them out, but this way is also interesting.<br />
But the method with get variable seems very vulnerable </p>
<p>?message=(url encoded html code with link to my viagra site)</p>
<p>I still think the messages should not be defined inside the php code, just id identifier of messages in a text definition or language file</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomek</title>
		<link>http://blog.agilephp.com/2008/06/03/flash-messages/comment-page-1/#comment-72</link>
		<dc:creator>Tomek</dc:creator>
		<pubDate>Tue, 03 Jun 2008 07:03:05 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/?p=1364#comment-72</guid>
		<description>&lt;p&gt;Good thing to do is using a unique id for each message to avoid problems with multiple windows/tabs.&lt;br /&gt;
Something like that in ZF:&lt;/p&gt;
&lt;p&gt;$flashId = md5(uniqid());&lt;br /&gt;
$flashMessenger = $this-&gt;_helper-&gt;FlashMessenger;&lt;br /&gt;
$flashMessenger-&gt;setNamespace($flashId);&lt;br /&gt;
$flashMessenger-&gt;addMessage($message);&lt;/p&gt;
&lt;p&gt;$this-&gt;_redirect($url . &#039;/flashId/&#039; . $flashId);&lt;br /&gt;
...&lt;br /&gt;
if ($this-&gt;getParam(&#039;flashId&#039;)) {&lt;br /&gt;
    $flashMessenger = $this-&gt;_helper-&gt;FlashMessenger;&lt;br /&gt;
    $flashMessenger-&gt;setNamespace($this-&gt;getParam(&#039;flashId&#039;));&lt;br /&gt;
    $msgs = $flashMessenger-&gt;getMessages();&lt;br /&gt;
}&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Good thing to do is using a unique id for each message to avoid problems with multiple windows/tabs.<br />
Something like that in ZF:</p>
<p>$flashId = md5(uniqid());<br />
$flashMessenger = $this-&gt;_helper-&gt;FlashMessenger;<br />
$flashMessenger-&gt;setNamespace($flashId);<br />
$flashMessenger-&gt;addMessage($message);</p>
<p>$this-&gt;_redirect($url . &#8216;/flashId/&#8217; . $flashId);<br />
&#8230;<br />
if ($this-&gt;getParam(&#8216;flashId&#8217;)) {<br />
    $flashMessenger = $this-&gt;_helper-&gt;FlashMessenger;<br />
    $flashMessenger-&gt;setNamespace($this-&gt;getParam(&#8216;flashId&#8217;));<br />
    $msgs = $flashMessenger-&gt;getMessages();<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shaun</title>
		<link>http://blog.agilephp.com/2008/06/03/flash-messages/comment-page-1/#comment-74</link>
		<dc:creator>Shaun</dc:creator>
		<pubDate>Mon, 02 Jun 2008 12:46:30 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/?p=1364#comment-74</guid>
		<description>&lt;p&gt;I love using Flash messages.  It makes life so much easier.  I have never used them in the Zend Framework but use them a lot in CodeIgniter.  Is very easy to do.  In CodeIgniter they call them Flashdata and can be found in the session object.&lt;/p&gt;
&lt;p&gt;http://codeigniter.com/user_guide/libraries/sessions.html&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>I love using Flash messages.  It makes life so much easier.  I have never used them in the Zend Framework but use them a lot in CodeIgniter.  Is very easy to do.  In CodeIgniter they call them Flashdata and can be found in the session object.</p>
<p><a href="http://codeigniter.com/user_guide/libraries/sessions.html" rel="nofollow">http://codeigniter.com/user_guide/libraries/sessions.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
