Re: How can I override the method __d() ?

2011-10-25 Thread santos
I resolve the problem doing this: 

function __myd($domain, $msg, $return = false) { 
$str = __d($domain, $msg, true); 
$var = array('translation' => $str, 'md5'=> md5($str));
$count = count(Configure::read('var')) + 1;
Configure::write("speaklike.$count", $var);
return __d($domain, $msg, $return);
} 

and: 

function getVarD(){ 
return Configure::read('var');
} 


--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/How-can-I-override-the-method-d-tp4918678p4936936.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: How can I override the method __d() ?

2011-10-25 Thread santos
any help?? :(

--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/How-can-I-override-the-method-d-tp4918678p4936383.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: How can I override the method __d() ?

2011-10-23 Thread santos
I need to put all msgs who use the function  __d() in array to use in the
botton of the page.

So i create my own function:

function __myd($domain, $msg, $return = false) { 
 $var[] =__d($domain, $msg, true); 
return __d($domain, $msg, $return = false); 
} 

and:

function getVarD(){
 return $var;
}

In the view page have some:
echo __myd(...);

and in the botton of the page I put:
print_r(getVarD());  // but this return empty... and I need to return all
msgs who I called using the funciton __myd().

How can I do this?

Thanks

--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/How-can-I-override-the-method-d-tp4918678p4930552.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: How can I override the method __d() ?

2011-10-23 Thread Miles J
Bootstrap would be the best location.

On Oct 23, 11:05 am, santos  wrote:
>  in bootstrap file? Or the correct is in the View Helper?
>
> Thanks.
>
> --
> View this message in 
> context:http://cakephp.1045679.n5.nabble.com/How-can-I-override-the-method-d-...
> Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: How can I override the method __d() ?

2011-10-23 Thread santos
 in bootstrap file? Or the correct is in the View Helper?

Thanks.

--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/How-can-I-override-the-method-d-tp4918678p4930014.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: How can I override the method __d() ?

2011-10-21 Thread santos
I am trying to make my own function

Where i put my own function? in bootstrap file?

like this?

function __myd($domain, $msg, $return = false) {
 $var[] =__d($domain, $msg, true); 
return __d($domain, $msg, $return = false);
}





--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/How-can-I-override-the-method-d-tp4918678p4925577.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: How can I override the method __d() ?

2011-10-19 Thread Miles J
You shouldnt override it.

Cant you just do: $var = array(__d());

Or make your own function?

function ___d() { }

On Oct 19, 10:19 am, santos  wrote:
> How can I override the method __d() ?
>
> I need to put the msg of  __d() in array to use in the botton of the page.
>
> Where can I override this methos? in appcontroller?
>
> Thanks
>
> --
> View this message in 
> context:http://cakephp.1045679.n5.nabble.com/How-can-I-override-the-method-d-...
> Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


How can I override the method __d() ?

2011-10-19 Thread santos
How can I override the method __d() ? 

I need to put the msg of  __d() in array to use in the botton of the page. 

Where can I override this methos? in appcontroller? 

Thanks

--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/How-can-I-override-the-method-d-tp4918678p4918678.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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