I understand what __() is being used for but would not have thought to write
is as

[code]  $this->Session->setFlash(__(' Some Flash
message here'),'default',array('class' => 'flash_failure'));   [/code]

it makes more sense now.

By the way ... what is 'default' specifying in the setFlash ?


On Fri, Apr 2, 2010 at 1:30 PM, LunarDraco <mdc...@gmail.com> wrote:

> In your first post it looks like you may have had the closing ')' in
> the wrong place, and the array was being passed as a second parameter
> to the __() function and was never getting to the setFlash function.
> You had:
> $this->Session->setFlash(__(' Some Flash message here ',array('class'
> => 'flash_failure')));
> In your more recent post has all three params for the setFlash message
> and is not using the __().
> but you probably could have restructured your first format as:
> $this->Session->setFlash(__(' Some Flash message
> here'),'default',array('class' => 'flash_failure'));
>
> On Apr 2, 11:04 am, Ed Propsner <crotchf...@gmail.com> wrote:
> > It works now but I'm not sure what I was doing wrong ... I don't even
> know
> > what I did to fix it.
> >
> > I was using this so set my message [code]  $this->Session->setFlash('
> Some
> > message here ', 'default', array('class' => 'flash_failure'));  [/code]
> >
> > The CSS was simple enough as well    [code]    .flash_failure { //some
> css }
> >      [/code]
> >
> > It kept assigning the class "message" to the div no matter which way I
> tried
> > to write it.
> >
> > - Ed
> >
> > On Fri, Apr 2, 2010 at 11:55 AM, cricket <zijn.digi...@gmail.com> wrote:
> > > Maybe your CSS selector needs to be adjuted. Do you have firebug
> > > installed? Easy enough to check with that, whether it's the CSS or the
> > > div isn't getting the class name.
> >
> > > On Apr 2, 11:22 am, Ed Propsner <crotchf...@gmail.com> wrote:
> > > > Seems straightforward enough but I must be overlooking something
> > > somewhere.
> > > > Still not working out for me.
> >
> > > > On Fri, Apr 2, 2010 at 6:22 AM, WebbedIT <p...@webbedit.co.uk>
> wrote:
> > > > > I use:
> >
> > > > > $this->Session->setFlash('<p>Whatever message I want to
> display</p>',
> > > > > 'default', array('class'=>'message update'));
> >
> > > > > And I change the update class to notice or error depending on what
> > > > > info I am displaying.  My CSS is as follows
> >
> > > > > div.message {-moz-border-radius:5px; padding:6px 10px; margin:10px
> 0;
> > > > > text-align:center;}
> >
> > > > > div#authMessage, div.message.error {color:#f00; background:#FFE6E6;
> > > > > border:1px solid #FF9D9D;}
> > > > > div.message.update {color:#090; background:#ECFFEC; border:1px
> solid
> > > > > #090;}
> > > > > div.message.notice {color:#DFD137; background:#FFFBCF; border:1px
> > > > > solid #DFD137;}
> > > > > div.message.site {font-size:90%; color:#090; background:#ECFFEC;
> > > > > border:1px solid #090;}
> > > > > div.message.site a {color:#090; font-weight:bold;}
> >
> > > > > Cricket's implementation looks interesting though.
> >
> > > > > HTH
> >
> > > > > Paul
> >
> > > > > 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<cake-php%2bunsubscr...@googlegroups.com>
> <cake-php%2bunsubscr...@googlegroups.com<cake-php%252bunsubscr...@googlegroups.com>
> >
> > > <cake-php%2bunsubscr...@googlegroups.com<cake-php%252bunsubscr...@googlegroups.com>
> <cake-php%252bunsubscr...@googlegroups.com<cake-php%25252bunsubscr...@googlegroups.com>
> >>For
> > > more options, visit this group at
> > > > >http://groups.google.com/group/cake-php?hl=en
> >
> > > > > To unsubscribe, reply using "remove me" as the subject.
> >
> > > 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<cake-php%2bunsubscr...@googlegroups.com>
> <cake-php%2bunsubscr...@googlegroups.com<cake-php%252bunsubscr...@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<cake-php%2bunsubscr...@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

Reply via email to