Re: Auth flash message LAYOUT ???
good, I'm so sorryyy, now I understand, using AuthComponent's 'auto setFlash' mechanism is not posible to specify a layout, though, it be changed through flashElement property of AuthComponent in the new 1.3 version of cakephp. If you really need this feature (enhance, whatever...) you can hack the AuthComponent itself but this is going 'against the flow' and do not advise it On Feb 10, 9:02 am, "toka...@gmail.com" wrote: > Hi Jeremy, Anler > thanks for your replies. > > @Jeremy: But where should I use it? Cake automaticaly do the set > flash... the message "Login failed. Invalid username or password." is > hardcoded in the core... Should I handle your code that in login() > function? > > @anler: I know that I may change the message, but how the layout > wrapper? > > normaly (in other case) it is working if I call setFlash() manualy and > I specify layout as a second param...but in this Auth case I miss any > handle to set the layout... > > e.g. > setFlash( $message, $layout = 'default', $params = array ( ), $key = > 'flash' ) > > Thanks > Tomas > > On Feb 9, 3:42 pm, Jeremy Burns wrote: > > > Try something along these lines: > > > $this->Session->setFlash > > (__ > > ('Message.', true), > > true, > > array('class' => 'flashError') > > ); > > > Jeremy Burns > > jeremybu...@me.com > > > On 9 Feb 2010, at 14:32, toka...@gmail.com wrote: > > > > Hi, I am trying to set a custom layout for Auth flash message. > > > setFlast() support that but it seems to be hardcoded in the core for > > > case of auth messages. > > > > any idea how to set my own layout wrapper around this message ... > > > > "Login failed. Invalid username or password." ??? > > > > thanks > > > help appreciated. > > > Tomas > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others > > > with their CakePHP related questions. > > > > You received this message because you are subscribed to the Google Groups > > > "CakePHP" group. > > > To post to this group, send email to cake-php@googlegroups.com > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Auth flash message LAYOUT ???
Hi Jeremy, Anler thanks for your replies. @Jeremy: But where should I use it? Cake automaticaly do the set flash... the message "Login failed. Invalid username or password." is hardcoded in the core... Should I handle your code that in login() function? @anler: I know that I may change the message, but how the layout wrapper? normaly (in other case) it is working if I call setFlash() manualy and I specify layout as a second param...but in this Auth case I miss any handle to set the layout... e.g. setFlash( $message, $layout = 'default', $params = array ( ), $key = 'flash' ) Thanks Tomas On Feb 9, 3:42 pm, Jeremy Burns wrote: > Try something along these lines: > > $this->Session->setFlash > (__ > ('Message.', true), > true, > array('class' => 'flashError') > ); > > Jeremy Burns > jeremybu...@me.com > > On 9 Feb 2010, at 14:32, toka...@gmail.com wrote: > > > Hi, I am trying to set a custom layout for Auth flash message. > > setFlast() support that but it seems to be hardcoded in the core for > > case of auth messages. > > > any idea how to set my own layout wrapper around this message ... > > > "Login failed. Invalid username or password." ??? > > > thanks > > help appreciated. > > Tomas > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > athttp://groups.google.com/group/cake-php?hl=en > > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Auth flash message LAYOUT ???
if you are using the AuthComponent, you should change the auth message via: $controller->AuthComponent->loginError = __('whatever you want', true); this is the best way (DRY) On Feb 9, 3:32 pm, "toka...@gmail.com" wrote: > Hi, I am trying to set a custom layout for Auth flash message. > setFlast() support that but it seems to be hardcoded in the core for > case of auth messages. > > any idea how to set my own layout wrapper around this message ... > > "Login failed. Invalid username or password." ??? > > thanks > help appreciated. > Tomas Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Auth flash message LAYOUT ???
Try something along these lines: $this->Session->setFlash (__ ('Message.', true), true, array('class' => 'flashError') ); Jeremy Burns jeremybu...@me.com On 9 Feb 2010, at 14:32, toka...@gmail.com wrote: > Hi, I am trying to set a custom layout for Auth flash message. > setFlast() support that but it seems to be hardcoded in the core for > case of auth messages. > > > any idea how to set my own layout wrapper around this message ... > > "Login failed. Invalid username or password."??? > > thanks > help appreciated. > Tomas > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Auth flash message LAYOUT ???
Hi, I am trying to set a custom layout for Auth flash message. setFlast() support that but it seems to be hardcoded in the core for case of auth messages. any idea how to set my own layout wrapper around this message ... "Login failed. Invalid username or password."??? thanks help appreciated. Tomas Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en