adding input dynamic
I am trying to create a dynamic input but it does not send the data someone could help me? Add.ctp: div class='related' ?php $this-Html-script('jquery-2.0.0.min.js',array('inline' = false)); ? table id='band_list' th?php echo $this-Form-input('Pedido.0.descricao'); ?/th th?php echo $this-Form-input('Pedido.0.quantidade'); ?/th th?php echo $this-Form-input('Pedido.0.unidade'); ?/th th?php echo $this-Form-input('Pedido.0.desconto'); ?/th th?php echo $this-Form-input('Pedido.0.subtotal'); ?/th /table button id='add_band'Add Band/button script type='text/javascript' var contador = 1; $('#add_band').click(function(event) { event.preventDefault(); $('#band_list').append('th?php echo $this-Form-input(Pedido.'+contador+'.descricao); ?/th'); $('#band_list').append('th?php echo $this-Form-input(Pedido.'+contador+'.quantidade); ?/th'); $('#band_list').append('th?php echo $this-Form-input(Pedido.'+contador+'.unidade); ?/th'); $('#band_list').append('th?php echo $this-Form-input(Pedido.'+contador+'.desconto); ?/th'); $('#band_list').append('th?php echo $this-Form-input(Pedido.'+contador+'.subtotal); ?/th'); $('#band_list').append('tbody/tbody'); contador++; }); /script ?php echo $this-Form-end('Salvar'); echo $this-Html-link('Cancelar', array('action'='index')); ? /div ServicosController.php: public function add() { if($this-request-is('post')) { //debug($this-request-data);exit; $this-Servico-create(); if ($this-Servico-saveAll($this-request-data)) { $this-Session-setFlash('Os dados do serviço foram salvos.'); return $this-redirect(array('action' = 'view/'.$this-Servico-id)); } else { $this-Session-setFlash('Os dados do serviço não puderam ser salvos.'); } } #$servico = $this-Servico-findById('all'); #$this-set('servico', $servico); $clientes = $this-Servico-Cliente-find('list'); $this-set('clientes', $clientes); $especialidades = $this-Servico-Especialidade-find('list'); $this-set('especialidades', $especialidades); $vendedores = $this-Servico-Vendedor-find('list'); $this-set('vendedores', $vendedores); $atendentes = $this-Servico-Atendente-find('list'); $this-set('atendentes', $atendentes); $pedidos = $this-Servico-Pedido-find('list'); $this-set('pedidos', $pedidos); } -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Postgresql for Oracle in CakePHP
Hi, I'm working on a system, using CakePHP 1.1 and database PostgreSQL. There's a change of the database from PostgreSQL for Oracle. Someone had issue with something like it? Someone suggests some version of the Cake that works well with Oracle? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Notice (8): Undefined variable:
hello people I'm with a little problem on my cake 2.2.1 good staff my mistake and the next I'm creating a query and when I call the variable that received this query in my view the error Notice (8): Undefined variable: my function on controller this way; function to list the banks public function setBancos () { $ banks = $ this- Database- find ('list', array ( 'fields' = array ('Banco.id', 'Banco.nome') 'order' = 'ASC Banco.nome' 'recursive' = -1 ) ); $ this- set ('database', $ banks); } a view like this ? echo $ banks ? I want to appear in all banks view more of this error Notice (8): Undefined variable: you guys can help me? when I generate the crud by automatic cake bake all it brings me more listing everything right when I create the cake manual identifies the variable is not passed by the controller $ this- set ('database', $ banks), in my view if someone could helps me will be grateful! -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
isOwnedBy trouble belongsTo more than 1 model
Hi I'm having trouble with the isOwnedBy when some I have model that belongsTo more than 1 model. Example: My User has a Post. This is has a Comment. So by the logical sense, the Comment belongsTo Post, but the Comment belongTo User too. And the function isOwnedBy is not working with the 3 Ids needed in this case. Thanks in advance. -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: Image upload with Cake 2.x
Hey man, I had changed the Meioupload from the old cakephp to 2.1 version. Check this link: http://forum.imasters.com.br/topic/456426-usando-meioupload-no-cakephp-20 It works, included update, besides it does not remove the old image from the folder. 2012/6/26 Florian Krämer bur...@doomzone.de https://github.com/burzum/FileStorage Reading the readme.md is highly recommended. On Monday, June 25, 2012 3:06:49 PM UTC+2, Stefanie wrote: Hey guys, I was looking for a working version for simply uploading user images shown as thumbnail on their profile page. I already found this approach http://www.wilsolutions.com.** br/content/image-upload-**cakephp-20http://www.wilsolutions.com.br/content/image-upload-cakephp-20 but for some reason I didn't get it to work :-(( Has anybody an idea how I can include this functionality? Kind regards, Stefi -- 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 -- 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 to extract the pots files?
I don't know how to do this. Can you explain? Give me a example. I need to create a new file? in which folder I put in the file? On Oct 27, 7:28 am, AD7six andydawso...@gmail.com wrote: On Oct 26, 3:53 pm, santos dos.santos.char...@gmail.com wrote: Hi I had to make my own function __d and put in bootstrap file, like 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); } In the views I use: __myd('public', 'Hello world'); I tried to extract the pots files using 'cake i18n extract' in terminal, but didnt work... because I created my own function to translate. How can i extract the pots files? Well you'll need to write your own extract task, extending the core extract task and call $this-_parse('__myd', array('domain', 'singular')); in it. AD -- 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 to extract the pots files?
Resolved! :) Thanks! My solution: I create /vendors/shells/myextract.php : class MyextractShell extends Shell { var $tasks = array('Extract', 'Myextract'); function main() { $this-Myextract-execute(); } } I create vendors/shells/tasks/myextract.php : class MyextractTask extends ExtractTask { function __extractTokens() { foreach ($this-__files as $file) { $this-__file = $file; $this-out(sprintf(__('Processing %s...', true), $file)); $code = file_get_contents($file); $allTokens = token_get_all($code); $this-__tokens = array(); $lineNumber = 1; foreach ($allTokens as $token) { if ((!is_array($token)) || (($token[0] != T_WHITESPACE) ($token[0] != T_INLINE_HTML))) { if (is_array($token)) { $token[] = $lineNumber; } $this-__tokens[] = $token; } if (is_array($token)) { $lineNumber += count(explode(\n, $token[1])) - 1; } else { $lineNumber += count(explode(\n, $token)) - 1; } } unset($allTokens); $this-__parse('__', array('singular')); $this-__parse('__n', array('singular', 'plural')); $this-__parse('__d', array('domain', 'singular')); $this-__parse('__c', array('singular')); $this-__parse('__dc', array('domain', 'singular')); $this-__parse('__dn', array('domain', 'singular', 'plural')); $this-__parse('__dcn', array('domain', 'singular', 'plural')); $this-__parse('__myd', array('domain', 'singular')); $this-__parse('__mydn', array('domain', 'singular', 'plural')); } } } and execute in terminal: cake myextract Thanks! -- View this message in context: http://cakephp.1045679.n5.nabble.com/How-can-I-extract-the-pots-files-tp4939833p4943728.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
How to extract the pots files?
Hi I had to make my own function __d and put in bootstrap file, like 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); } In the views I use: __myd('public', 'Hello world'); I tried to extract the pots files using 'cake i18n extract' in terminal, but didnt work... because I created my own function to translate. How can i extract the pots files? -- View this message in context: http://cakephp.1045679.n5.nabble.com/How-to-extract-the-pots-files-tp4939833p4939833.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 to extract the pots files?
I need to put all messages who is translated with __d() and __dn() in array to use in the botton of the page to use in 'SpeakLike Review Bar'. 'SpeakLike Review Bar is a widget that makes it easy to provide translation feedback for a website' so I had to make my own function __myd , __mydn and put in bootstrap file,... The only problem is when i try to extract the pots files -- View this message in context: http://cakephp.1045679.n5.nabble.com/How-can-I-extract-the-pots-files-tp4939833p4939911.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 to extract the pots files?
Because I need to put in the bottom of the page only the messages that were translated in the current page. Thanks. -- View this message in context: http://cakephp.1045679.n5.nabble.com/How-can-I-extract-the-pots-files-tp4939833p4939945.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 to extract the pots files?
Preciso que no final da pagina antes do /body colocar em um array javascript todas as frases que foram traduzidas na pagina que esta sendo mostrada! Eu consegui resolver a parte de colocar as frases no array javascript criando a minha propria funcao __d() criei a funcao __myd() e coloquei no bootstrap... Porem assim nao consegui mais gerar os pot =\ Infelizmente não serve a opção de ler os arquivos pots e escrever eles! ja que so tenho que mostrar as frases traduzidas da corrente pagina! . -- View this message in context: http://cakephp.1045679.n5.nabble.com/How-can-I-extract-the-pots-files-tp4939833p4941428.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() ?
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() ?
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() ?
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() ?
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() ?
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
How can I override the method __d() ?
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
Re: Login to a CakePHP application from another site doesn't work
Try to change the security level, I think cakephp block acess from other domains, depending the level of security. 2011/9/16 WebbedIT p...@webbedit.co.uk There is a reason they are slightly more involved and in your eyes excessive, because they ensure a level of security! You should never accept POST data which did not originate from a form on your site (and never accept data that is not POSTed) unless that sites has been previously authenticated and has some sort of key/token in place (i.e. as part of an API/RESTful app). HTH, Paul @phpMagpie On Sep 15, 8:33 am, byqsri marco.rizze...@gmail.com wrote: For the thing that I must do I think that is excessive use OAuth or OpenID. Do a simple autologin with javascript I think that is the better solution. Do CakePHP forbid to do a login from a page that isn't the loginAction of Auth component ? On 15 Set, 08:04, Zaky Katalan-Ezra procsh...@gmail.com wrote: Use oauth http://oauth.net/, openid http://openid.net/ ... On Wed, Sep 14, 2011 at 7:56 PM, byqsri marco.rizze...@gmail.com wrote: Hi I have my web application in CakePHP . All works fine. Now I would do an autologin in my web application from another site . To do this I have done a identical login form in my site and with javascrpt I post it to my web application. But it doesn't work . With this method I can't login to my web application . I always redirect tio login page. I have verify that the session is lost between the login and the redirect to initial page of my web application. Can someone help me about this? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp 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 athttp://groups.google.com/group/cake-php -- Regards, Zaky Katalan-Ezra QA Administratorwww.IGeneriX.com Sites.IGeneriX.com 054-7762312 -- 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 -- 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
Error Acl behavior
Hi mates, Firstly, sorry for my english basic.. I'm following the Examples in the main page of the book.cakephp.org to do a ACL It was all right until that part Acts As a Requester, when I put that code var $actsAs = array('Acl' = 'requester') (ACL Behavior) into user model the application shows a error like that 'Error: the URL / users/login was not found on this server. ... It took me 2 days and I do'nt know what to do. I hope that you can help me. Hugs -- Tássio Ricardo 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: want to use database store procedure with cakephp
I think that you can just call de sp , something like this $this-query(call sp_YourStoredProcedure) 2010/10/1 Ma'moon phpir...@gmail.com I really think that the core developers should include this feature in CakePHP 2.0 since this is getting into a big demand all over the frameworks users, for example Yii is already supporting this feature and am not sure if other frameworks already supports or not but certainly for Cake this is going to be a very huge step a head :-) On Fri, Oct 1, 2010 at 6:11 AM, rakeysh patel.rake...@gmail.com wrote: Hi any body has any idea ,how to use store procedure with cakephp thanks 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.comcake-php%2bunsubscr...@googlegroups.comFor 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.comcake-php%2bunsubscr...@googlegroups.comFor 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
Re: Paginate losing $this-data
I got the same problem today and i fixed it just doing: $paginator-options(array('with' = 'Form.serialize(Form ID)')); On 11 Nov, 03:15, Michael Gaiser mjgai...@gmail.com wrote: So I want to display all the results from my table that are like the search string. Since there is a lot, I am using the paginate functions so we only display 20 at a time. This works fine, but once I click the link to the next 20 results, it loses the search string because it was originally pulled from $this-data[] and I guess that is lost the 2nd time the paginate function is run. Does anyone know a work around for this or am I doing it wrong? ~MG -- 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, visit this group at http://groups.google.com/group/cake-php?hl=.