Formatar a mensagem - $this-Session-setFlash(__('minha msg'));

2013-04-22 Thread Anderson Moraes
Boa tarde pessoal, Então, na página default.ctp eu tenho a seguinte linha: ?php echo $this-Session-flash(); ? Quando uma mensagem é setada é essa linha que exibe, correto? Então se eu tenho uma mensagem de sucesso: $this-Session-setFlash(__('Usuário cadastrado com sucesso.')); eu gostaria

Re: Formatar a mensagem - $this-Session-setFlash(__('minha msg'));

2013-04-22 Thread Tony Messias
2013/4/22 Anderson Moraes anderson@gmail.com Boa tarde pessoal, Então, na página default.ctp eu tenho a seguinte linha: ?php echo $this-Session-flash(); ? Quando uma mensagem é setada é essa linha que exibe, correto? Então se eu tenho uma mensagem de sucesso: $this-Session-setFlash

Re: Formatar a mensagem - $this-Session-setFlash(__('minha msg'));

2013-04-22 Thread Anderson Moraes
default.ctp eu tenho a seguinte linha: ?php echo $this-Session-flash(); ? Quando uma mensagem é setada é essa linha que exibe, correto? Então se eu tenho uma mensagem de sucesso: $this-Session-setFlash(__('Usuário cadastrado com sucesso.')); eu gostaria que o background-color da minha mensagem

Re: Formatar a mensagem - $this-Session-setFlash(__('minha msg'));

2013-04-22 Thread Tony Messias
Seguinte, o método setFlash aceita 4 parâmetros: 1) String da mensagem; 2) * element* que será usado; 3) array de parâmetros; e 4) índice da mensagem na sessão; Vejo pelo menos três formas de você fazer isso: 1. Criando um *element* para cada tipo de mensage; 2. Com apenas um *element* e

Error in setFlash not in a view

2012-10-12 Thread cosinusweb
if($this-{$this-modelClass}-delete( $id )){ $this-Session-setFlash( __('MontantRecharge_Delete_OK'),'notif',array('type' = 'success')); }else{ $this-Session-setFlash( __('MontantRecharge_Delete_KO'),'notif',array('type' = 'error

Fatal Error on call to '$this-Session-setFlash'

2012-09-13 Thread McScreech
G'day, I do not understand how I induced this error: 'Error: Call to a member function setFlash() on a non-object' which happens on any call to '$this-Session-setFlash' as noted in the default edit (or add) function below? I was adding options to the related form (option lists, labels, titles

Re: Fatal Error on call to '$this-Session-setFlash'

2012-09-13 Thread Tilen Majerle
function setFlash() on a non-object' which happens on any call to '$this-Session-setFlash' as noted in the default edit (or add) function below? I was adding options to the related form (option lists, labels, titles) when I broke it and have been looking for misplaced or missing closing parens

Re: Fatal Error on call to '$this-Session-setFlash'

2012-09-13 Thread McScreech
Thank you very much, I had forgot to include the Session component. I haven't begun a new project in some time (since about cake 1.2) - forgot some basis setup stuff, I guess I was thinking the basic components and helpers were included by default. I do wonder however, how it _was_ able to

Re: Fatal Error on call to '$this-Session-setFlash'

2012-09-13 Thread Tilen Majerle
AppController extends Controller class...and in this class it was automatically added this component. -- Lep pozdrav, Tilen Majerle http://majerle.eu 2012/9/13 McScreech scre...@sympatico.ca Thank you very much, I had forgot to include the Session component. I haven't begun a new project in

Session::setFlash dosn't work under chrome

2012-04-01 Thread rvcT
*cake version:* 2.1.1 *chrome version:* 18.0.1025.142 m Latest *code to reproduce error:* put in controller action: public function testflash(){ $this-Session-setFlash(flash message will not be shown in chrome); $this-redirect(array('action' = 'index')); } in the default layout: ?php echo

Re: Links in the setFlash

2012-03-09 Thread majna
You can use Router like: $url = Router::url(array('controller'='users', 'action'='login')); $this-Session-setFlash(sprintf('Please a href=%slogin/a', $url)); On Friday, March 9, 2012 3:47:17 AM UTC+1, Thiago Silva wrote: Hello, I'm trying to insert links in the Session-setFlash method

Links in the setFlash

2012-03-08 Thread Thiago Silva
Hello, I'm trying to insert links in the Session-setFlash method, but it's not working. I've tried to use Html helper in the controller but it crashed. I'm using version 2.1. Thanks, Thiago -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new

Re: setFlash issue in 1.3?

2011-06-16 Thread RománMussi
, 10:49 am, john lyles confidentia...@gmail.com wrote: I have a similar problem and wondering if this is a problem with 1.3.10 On May 18, 3:11 pm, Michael Gaiser mjgai...@gmail.com wrote: This line no longer seems to output a message nor does any other use of setFlash

Re: setFlash issue in 1.3?

2011-06-16 Thread Cruisine
i have an setFlash issue as well..whenever i'm using $ajax- submit() the setFlash message doesn't appear on my page? what's wrong ? On May 19, 2:11 am, Michael Gaiser mjgai...@gmail.com wrote: This line no longer seems to output a message nor does any other use of setFlash

RE: setFlash issue in 1.3?

2011-06-16 Thread Krissy Masters
@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of Cruisine Sent: Thursday, June 16, 2011 11:34 PM To: CakePHP Subject: Re: setFlash issue in 1.3? i have an setFlash issue as well..whenever i'm using $ajax- submit() the setFlash message doesn't appear on my page? what's wrong

setFlash doesn't appears using $ajax-submit

2011-06-16 Thread Cruisine
hi guys,recently i've been using ajax submit to save the data into database...but whenever i use $ajax-submit(), setFlash doesn't appear on my page.i'm so curious what's wrong with the setFlash...and it'll terrible since i can't show to the user whether the data have already saved

Re: setFlash issue in 1.3?

2011-06-16 Thread Cruisine
, June 16, 2011 11:34 PM To: CakePHP Subject: Re: setFlash issue in 1.3? i have an setFlash issue as well..whenever i'm using $ajax- submit() the setFlash message doesn't appear on my page? what's wrong ? On May 19, 2:11 am, Michael Gaiser mjgai...@gmail.com wrote: This line

RE: setFlash issue in 1.3?

2011-06-16 Thread Krissy Masters
@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of Cruisine Sent: Friday, June 17, 2011 12:37 AM To: CakePHP Subject: Re: setFlash issue in 1.3? @Krissy : thx for the answer...yeah,u r right...and it's logically true.. so can u give me an example using javascript to update the area? On Jun 17, 9

Re: setFlash doesn't appears using $ajax-submit

2011-06-16 Thread Miles J
setFlash() requires the whole page to reload to work, you cant fire off an AJAX call and expect some random flash message to appear in the page. On Jun 16, 7:48 pm, Cruisine cruisin...@yahoo.co.id wrote: hi guys,recently i've been using ajax submit to save the data into database...but whenever

Re: setFlash issue in 1.3?

2011-06-15 Thread john lyles
I have a similar problem and wondering if this is a problem with 1.3.10 On May 18, 3:11 pm, Michael Gaiser mjgai...@gmail.com wrote: This line no longer seems to output a message nor does any other use of setFlash. $this-Session-setFlash('Cookie created. It will expire '.$this-Time-niceTime

setFlash issue in 1.3?

2011-05-18 Thread Michael Gaiser
This line no longer seems to output a message nor does any other use of setFlash. $this-Session-setFlash('Cookie created. It will expire '.$this-Time-niceTime($cookie['expire'])); So when I was using 1.2 my code seemed to work out ok. Since migrating to 1.3, I have made sure that Session

preguntas sobre setFlash

2011-03-30 Thread c.pfar...@gmail.com
Hola gente, resulta que tengo un sitio en el que por diferentes circunstancias se hacen ciertos informes sobre procesos que se llevaron a cabo como ¨guardado correctaemnte¨, ¨hubo un error¨ etc bueno todos los errores los estoy poniendo de la forma siguiente: $this-Session-setFlash

Re: setflash edit

2011-01-15 Thread lvdb
Hello Dr. Loboto, Thank you, it works. Leo On 13 jan, 02:34, Dr. Loboto drlob...@gmail.com wrote: You see page cached by browser when hit previous button there. Disable cache at all by $this-disableCache() in controller, or do not use previous button. On 13 янв, 02:14, lvdb

Re: setflash edit

2011-01-12 Thread lvdb
Hello Amit, Thank you for your reply. I will try to explain it First I am editing a record in the edit view. When I save the record it redirects me to the index view and give a message Job has been updated. Second step is I go to the detail view and check the details after that I go back to the

Re: setflash edit

2011-01-12 Thread Dr. Loboto
You see page cached by browser when hit previous button there. Disable cache at all by $this-disableCache() in controller, or do not use previous button. On 13 янв, 02:14, lvdb lj.vandenb...@kpnplanet.nl wrote: Hello Amit, Thank you for your reply. I will try to explain it First I am

Re: setflash edit

2011-01-11 Thread lvdb
Hello Amit, Thank you for your answer. When I refresh the view page the message is gone. It is not done automatically. How can I refresh the page? Leo On 10 jan, 07:31, Amit Badkas amit.sanis...@gmail.com wrote: Hi, Does the details page output flash message? You don't need to delete flash

Re: setflash edit

2011-01-11 Thread Amit Badkas
Hi, As I already mentioned You don't need to delete flash message in session explicitly, $this-Session-flash() does it automagically., the message doesn't appear after page refresh. In the first message you mentioned But when I go after the edit to the details view and back to the index view it

Re: setflash edit

2011-01-09 Thread Amit Badkas
Hi, Does the details page output flash message? You don't need to delete flash message in session explicitly, $this-Session-flash() does it automagically. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Sat, Jan 8, 2011 at 1:13 AM, lvdb lj.vandenb...@kpnplanet.nl wrote:

setflash edit

2011-01-07 Thread lvdb
Hello, I have made a flash message your job has been updated. When I edit a job and have been redirected to the index view the message appears (and after 3 seconds it hides). This is working fine. But when I go after the edit to the details view and back to the index view it gives me the message

Re: Setflash change background color

2011-01-04 Thread lvdb
Thanks for your answer. Leo On 29 dec 2010, 17:37, john lyles confidentia...@gmail.com wrote: You are not telling it to look in the right place. You are giving a location of .message but in fact it is located at div.message, the div in this case being div id=content. Remove this div and then

Setflash change background color

2010-12-29 Thread lvdb
Hello, I want to change the appearance of the default message (edit success). I have put the following code in the standard layout: style type=text/css .message { position:absolute; top:0px; left:100px; width:300px; font-size:14px; background-color:green; } /style

Re: Setflash change background color

2010-12-29 Thread john lyles
You are not telling it to look in the right place. You are giving a location of .message but in fact it is located at div.message, the div in this case being div id=content. Remove this div and then .message would make sense. It also matters if you put your styles before or after you include the

Re: $this-Session-setFlash problem

2010-12-22 Thread Stephen
this message in context: http://cakephp.1045679.n5.nabble.com/this-Session-setFlash-problem-tp3314357p3314653.html Sent from the CakePHP mailing list archive at Nabble.com. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received

Re: $this-Session-setFlash problem

2010-12-22 Thread euromark
.1045679.n5.nabble.com/this-Session-setFlash-problem-tp... Sent from the CakePHP mailing list archive at Nabble.com. 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

$this-Session-setFlash problem

2010-12-21 Thread sherzo
Hi All I have the following lines in my controller: $this-Session-setFlash('blabla'); $this-redirect(array('action'='unsuccessful')); exit(); and this part in my view: if ($session-check('Message.flash')) { echo $session-flash(); } but the result will be : div id=flashMessage class

Re: $this-Session-setFlash problem

2010-12-21 Thread Ryan Schmidt
On Dec 21, 2010, at 18:51, sherzo wrote: I have the following lines in my controller: $this-Session-setFlash('blabla'); $this-redirect(array('action'='unsuccessful')); exit(); and this part in my view: if ($session-check('Message.flash')) { echo $session-flash

Re: $this-Session-setFlash problem

2010-12-21 Thread euromark
controller: $this-Session-setFlash('blabla'); $this-redirect(array('action'='unsuccessful')); exit(); and this part in my view: if ($session-check('Message.flash')) {     echo $session-flash(); } but the result will be : div id=flashMessage class=messageblabla/div1 I have that 1 extra

Re: $this-Session-setFlash problem

2010-12-21 Thread sherzo
Thank you guys! yes Im using 1.2 and after I removing echo I'm not having that 1!!! I spent hours last night to remove that 1 Thanks Sherry -- View this message in context: http://cakephp.1045679.n5.nabble.com/this-Session-setFlash-problem-tp3314357p3314653.html Sent from the CakePHP

Re: setFlash() doesn't wotk with me on WAMP

2010-12-20 Thread Amit Badkas
'; } function add() { if (!empty($this-data)) { $this-Post-create(); if ($this-Post-save($this-data)) { $this-Session-setFlash('The post has been added successfully.'); $this-reDirect(array('action' = 'index

Re: setFlash() doesn't wotk with me on WAMP

2010-12-20 Thread Ahmed Abdulmoula
() { $this-set('posts', $this-Post-find('all', array('order' = array('id DESC'; } function add() { if (!empty($this-data)) { $this-Post-create(); if ($this-Post-save($this-data)) { $this-Session-setFlash

Re: setFlash() doesn't wotk with me on WAMP

2010-12-20 Thread Jeremy Burns | Class Outfit
-find('all', array('order' = array('id DESC'; } function add() { if (!empty($this-data)) { $this-Post-create(); if ($this-Post-save($this-data)) { $this-Session-setFlash('The post has been added successfully

Re: setFlash() doesn't wotk with me on WAMP

2010-12-20 Thread Ahmed Abdulmoula
(); if ($this-Post-save($this-data)) { $this-Session-setFlash('The post has been added successfully.'); $this-reDirect(array('action' = 'index')); } else { $this-Session-setFlash('The post has not been

Re: setFlash() doesn't wotk with me on WAMP

2010-12-19 Thread Ahmed - CakePHP
| Class Outfit jeremybu...@classoutfit.com wrote: Make sure you have declared both the Session Component and the Session Helper in your app_controller. setFlash only places the message into the session. To show it, use echo $this-Session-flash() in a view, element or layout. Jeremy

Re: setFlash() doesn't wotk with me on WAMP

2010-12-19 Thread Amit Badkas
, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Make sure you have declared both the Session Component and the Session Helper in your app_controller. setFlash only places the message into the session. To show it, use echo $this-Session-flash() in a view, element or layout

Re: setFlash() doesn't wotk with me on WAMP

2010-12-19 Thread Ahmed - CakePHP
', array('order' = array('id DESC'; } function add() { if (!empty($this-data)) { $this-Post-create(); if ($this-Post-save($this-data)) { $this-Session-setFlash('The post has been added successfully

setFlash() doesn't wotk with me on WAMP

2010-12-18 Thread Ahmed - CakePHP
Hello, I am very very very new on CakePHP. I tried to do a blog using the CakePHP. I did it :). but I found a problem: when I want to use $this-Session-setFlash(Write whatever); it doesn't work. I don't see the sentences that I write inside setFlash. They doesn't occur when I run the code

Re: setFlash() doesn't wotk with me on WAMP

2010-12-18 Thread Jeremy Burns | Class Outfit
Make sure you have declared both the Session Component and the Session Helper in your app_controller. setFlash only places the message into the session. To show it, use echo $this-Session-flash() in a view, element or layout. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http

Re: setFlash() doesn't wotk with me on WAMP

2010-12-18 Thread Ahmed - CakePHP
Component and the Session Helper in your app_controller. setFlash only places the message into the session. To show it, use echo $this-Session-flash() in a view, element or layout. Jeremy Burns Class Outfit jeremybu...@classoutfit.comhttp://www.classoutfit.com On 18 Dec 2010, at 16:13

Re: setFlash

2010-12-15 Thread lvdb
. In this tutorial there is a setFlash message after adding a new record. Is it possible to hide this message after 3 seconds? thank ou in advance for your answer. Regards, Leo Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions

Re: setFlash

2010-12-15 Thread Tilen Majerle
using?... -- Tilen Majerlehttp://majerle.eu 2010/12/14 lvdb lj.vandenb...@kpnplanet.nl Hello, I'am new to Cakephp. I have been doing the blog tutorial. In this tutorial there is a setFlash message after adding a new record. Is it possible to hide this message after 3

setFlash

2010-12-14 Thread lvdb
Hello, I'am new to Cakephp. I have been doing the blog tutorial. In this tutorial there is a setFlash message after adding a new record. Is it possible to hide this message after 3 seconds? thank ou in advance for your answer. Regards, Leo Check out the new CakePHP Questions site http

Re: setFlash

2010-12-14 Thread Tilen Majerle
which version are u using?... -- Tilen Majerle http://majerle.eu 2010/12/14 lvdb lj.vandenb...@kpnplanet.nl Hello, I'am new to Cakephp. I have been doing the blog tutorial. In this tutorial there is a setFlash message after adding a new record. Is it possible to hide this message after 3

Re: setFlash

2010-12-14 Thread Amit Badkas
lj.vandenb...@kpnplanet.nl wrote: Hello, I'am new to Cakephp. I have been doing the blog tutorial. In this tutorial there is a setFlash message after adding a new record. Is it possible to hide this message after 3 seconds? thank ou in advance for your answer. Regards, Leo Check out

Clear my setFlash

2010-12-06 Thread Master Ram
Hi.. in my application. i have one Onchange option i used. using javascript. in that application i have validation for some fields. without entering any fields when i clicking save option. i am getting setFlash error message. without changing any thing i am operating Onchange operations

Re: Clear my setFlash

2010-12-06 Thread Stephen
any fields when i clicking save option. i am getting setFlash error message. without changing any thing i am operating Onchange operations but the error message still showing. my requirement is after i changing onchange option i have to clear my SetFlash option. how to clear setFlash() using

setFlash

2010-09-27 Thread Gilvan Jr.
204 Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171 [main] - APP\webroot\index.php, line 83 Fatal error: Call to a member function setFlash() on a non-object in D: \servidor\xampp\htdocs\cacex\app\controllers\users_controller.php on line 50 Acontece nas actions, add, edit e delete

Re: setFlash

2010-09-27 Thread Taffarel de Lima
você tem que setar o Helper Session no seu controller para que funcione o metodo setFlash() var $helpers = array('Session'); 2010/9/26 Gilvan Jr. skinblac...@yahoo.com.br Olá pessoal, aguem saberia me dizer o motivo: Notice (8): Undefined property: UsersController::$Session [APP

setFlash and key

2010-09-22 Thread Jeremy Burns
According to the guide, if I do this: $this-Session-setFlash('A message.', 'default', array('class' = 'warning'), 'reset_password'); ...and this in a view: echo $this-Session-flash('reset_password'); ...I ought to get this: div id=flashMessage class=warningA message./div ...but I am actually

Re: setFlash and key

2010-09-22 Thread Jeremy Burns | Class Outfit
Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 23 Sep 2010, at 03:53, Jeremy Burns wrote: According to the guide, if I do this: $this-Session-setFlash('A message.', 'default', array('class' = 'warning'), 'reset_password'); ...and this in a view: echo

Custom setflash messages in cakephp 1.3

2010-08-18 Thread Petter Andreas Strøm
Im trying to create custom designs for setFlash messages. I've seen sevral tutuorials for this, like http://tech.rytis.net/2008/8/27/discover-layouts-for-setflash-method-in-cakephp , but none of them seems to work for me. I've installed cake 1.3 and it seems like it's looking for a element view

Re: Custom setflash messages in cakephp 1.3

2010-08-18 Thread Andras Kende
Try this: controller: $this-Session-setFlash('Edited successfully', 'custom_flash', array('class' = 'success')); views/elements/custom_flash.ctp div ?php echo isset($class) ? 'class=' . $class . '' : NULL; ? p ?php echo isset($message) ? $message : NULL; ? /p /div css: .success

Re: Custom setflash messages in cakephp 1.3

2010-08-18 Thread Mike Karthauser
On Wed, August 18, 2010 4:23 pm, Andras Kende wrote: Try this: controller: $this-Session-setFlash('Edited successfully', 'custom_flash', array('class' = 'success')); views/elements/custom_flash.ctp div ?php echo isset($class) ? 'class=' . $class . '' : NULL; ? p ?php echo

Re: add logged user infos in the setFlash message after login

2010-07-30 Thread Anthony
Set your message as a variable instead of concating them inside the functions parameter list: Example: $text = 'Thank you for logging in: '; $flashmsg = $txt . $user; $this-Session-setFlash($flashmsg, 'growl', array('type'='important')); or $flashmsg = 'Thank you for logging in: ' . $user

Re: add logged user infos in the setFlash message after login

2010-07-30 Thread Anthony
the session) $this-Auth-user('first_name'); On Jul 28, 5:22 pm, Melody Nelson melodynelso...@gmail.com wrote: hi (and sorry for my english), I'm using cake 1.3 I don't find how I can add infos of the logged user in the setFlash message after the login I found how to do it in views but I want

Re: add logged user infos in the setFlash message after login

2010-07-30 Thread Melody Nelson
= $txtmsg.$user; $this-Session-setFlash($flashmsg, 'growl', array('type'='important')); } if I debug $_SESSION, I see the infos but the array [Message] is before the array [Auth], could it be the source of my problem ? Array ( [Config] = Array ( [userAgent

add logged user infos in the setFlash message after login

2010-07-29 Thread Melody Nelson
hi (and sorry for my english), I'm using cake 1.3 I don't find how I can add infos of the logged user in the setFlash message after the login I found how to do it in views but I want to do it in the controller to use it a growl message function login() { $txt = bla bla bla

setFlash not displaying

2010-07-16 Thread StephenE
Hello, newbie here. I cannot get setFlash() to display a message on my view page. In the controller: $this-Session-setFlash('Please enter the correct number.', 'register', array('class' = 'error-message')); In the view page register.ctp: ?php if ($session-check('Message.flash')) { $session

Re: setFlash not displaying

2010-07-16 Thread Jeremy Burns | Class Outfit
2010, at 05:58, StephenE wrote: Hello, newbie here. I cannot get setFlash() to display a message on my view page. In the controller: $this-Session-setFlash('Please enter the correct number.', 'register', array('class' = 'error-message')); In the view page register.ctp: ?php

Re: setFlash not displaying

2010-07-16 Thread StephenE
I am using 1.3. Your suggestion worked. Thanks! From the perspective of a newbie, the CakePHP 1.3 manual needs better documentation on the setFlash() method. They need an example of how to implement it that actually works. On Jul 16, 10:25 am, Jeremy Burns | Class Outfit jeremybu

Re: Session-setFlash error

2010-07-10 Thread matzeh...@googlemail.com
Isn´t the -flash a methode of 1.3 ? Do you use 1.2 core? As I know in 1.2 you have to -setflash and a redirect... On 9 Jul., 21:51, gautam lakum lakum7...@gmail.com wrote: I am getting this error in my default.ctp layout. Notice (8): Undefined variable: session [APP\views\layouts

Session-setFlash error

2010-07-09 Thread gautam lakum
I am getting this error in my default.ctp layout. Notice (8): Undefined variable: session [APP\views\layouts \default.ctp, line 74] Code | Context Fatal error: Call to a member function flash() on a non-object in C: \wamp\www\rentcar1\app\views\layouts\default.ctp on line 74 This is the layout

Re: Session-setFlash error

2010-07-09 Thread Jeremy Burns | Class Outfit
If you are on 1.3, don't forget to add the Session helper and Session component to your app_controller. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 9 Jul 2010, at 20:51, gautam lakum wrote: I am getting this error in my default.ctp layout. Notice

Re: Session-setFlash error

2010-07-09 Thread gautam lakum
Thanks jeremy, it is working now. On Jul 9, 1:28 pm, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: If you are on 1.3, don't forget to add the Session helper and Session component to your app_controller. Jeremy Burns Class Outfit

Re: Problem with Session-setFlash

2010-05-21 Thread sami_bk
Hi Jeremy, Thanks for your reply. It did not work with me , is there any other alternative to setFlash() ? Greetings. On May 20, 7:16 pm, Jeremy Burns jeremybu...@me.com wrote: Seems like overkill to me. Just use $this-Session-setFlash('Here is my message');  Then do echo $this-Session-flash

Re: Problem with Session-setFlash

2010-05-21 Thread Jeremy Burns
with me , is there any other alternative to setFlash() ? Greetings. On May 20, 7:16 pm, Jeremy Burns jeremybu...@me.com wrote: Seems like overkill to me. Just use $this-Session-setFlash('Here is my message'); Then do echo $this-Session-flash(); - this not only displays your message

Problem with Session-setFlash

2010-05-20 Thread sami_bk
Hi all, I am new to CakePHP and i am building a small app. i use Session-setFlash('message') to display notifications to the users . The notification is displayed in the default layout and i delete the flash messega from the session using this code code if ($session-check('Message.flash

Re: Problem with Session-setFlash

2010-05-20 Thread Jeremy Burns
Seems like overkill to me. Just use $this-Session-setFlash('Here is my message'); Then do echo $this-Session-flash(); - this not only displays your message but also clears it out of the cache. Jeremy Burns jeremybu...@me.com On 20 May 2010, at 18:16, sami_bk wrote: Hi all, I am new

cakephp 1.3 $this-Session-setFlash

2010-03-18 Thread Johannes Goll
Hi, I am migrating from 1.2 to cakephp 1.3 and am trying to switch to the new $this-Session-setFlash functionality that uses elements: Projects Controller: function edit($id = null) { ... $this-Session-setFlash('The Project has been saved','message'); $this-redirect(array('action'='index

Re: cakephp 1.3 $this-Session-setFlash

2010-03-18 Thread Jeremy Burns
You need to do: echo $session-flash(); now. Jeremy Burns jeremybu...@me.com On 18 Mar 2010, at 13:06, Johannes Goll wrote: Hi, I am migrating from 1.2 to cakephp 1.3 and am trying to switch to the new $this-Session-setFlash functionality that uses elements: Projects Controller

Re: cakephp 1.3 $this-Session-setFlash

2010-03-18 Thread Johannes Goll
-setFlash functionality that uses elements: Projects Controller: function edit($id = null) { ... $this-Session-setFlash('The Project has been saved','message'); $this-redirect(array('action'='index')); ... } Layout: div id=content ?php $session-flash(); echo $content_for_layout

Re: setFlash() appending a 1

2010-01-07 Thread euromark
and displaying the flash value? Consider both an instruction, so if you do something like if($this-Session-flash()); you'll get both the message and a 1 to indicate success. To set the value, use $this-Session-setFlash();. To display it, use $this- Session-flash();. On Jan 7, 5:40 am, Kerr hayl

Re: setFlash() appending a 1

2010-01-07 Thread Kerr
Thanks for the prompt replies, guys! I am using $this-Session- setFlash() in my controller after a successful form submission, then redirecting, where I echo $session-flash(). I removed the echo, and all is good! I can't believe I hadn't thought of that before, as I spent an inordinate amount

Re: setFlash() appending a 1

2010-01-07 Thread euromark
well, its always a good idea to jump into the section in the cake core file before you bang your head to any solid objects in the room :) On 7 Jan., 14:40, Kerr hayl...@gmail.com wrote: Thanks for the prompt replies, guys!  I am using $this-Session-setFlash() in my controller after

Re: setFlash() appending a 1

2010-01-07 Thread dilip bakotiya
()); you'll get both the message and a 1 to indicate success. To set the value, use $this-Session-setFlash();. To display it, use $this- Session-flash();. On Jan 7, 5:40 am, Kerr hayl...@gmail.com wrote: Hi all, I'm experiencing a really weird issue where the $session-setFlash() method appends

Re: setFlash() appending a 1

2010-01-07 Thread Kerr
before you bang your head to any solid objects in the room :) On 7 Jan., 14:40, Kerr hayl...@gmail.com wrote: Thanks for the prompt replies, guys!  I am using $this-Session-setFlash() in my controller after a successful form submission, then redirecting, where I echo $session-flash().  I

setFlash() appending a 1

2010-01-06 Thread Kerr
Hi all, I'm experiencing a really weird issue where the $session- setFlash() method appends a single 1 character directly after the generated div tag. I'm using an unmolested copy of CakePHP 1.2.5. I've looked all through the source in SessionComponent, CakeSession and SessionHelper and don't see

Re: setFlash() appending a 1

2010-01-06 Thread Jeremy Burns
How are you setting and displaying the flash value? Consider both an instruction, so if you do something like if($this-Session-flash()); you'll get both the message and a 1 to indicate success. To set the value, use $this-Session-setFlash();. To display it, use $this- Session-flash();. On Jan 7

Re: $this-Session-setFlash();

2010-01-03 Thread j0n4s.h4rtm...@googlemail.com
I use this to make it lots shorter: $this-Session-setFlash(___('Success Message'), 'flashes/success'); In app/views/layouts/flashes I have div id=flashMessage class=message success?=$content_for_layout? /div P.s. in app/config/boostrap.php I have function ___($string) { return

$this-Session-setFlash();

2010-01-01 Thread Dave
I was wondering is there a way to add a class to the session from the controller? The setflash as far as i can see is used for alerting user after a save attempt so $this-Session-setFlash(__('Information Updated.', true)); or $this-Session-setFlash(__('Error! Please try again.', true

Re: $this-Session-setFlash();

2010-01-01 Thread Jeremy Burns
Hi Dave Here's how you can do it: $this-Session-setFlash(__('Your message.', true), true, array ('class' = 'yourClass')); On Jan 2, 2:35 am, Dave make.cake.b...@gmail.com wrote: I was wondering is there a way to add a class to the session from the controller? The setflash as far as i can

RE: $this-Session-setFlash();

2010-01-01 Thread Dave
: $this-Session-setFlash(); Hi Dave Here's how you can do it: $this-Session-setFlash(__('Your message.', true), true, array ('class' = 'yourClass')); On Jan 2, 2:35 am, Dave make.cake.b...@gmail.com wrote: I was wondering is there a way to add a class to the session from the controller

Re: Session setFlash is not working on Firefox 3.5.3

2009-11-20 Thread Octavian
Reinstalled FF, works perfectly. -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options,

Re: Session setFlash is not working on Firefox 3.5.3

2009-11-06 Thread nurvzy
: // controller Class ExsController extends AppController{ public function list(){         $this-Session-setFlash('Hello');         $this-redirect('/exs/new',null,true); // or redirect + die()} public function new(){} } // view layout ?php $session-flash

Session setFlash is not working on Firefox 3.5.3

2009-10-09 Thread Franco Bonazza
Hello, Here's my problem Something this simple: // controller Class ExsController extends AppController{ public function list(){ $this-Session-setFlash('Hello'); $this-redirect('/exs/new',null,true); // or redirect + die() } public function new(){} } // view layout ?php

Re: Session setFlash is not working on Firefox 3.5.3

2009-10-09 Thread Franco Bonazza
function list(){         $this-Session-setFlash('Hello');         $this-redirect('/exs/new',null,true); // or redirect + die()} public function new(){} } // view layout ?php $session-flash() ? Doesn't work at all when I'm using Firefox. It works in opera 10, ie8, safari and chrome. Session

Session-setFlash() params not working ??

2009-09-08 Thread Spence
Hi All, I am trying to change the class attribute for my flash message by writing this in my controller: $this-Session-setFlash($errMsg, 'default', array('class' = 'errormsg')); AND I GET THE DEFAULT IN MY VIEW: div id=flashMessage class=message My view is not cached because changing

Re: related to Session-setFlash

2009-08-27 Thread cbhan
Sorry for the late reply.Yes, you are right, if you are doing it in views/layouts/default.ctp On Aug 21, 6:53 am, kdubya kenwin...@winanstech.com wrote: On Aug 19, 9:01 am, zaboo adambartholo...@gmail.com wrote: Don't echo $this-Session-setFlash() On Aug 19, 8:27 am, Chander Bhan gotob

Re: related to Session-setFlash

2009-08-21 Thread Dr. Loboto
Yes. On Aug 21, 8:53 am, kdubya kenwin...@winanstech.com wrote: On Aug 19, 9:01 am, zaboo adambartholo...@gmail.com wrote: Don't echo $this-Session-setFlash() On Aug 19, 8:27 am, Chander Bhan gotob...@gmail.com wrote: I always get the digit 1 in the next line of the message sent

Re: related to Session-setFlash

2009-08-20 Thread kdubya
On Aug 19, 9:01 am, zaboo adambartholo...@gmail.com wrote: Don't echo $this-Session-setFlash() On Aug 19, 8:27 am, Chander Bhan gotob...@gmail.com wrote: I always get the digit 1 in the next line of the message sent through Session-setFlash from controller, need help I don't understand

related to Session-setFlash

2009-08-19 Thread Chander Bhan
I always get the digit 1 in the next line of the message sent through Session-setFlash from controller, need help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email

  1   2   3   >