Re: Changes in CakePHP and new plugins
So, What did happen to the old tickets at code.cakephp.org and trac? Do you have any plans to migrate them to the new bug tracker at lighthouse? If it's not possible to transfer them, I think, at least we should keep them in a readonly state for future references. On Dec 10, 7:06 am, mark_story wrote: > Number [2] should > behttp://cakephp.lighthouseapp.com/projects/42649-cakephp-2x/overview 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
paginator sort on custom field
Hello, I m having a problem with paginator sort functionality. I use paginator to get result then i calcualte a field name *"Util"* on the record. I want to use paginator on *"Util". *Can any on eknow how to do that? Thanks, Amit 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: Internationalization in Cakephp help( for a newbie)
Hi, when I tried to create po file. I am getting the following error message xgettext: waring: file`' extension `' is unknown; will try C updation failed. click >>> more I have given path controllers views/posts . and keyword as __ But updation is failing.. Please guide.. Thanks in advance Jay 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: Testing for Ajax
Thank you - I don't suppose you have a simple example do you? On Dec 11, 4:12 am, "Dr. Loboto" wrote: > Pass one URL to AJAX link as link url and other to it's options as > AJAX action param. > > On Dec 10, 11:37 pm, Jeremy Burns wrote: > > > > > Thank you, but that isn't working for me. I have a link that retrieves > > some data and populates a div with an element. With Javascript > > disabled I just get the contents of the element in an otherwise blank > > screen. What I want to do is something like this: > > > If (javascript is enabled): > > show this link > > else > > show another link > > end if > > > So what I am looking for is a nifty little piece of code to do the "if > > javascript is enabled" bit. > > > On Dec 10, 5:27 pm, "Dr. Loboto" wrote: > > > > AJAX links and forms in Cake AJAX helper has fallback. If JS is not > > > enabled links/forms will work as normal ones. > > > > On Dec 10, 6:58 pm, Jeremy Burns wrote: > > > > > I want to use the Ajax helper when Javascript is enabled, but revert > > > > to the plain old ordinary html helper when it is not. How can I do a > > > > simple test to see if Javascript is enabled? 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: Testing for Ajax
Pass one URL to AJAX link as link url and other to it's options as AJAX action param. On Dec 10, 11:37 pm, Jeremy Burns wrote: > Thank you, but that isn't working for me. I have a link that retrieves > some data and populates a div with an element. With Javascript > disabled I just get the contents of the element in an otherwise blank > screen. What I want to do is something like this: > > If (javascript is enabled): > show this link > else > show another link > end if > > So what I am looking for is a nifty little piece of code to do the "if > javascript is enabled" bit. > > On Dec 10, 5:27 pm, "Dr. Loboto" wrote: > > > > > AJAX links and forms in Cake AJAX helper has fallback. If JS is not > > enabled links/forms will work as normal ones. > > > On Dec 10, 6:58 pm, Jeremy Burns wrote: > > > > I want to use the Ajax helper when Javascript is enabled, but revert > > > to the plain old ordinary html helper when it is not. How can I do a > > > simple test to see if Javascript is enabled? 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: unbindModel cranium scratcher
Of course, it's the syntax again.. $myScroll->User->unbindModel('hasMany',array('Photo')); Should read $myScroll->User->unbindModel(array('hasMany'=>array('Photo'))); _ From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Alan Asher Sent: Thursday, December 10, 2009 7:34 PM To: cake-php@googlegroups.com Subject: unbindModel cranium scratcher Here's the code I used to hack my way through this. $myScroll=new Scroll($scroll_id); $myScroll->User->bindModel( array('hasMany' => array( 'Photo' => array( 'className' => 'Photo', 'foreignKey' => 'user_id', 'dependent' => false, 'conditions' => '1=0', //hack to make the results limited since unbind model doesn't work 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ) ) ) ); $myScroll->Behaviors->attach('Containable'); $myScroll->User->unbindModel('hasMany',array('Photo')); $data = $myScroll->find('all',array('recursive'=>2, 'contain'=>array('User','User.Photo'), 'conditions'=>array('Scroll.id'=>$scroll_id),'limit'=>20)); pr($data); $this->controller->set('userScroll',$data); The models are: User has many scrolls and scroll has and belongs to many users , users belong to photos and has many photos Earlier this week I figured out how to use the unbindModel to get rid of the hasMany from my user model and it worked perfectly. But now I'm instantiating my own model and it seems to be behaving differently. I expect this $myScroll->User->unbindModel('hasMany',array('Photo')); to work but it doesn't do a flippin thing. So I hacked it by modifying the user's has many photos model to never return a result. Does anyone know what I'm doing wrong? Alan 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
unbindModel cranium scratcher
Here's the code I used to hack my way through this. $myScroll=new Scroll($scroll_id); $myScroll->User->bindModel( array('hasMany' => array( 'Photo' => array( 'className' => 'Photo', 'foreignKey' => 'user_id', 'dependent' => false, 'conditions' => '1=0', //hack to make the results limited since unbind model doesn't work 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ) ) ) ); $myScroll->Behaviors->attach('Containable'); $myScroll->User->unbindModel('hasMany',array('Photo')); $data = $myScroll->find('all',array('recursive'=>2, 'contain'=>array('User','User.Photo'), 'conditions'=>array('Scroll.id'=>$scroll_id),'limit'=>20)); pr($data); $this->controller->set('userScroll',$data); The models are: User has many scrolls and scroll has and belongs to many users , users belong to photos and has many photos Earlier this week I figured out how to use the unbindModel to get rid of the hasMany from my user model and it worked perfectly. But now I'm instantiating my own model and it seems to be behaving differently. I expect this $myScroll->User->unbindModel('hasMany',array('Photo')); to work but it doesn't do a flippin thing. So I hacked it by modifying the user's has many photos model to never return a result. Does anyone know what I'm doing wrong? Alan 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: Model class not found
class Tag extends AppModel { var $name = 'Tag'; } Simple syntax error... You need to have the "var" in front of the $name. -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Jim Rootham Sent: Thursday, December 10, 2009 12:30 PM To: CakePHP Subject: Model class not found I am trying out cakePHP so I have a very simple site. I get the following error. class Tag extends AppModel { $name = 'Tag'; } Fatal error: Class 'Tag' not found in /home/downtown/public_html/ test_cake/cake/libs/class_registry.php on line 140 in ..\app\models\tag.php I have class Tag extends AppModel { $name = 'Tag'; } What silly blunder am I making? I have tried clearing tmp/cache and I have reloaded cakePHP from scratch. I have seen this error in Google searches but it was a relatively obvious syntax error. I am asking here because the answers site at cakephp is not sending me confirmation emails. 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.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
Re: Running the action twice?
I actually just noticed the same behavior today. For testing an email method, I called it at the end of an index action. I got two copies of the email. Normally, the mail will be sent after filtering through some conditionals, so I don't think it will be a problem. I do have a connect method assigned to the action I was testing in. Other than that, I don't know why the index action was called twice. Jeff On Thu, Dec 10, 2009 at 12:24 PM, Dr. Loboto wrote: > You can check is it "internal redirect" (like requestAction) or actual > one by checking HTTP requests. If there are two HTTP request you need > to search redirect in code, if no - the problem is in requestAction or > setAction or direct call of this method. > > On Dec 10, 8:18 pm, bujanga wrote: > > There was a requestAction called from my layout BUT I disabled it > > during troubleshooting. In fact, All links to js, css, and images are > > stripped from my layout and views. I have no beforeRender or > > afterFilter. > > > > View still reloads. Odd thing is, it goes twice when called via a > > redirect from another action but not when it is refreshed by F5. > > > > Getting frustrated. Will check to see if other views are going twice. > > > > Gary > > 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.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: Create .ctp file
On Wed, Dec 9, 2009 at 7:19 PM, 00Cake wrote: > Hi All, > > I am starting discovering CakePHP and have try to do the blog tutorial > > Here is a trivial question: > > How to create a view ? How to create a .ctp file ?? There is "nothing" special about that. Just open notepad, gedit, kate or other plain text editor, create html content and save the file with .ctp extension. > > I have not find nothing about that!! Ahn... have you tryied the CakePHP cookbook? http://book.cakephp.org/view/26/View-Conventions Best regards. -- MARCELO DE F. ANDRADE Belem, PA, Amazonia, Brazil Linux User #221105 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
session vars being lost with java applet
Hi, I have a java applet that posts xml back to cake and returns information. I have lowered the session security to a 'low' value, set the check agent value to false to overcome the initial problems of the sessions being lost. This works fine on my local server on my mac. I uploaded to the live server and the sessions have broken again. The session gets regenerated when the applet posts the information and I can't think what else I can change hence me turning to you guys. Does anyone have any idea of what could be causing the sessions to not be associated with the java app? Thanks in advance Jim 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
Model class not found
I am trying out cakePHP so I have a very simple site. I get the following error. class Tag extends AppModel { $name = 'Tag'; } Fatal error: Class 'Tag' not found in /home/downtown/public_html/ test_cake/cake/libs/class_registry.php on line 140 in ..\app\models\tag.php I have class Tag extends AppModel { $name = 'Tag'; } What silly blunder am I making? I have tried clearing tmp/cache and I have reloaded cakePHP from scratch. I have seen this error in Google searches but it was a relatively obvious syntax error. I am asking here because the answers site at cakephp is not sending me confirmation emails. 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.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Guide on creating first application
What's your model name for the utilizadores table? My guess is CakePhp's inflector is not dealing very well with the portuguese plural rules Utilizador <-> Utilizadores. You could get the portuguese inflections maintened by the portuguese/brazilian cakephp community http://groups.google.com/group/cake-php-pt On Thu, Dec 10, 2009 at 10:50 AM, Délsio Cabá wrote: > Hi all, > > I am about to create my first application with cakephp. > Actuallly I'm an experienced php programmer. > > I already went to the guide on creating the blog application. > > Find attached my database structure. > > As you can see I have many relationships. > > I tried through the console creating the forms, but for some reason I can't > get them to work, I get this error when I try to add a new record: > > *Notice* (8): Undefined property: Utilizadore::$Utilizadorescategoria > [*APP/controllers/utilizadores_controller.php*, line *51*] > Code | Context > > $this->data = $this->Utilizadore->read(null, $id); > } > $utilizadorescategorias = > $this->Utilizadore->Utilizadorescategoria->find('list'); > > $id = "1" > > UtilizadoresController::edit() - APP/controllers/utilizadores_controller.php, > line 51 > Object::dispatchMethod() - CORE/cake/libs/object.php, line 125 > > Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 240 > Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 206 > [main] - APP/webroot/index.php, line 83 > > > *Fatal error*: Call to a member function find() on a non-object in * > /home/webmasters/domains/sioas/public_html/app/controllers/utilizadores_controller.php > * on line *51* > > All I need to now is to have forms to fill all those tables. > > Regards > > 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.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: Media Views, Caching, and Auth - a possible problem
#2 - Apparently if the browser does not have the capability to load the file in the browser, the session seems to be broken; though I'm not sure why after re-authenticating it will work non-stop. I've changed my method to check the file extension, and if it's a PDF it will load it in the browser, otherwise it will force a download. I'm still puzzled by the first issue (and admittedly why the 2nd problem is a problem). On Dec 8, 6:09 pm, Dave wrote: > I don't think is_numeric returns true for boolean values > > On Tue, Dec 8, 2009 at 12:41 PM, BrendonKoz wrote: > > I'm having a bit of an awkward time with Media Views recently after > > extending my site to use a controller I had built using it (Document > > Controller). I'm experiencing a couple things: > > > 1. Internet Explorer seems to not actually load the file if caching is > > either set to false, or simply not set. > > > 2. It seems that randomly (I have yet to pinpoint and replicate this) > > the Auth session will require re-authentication for the media file > > that is being downloaded (not a forced download), even if a user just > > logged in. Once they re-authenticate for any Media View file, any > > further media views seem to open just fine. > > > My controller's function to use the Media Views is below: > > function download($path, $filename){ > > $this->view = 'Media'; > > $extension = $this->getExtension($this->here); > > $params = array( > > 'id' => $filename.'.'.$extension, > > 'cache' => 10, //10 seconds -- had issues > > with no cache > > 'download' => false, //render in browser if possible > > 'extension' => $extension, > > 'path' => DS.'documents'.DS.$path.DS > > ); > > $this->set($params); > > } > > > Prior to these issues, I had the cache set to 15 minutes. I tried to > > change it to use no cache as users would look at an old file, > > overwrite that file, and then check the new file to see if it was > > successful - because of the cache set in the browser, they wouldn't > > see the new file. I'm not as concerned over fixing that problem as I > > am with the two problems listed above. > > > Does anyone have any ideas? > > > I'm somewhat concerned with the following lines in cake/libs/view/ > > media.php @ line 186: > > if(!is_numeric($cache)){ > > $cache = strtotime($cache) - time(); > > } > > > If $cache is true, or even false, the cache will end up being > > negative. Was this intended? Could this cause issues with IE? I'm > > still unsure where the re-authentication issues could be occurring. > > (I'm running CakePHP 1.2.4.8284 according to cake/VERSION.txt - but > > the source code from the example came from the Cake API - > >http://api.cakephp.org/view_source/media-view/#l-186) > > > 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.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: Media Views, Caching, and Auth - a possible problem
I tested it; it does. A boolean value equates to 0 or 1 unless you can use the strict operation (===). Is numeric is not strict enough, it seems. On Dec 8, 6:09 pm, Dave wrote: > I don't think is_numeric returns true for boolean values > > On Tue, Dec 8, 2009 at 12:41 PM, BrendonKoz wrote: > > I'm having a bit of an awkward time with Media Views recently after > > extending my site to use a controller I had built using it (Document > > Controller). I'm experiencing a couple things: > > > 1. Internet Explorer seems to not actually load the file if caching is > > either set to false, or simply not set. > > > 2. It seems that randomly (I have yet to pinpoint and replicate this) > > the Auth session will require re-authentication for the media file > > that is being downloaded (not a forced download), even if a user just > > logged in. Once they re-authenticate for any Media View file, any > > further media views seem to open just fine. > > > My controller's function to use the Media Views is below: > > function download($path, $filename){ > > $this->view = 'Media'; > > $extension = $this->getExtension($this->here); > > $params = array( > > 'id' => $filename.'.'.$extension, > > 'cache' => 10, //10 seconds -- had issues > > with no cache > > 'download' => false, //render in browser if possible > > 'extension' => $extension, > > 'path' => DS.'documents'.DS.$path.DS > > ); > > $this->set($params); > > } > > > Prior to these issues, I had the cache set to 15 minutes. I tried to > > change it to use no cache as users would look at an old file, > > overwrite that file, and then check the new file to see if it was > > successful - because of the cache set in the browser, they wouldn't > > see the new file. I'm not as concerned over fixing that problem as I > > am with the two problems listed above. > > > Does anyone have any ideas? > > > I'm somewhat concerned with the following lines in cake/libs/view/ > > media.php @ line 186: > > if(!is_numeric($cache)){ > > $cache = strtotime($cache) - time(); > > } > > > If $cache is true, or even false, the cache will end up being > > negative. Was this intended? Could this cause issues with IE? I'm > > still unsure where the re-authentication issues could be occurring. > > (I'm running CakePHP 1.2.4.8284 according to cake/VERSION.txt - but > > the source code from the example came from the Cake API - > >http://api.cakephp.org/view_source/media-view/#l-186) > > > 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.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: Internationalization in Cakephp help( for a newbie)
What kind of sample code? All you need to do is , and then define it in the .po files. // default.po msgid "This string will be translated" msgstr "" 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: global functions
No thats incorrect. If its a global function that is used everywhere, it goes in the bootstrap. On Dec 10, 6:05 am, Giedrius Rekasius wrote: > On Thu, 2009-12-10 at 05:32 -0800, Ernesto wrote: > > Hello. > > > i have some simple functions such as > > > array_depth > > array_width > > array_integrate > > > and so on > > > that are used in both Controllers and Views. > > > it's very uncomfortable to copy them in a helper and in a component @ > > every little mod. > > Put them in app/app_controller.php > > -- > Regards, > Giedrius Rekasius 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: Testing for Ajax
Thank you, but that isn't working for me. I have a link that retrieves some data and populates a div with an element. With Javascript disabled I just get the contents of the element in an otherwise blank screen. What I want to do is something like this: If (javascript is enabled): show this link else show another link end if So what I am looking for is a nifty little piece of code to do the "if javascript is enabled" bit. On Dec 10, 5:27 pm, "Dr. Loboto" wrote: > AJAX links and forms in Cake AJAX helper has fallback. If JS is not > enabled links/forms will work as normal ones. > > On Dec 10, 6:58 pm, Jeremy Burns wrote: > > > > > I want to use the Ajax helper when Javascript is enabled, but revert > > to the plain old ordinary html helper when it is not. How can I do a > > simple test to see if Javascript is enabled? 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: Database field not reading or writing
On Thu, 2009-12-10 at 06:42 -0800, WhyNotSmile wrote: > I've come across a really strange problem - or else I'm doing > something really stupid. > > Basically, there is a field in one of my db tables which Cake just > seems to be ignoring. The field is in a table called 'Users', and is > called 'recommendations'. > > When I do > > $this->User->findById($userid); > > it works fine, gets the user and all the information, apart from that > one field, which it reads in as null. It is definitely populated in > the database. Also, when I try to save to it, it just ignores me - > doesn't reset it or anything, and no error messages, it just doesn't > seem to do anything. > > This is driving me crazy! > > Has anyone come across something similar? Is there maybe a setting or > something in the database? Hey, Try to clear your model cache (app/tmp/cache/models). -- Regards, Giedrius Rekasius 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: global functions
On Thu, 2009-12-10 at 05:32 -0800, Ernesto wrote: > Hello. > > i have some simple functions such as > > array_depth > array_width > array_integrate > > and so on > > that are used in both Controllers and Views. > > it's very uncomfortable to copy them in a helper and in a component @ > every little mod. Put them in app/app_controller.php -- Regards, Giedrius Rekasius 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: form->input keeps value after submit is presed
Or you can use for ajax a normal jQuery function like: function SaveDataByAjax(postid){ $.ajax({ type: "GET", url: "http://www.domain.com/posts/getviewbyajax/"+postid, data: "", success: function(msg){ ...; } }); spor la treaba ;) > $this->render('url'=>'/posts/view'.$this->data['Post']['id'],'ajax'); On 9 Dez., 09:08, Andrei BOGDAN wrote: > I want to redirect to /posts/view/Id_view. So my code shoul look like: > [code] > $this->render('url'=>'/posts/view'.$this->data['Post']['id'],'ajax'); > [/code] > Is this the correct way? > - > Andrei Bogdan > > 2009/12/9 Dave : > > > Don't render add_success, redirect to the action you want > > > On Tue, Dec 8, 2009 at 4:07 PM, Andrei BOGDAN > > wrote: > > >> Hello, > >> My add action in comments_controller looks like this now: > >> [code] > >> function add() { > >> if (!empty($this->data)) { > >> if ($this->Comment->save($this->data)) { > >> $comments = $this->Comment->find('all', > >> array('conditions' => > >> array('post_id' => $this->data['Comment']['post_id']), 'recursive' => > >> -1)); > >> unset($this->data['Comment']); > >> $this->data = $this->Comment->create(); > >> $this->set(compact('comments')); > >> $this->render('add_succes','ajax'); > >> } else { $his->render('add_failure','ajax');} > >> } > >> } > >> [/code] > >> I used with firebug to debug the app and I saw that when I render > >> 'add_succes' $_POST keeps the old values instead of clearing them. > > >> - > >> Andrei Bogdan > > >> 2009/12/8 John Andersen : > >> > Ok, sorry, didn't see you were using the $this->data variable later > >> > inside the if statement, so please move the statement: > > >> > $this->data = $this->Comment->create(); > > >> > after your find statement. The find statement uses the data from the > >> > $this->data variable! > > >> > Tell us if the above fixes your problem, or what Chickenhen wrote did! > >> > Enjoy, > >> > John > > >> > On Dec 7, 10:00 pm, Andrei BOGDAN > >> > wrote: > >> >> I've change my code and the add action from comments controller looks > >> >> like this: > >> >> [code] > >> >> function add() { > >> >> if (!empty($this->data)) { > >> >> if ($this->Comment->save($this->data)) { > >> >> $this->data = $this->Comment->create(); > >> >> $comments = $this->Comment->find('all', > >> >> array('conditions' => > >> >> array('post_id' => $this->data['Comment']['post_id']), 'recursive' => > >> >> -1)); > >> >> $this->set(compact('comments')); > >> >> $this->render('add_succes','ajax'); > >> >> } else { $his->render('add_failure','ajax');} > >> >> } > >> >> } > >> >> [/code] > >> > [snip] > > >> > 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 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 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 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: Solution for multi-lingual application with the same content
On Thu, 2009-12-10 at 03:09 -0800, dev wrote: > I need solution for multi-lingual application where are galleries, > product's categories and product list. > > Let's say i create gallery, product's categories and products in > primary language and i need to translate them in second language, but > with the same gallery images, product categories and products. I don't > want to upload the same images to gallery, create the same products > and so on, just in another language. > > What solution would be best for this? I want to translate these items > in my custom cms, not .po files. If you have a lot of products and product list tend to change there would be better to have this DB structure: PRODUCT (id, name, desc, other properties in main language). PRODUCT_$LANG (id, product_id, name, desc, other text properties in whatever language you want). And to get translated values, you just join these tables. -- Regards, Giedrius Rekasius 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: Solution for multi-lingual application with the same content
On Thu, 2009-12-10 at 03:09 -0800, dev wrote: > I need solution for multi-lingual application where are galleries, > product's categories and product list. > > Let's say i create gallery, product's categories and products in > primary language and i need to translate them in second language, but > with the same gallery images, product categories and products. I don't > want to upload the same images to gallery, create the same products > and so on, just in another language. > > What solution would be best for this? I want to translate these items > in my custom cms, not .po files. I would use the same principle as is used in CakeCMS locale files, but just hold all info in the DB table so it can be easily edited through CMS. -- Regards, Giedrius Rekasius 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: Solution for multi-lingual application with the same content
Thanks :) Have you looked into using i18n in your application? See http://book.cakephp.org/view/92/Translate Enjoy, John On Dec 10, 4:25 pm, dev wrote: > of course i'm using CakePHP, 1.2 version. I have some ideas, but i > think there must be a simple solution. > > On Dec 10, 1:39 pm, John Andersen wrote: > > > Are you using CakePHP? Is it even related to CakePHP? > > Your problem sounds simple to solve, at least in CakePHP! > > What are you using? > > Enjoy, > > John [snip] 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: Testing for Ajax
AJAX links and forms in Cake AJAX helper has fallback. If JS is not enabled links/forms will work as normal ones. On Dec 10, 6:58 pm, Jeremy Burns wrote: > I want to use the Ajax helper when Javascript is enabled, but revert > to the plain old ordinary html helper when it is not. How can I do a > simple test to see if Javascript is enabled? 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: Running the action twice?
You can check is it "internal redirect" (like requestAction) or actual one by checking HTTP requests. If there are two HTTP request you need to search redirect in code, if no - the problem is in requestAction or setAction or direct call of this method. On Dec 10, 8:18 pm, bujanga wrote: > There was a requestAction called from my layout BUT I disabled it > during troubleshooting. In fact, All links to js, css, and images are > stripped from my layout and views. I have no beforeRender or > afterFilter. > > View still reloads. Odd thing is, it goes twice when called via a > redirect from another action but not when it is refreshed by F5. > > Getting frustrated. Will check to see if other views are going twice. > > Gary 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: Database field not reading or writing
What is the column type of the recommendations column in the users table? Enjoy, John On Dec 10, 4:42 pm, WhyNotSmile wrote: > I've come across a really strange problem - or else I'm doing > something really stupid. > > Basically, there is a field in one of my db tables which Cake just > seems to be ignoring. The field is in a table called 'Users', and is > called 'recommendations'. > > When I do > > $this->User->findById($userid); > > it works fine, gets the user and all the information, apart from that > one field, which it reads in as null. It is definitely populated in > the database. Also, when I try to save to it, it just ignores me - > doesn't reset it or anything, and no error messages, it just doesn't > seem to do anything. > > This is driving me crazy! > > Has anyone come across something similar? Is there maybe a setting or > something in the database? > > 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.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Database field not reading or writing
Thanks Jeremy, that seems to have done the trick! Must have cached the db structure somewhere or something - I added that field later than the others (although I thought I'd added it locally and then uploaded the whole thing to teh server, but maybe not). Anyway, all good now - thanks again. Sharon On Dec 10, 4:25 pm, Jeremy Burns wrote: > This might not be the answer, but the first I do when I get a db > related issue is set debug to 2 and try again. Sometimes cleaning the > caches like this resolves it, other times not. > > On Dec 10, 2:42 pm, WhyNotSmile > wrote: > > > I've come across a really strange problem - or else I'm doing > > something really stupid. > > > Basically, there is a field in one of my db tables which Cake just > > seems to be ignoring. The field is in a table called 'Users', and is > > called 'recommendations'. > > > When I do > > > $this->User->findById($userid); > > > it works fine, gets the user and all the information, apart from that > > one field, which it reads in as null. It is definitely populated in > > the database. Also, when I try to save to it, it just ignores me - > > doesn't reset it or anything, and no error messages, it just doesn't > > seem to do anything. > > > This is driving me crazy! > > > Has anyone come across something similar? Is there maybe a setting or > > something in the database? > > > 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.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Database field not reading or writing
This might not be the answer, but the first I do when I get a db related issue is set debug to 2 and try again. Sometimes cleaning the caches like this resolves it, other times not. On Dec 10, 2:42 pm, WhyNotSmile wrote: > I've come across a really strange problem - or else I'm doing > something really stupid. > > Basically, there is a field in one of my db tables which Cake just > seems to be ignoring. The field is in a table called 'Users', and is > called 'recommendations'. > > When I do > > $this->User->findById($userid); > > it works fine, gets the user and all the information, apart from that > one field, which it reads in as null. It is definitely populated in > the database. Also, when I try to save to it, it just ignores me - > doesn't reset it or anything, and no error messages, it just doesn't > seem to do anything. > > This is driving me crazy! > > Has anyone come across something similar? Is there maybe a setting or > something in the database? > > 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.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: global functions
i created a php file with all the functions needed and then i loaded it in my bootstrap.php using php's include() it's working ok now On 10 Dic, 15:38, Fran Iglesias wrote: > Hi, > > El 10/12/2009, a las 14:32, Ernesto escribió: > > > it's very uncomfortable to copy them in a helper and in a component @ > > every little mod. > > is there any clever way to manage these funcs? > > You could load them in the APP/config/bootstrap.php > > Another solution is to create a class with several methods, load it > during bootstrap and use as singleton, something similar to the > inflector class. > --- > Fran Iglesias http://cakephpilia.blogspot.com 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
Authentication (cookies?) across different domains
Hey guys, developing a multilanguage application I thought to have different languages according to the domain extension: i.e. mysite.com => english mysite.it => italian How can I keep the user authenticated across the 2 domains via cookies? --- I know that with subdomains you can just set the cookie config as follows: http://book.cakephp.org/view/179/Controller-Setup setting $this->Cookie->domain = '*.example.com'; --- Cheers Dan 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
Database field not reading or writing
I've come across a really strange problem - or else I'm doing something really stupid. Basically, there is a field in one of my db tables which Cake just seems to be ignoring. The field is in a table called 'Users', and is called 'recommendations'. When I do $this->User->findById($userid); it works fine, gets the user and all the information, apart from that one field, which it reads in as null. It is definitely populated in the database. Also, when I try to save to it, it just ignores me - doesn't reset it or anything, and no error messages, it just doesn't seem to do anything. This is driving me crazy! Has anyone come across something similar? Is there maybe a setting or something in the database? 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.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: global functions
Hi, El 10/12/2009, a las 14:32, Ernesto escribió: > it's very uncomfortable to copy them in a helper and in a component @ > every little mod. > is there any clever way to manage these funcs? You could load them in the APP/config/bootstrap.php Another solution is to create a class with several methods, load it during bootstrap and use as singleton, something similar to the inflector class. --- Fran Iglesias http://cakephpilia.blogspot.com 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: Solution for multi-lingual application with the same content
of course i'm using CakePHP, 1.2 version. I have some ideas, but i think there must be a simple solution. On Dec 10, 1:39 pm, John Andersen wrote: > Are you using CakePHP? Is it even related to CakePHP? > Your problem sounds simple to solve, at least in CakePHP! > What are you using? > Enjoy, > John > > On Dec 10, 1:09 pm, dev wrote: > > > > > I need solution for multi-lingual application where are galleries, > > product's categories and product list. > > > Let's say i create gallery, product's categories and products in > > primary language and i need to translate them in second language, but > > with the same gallery images, product categories and products. I don't > > want to upload the same images to gallery, create the same products > > and so on, just in another language. > > > What solution would be best for this? I want to translate these items > > in my custom cms, not .po files. 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: How to validate HABTM model with extra fields?
Ok, I temporary fixed with hasMany relation created on the fly, but this seems to be a bug, more here: http://cakephp.lighthouseapp.com/projects/42648/tickets/65-additional-fields-on-habtm-join-tables-wont-get-properly-validated So probably this will be fixed to work properly. On 9 Gru, 23:50, euromark wrote: > actually its usually the other way around > it may validate more fields, but can save only the foreign keys > (not even created/modified automagic timestamps!) > > On 9 Dez., 15:08, red wrote: > > > > > Yes, probably I'll do as you propose (split to 2x hasMany and 2x > > belongsTo), but I suggested that is possible to validate HABTM data, > > because saveAll() handles perfect with additional data in join table. > > > So why I can easly save data, but can't validate? What about 'with' > > parameter in hasAndBelongsToMany relation? > > > On Dec 9, 2:45 pm, euromark wrote: > > > > cake HABTM does only work with 3 fields > > > id > > > foreign_id1 > > > foreign_id2 > > > > nothing more or less > > > > if you need to add created, modified, amount, ... > > > you will have to split it into 2 "hasMany" + 2 "belongsTo" relations > > > > this is always possible - but maybe not as easy to handle anymore > > > it has some advantages, though, too: it doesnt delete and insert all > > > records after each save() > > > > the cake habtm might be ok for some relations, but > > > i usually always use those split tables as they are way more powerful! > > > > On 9 Dez., 14:28, red wrote: > > > > > Hello, I've already asked on cakeqs.org but I'll try also here. > > > > > My case is: Order HABTM Product. In joining table orders_products I've > > > > extra field - quantity. Now, when editing Order I can add Products and > > > > enter quantitiy. Here is what I've done already: > > > > > In model Order: > > > > public $hasAndBelongsToMany = array( > > > > 'Product' => array( > > > > 'className' => 'Product', > > > > 'joinTable' => 'orders_products', > > > > 'foreignKey' => 'order_id', > > > > 'associationForeignKey' => 'product_id', > > > > 'unique' => true, > > > > 'with' => 'OrdersProduct' > > > > ) > > > > ); > > > > > In model Product: > > > > public $hasAndBelongsToMany = array( > > > > 'Order' => array( > > > > 'className' => 'Order', > > > > 'joinTable' => 'orders_products', > > > > 'foreignKey' => 'product_id', > > > > 'associationForeignKey' => 'order_id', > > > > 'unique' => true, > > > > 'with' => 'OrdersProduct' > > > > ) > > > > ); > > > > > I've created model for joining table OrdersProduct: > > > > class OrdersProduct extends AppModel { > > > > public $name = 'OrdersProduct'; > > > > > public $validate = array( > > > > 'quantity' => array( > > > > 'numeric' => array('rule' => array('notempty')) > > > > ) > > > > ); > > > > > } > > > > > In orders editing view I've: > > > > Form->input("Product.0.OrdersProduct.product_id", > > > > array('label' => false, 'options' => $products)); ?> > > > > Form->input("Product.0.OrdersProduct.quantity", array > > > > ('label' => false, 'class' => 'text')); ?> > > > > > Now in Orders controller try to save: > > > > // Form processing > > > > if (!empty($this->data)) { > > > > $this->Order->OrdersProduct->set($this->data); > > > > debug($this->Order->OrdersProduct->validates()); > > > > > if ($this->Order->saveAll($this->data)) { > > > > // Do some stuff > > > > } > > > > } > > > > > And $this->Order->OrdersProduct->validates() always returns TRUE, no > > > > matter if I enter quantity or not. All the data saves perfect, only no > > > > validation is problem. What I'm missing? 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: Running the action twice?
There was a requestAction called from my layout BUT I disabled it during troubleshooting. In fact, All links to js, css, and images are stripped from my layout and views. I have no beforeRender or afterFilter. View still reloads. Odd thing is, it goes twice when called via a redirect from another action but not when it is refreshed by F5. Getting frustrated. Will check to see if other views are going twice. Gary 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
xgettext: waring: file`' extension `' is unknown; will try C poedit
Hi, when I tried to create po file. Im getting the following error message xgettext: waring: file`' extension `' is unknown; will try C updation failed. I have given path controllers views/posts . and keyword as __ But updation is failing.. Please guide.. Thanks in advance Jay 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
global functions
Hello. i have some simple functions such as array_depth array_width array_integrate and so on that are used in both Controllers and Views. it's very uncomfortable to copy them in a helper and in a component @ every little mod. is there any clever way to manage these funcs? 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
Testing for Ajax
I want to use the Ajax helper when Javascript is enabled, but revert to the plain old ordinary html helper when it is not. How can I do a simple test to see if Javascript is enabled? 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: Email with unwanted white spaces and special characters
Well guys. I`ve found the problem. Cakephp have a lineLength param that breaks all lines when they reach the param value max length. By default it`s 70 characters. When it happens to break in a UTF8 character (like é, ã, ú), or "<", ">", "/", the email client (all of them, yahoo, gmail, outlook), understand something they shouldn`t and put some really strange char codes that the browsers understand to be a whitespace. So the sollution is to put no limit for this. Thanks all for your help! On 10 dez, 10:03, Mauro Ribeiro wrote: > Well. I`ve tried the php standard mail() function and it worked fine. > I`m going to take a look in Email Component and see what`s going on > > On 10 dez, 09:47, Mauro Ribeiro wrote: > > > I`m using it normaly, no extra features or anything. > > > function sendMail($to, $subject, $message, $layout = 'default') { > > $subject = '[noreply] ' . $subject; > > > $this->Email->to = $to; > > $this->Email->subject = $subject; > > $this->Email->replyTo = 'no-re...@email.com.br'; > > $this->Email->from = 'No Reply'; > > $this->Email->sendAs = 'html'; > > $this->Email->layout = $layout; > > > return $this->Email->send($message); > > } > > > On 10 dez, 01:44, "Dr. Loboto" wrote: > > > > How do you send email? I don't have such problems with $this->Email- > > > > >send() call (no params). > > > > On Dec 6, 7:57 pm, Mauro Ribeiro wrote: > > > > > All I have in my template is the html/default.ctp: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The message is being written in controller and sent by CakePHP Email > > > > Component. > > > > > Even if I use the default text (text/default.ctp), I get the same > > > > issue... > > > > > No idea on what what`s going on. > > > > > On 5 dez, 18:52, mike karthauser wrote: > > > > > > Perhaps you could post the php inside your template so we could see > > > > > it? Also are you sanitizing your email addresses as perhaps there is > > > > > extra characters being captured that you are giving to your view? > > > > > > Mike Karthauser > > > > > Brightstorm limited > > > > > Tel: 07939252144 > > > > > > On 5 Dec 2009, at 12:22, Mauro Ribeiro wrote: > > > > > > > Hi all! > > > > > > > I`m using the CakePHP Email Component and the resulting email appear > > > > > > with some not wanted whitespaces and special characters along the > > > > > > HTML. > > > > > > > Sometimes this happens inside tags and break the href > > > > > > property. > > > > > > > Here is an example: > > > > > > > - > > > > > > > http://www.empreendemia.com.br/users/ > > > > > > create/ > > > > > > user.em...@gmail.com+/X" target="_blank">http:// > > > > > >www.empreendemia.com.br/users/create/user.em a...@gmail.com /X > > > > > a> > > > > > > > - > > > > > > > It appeared a "+" in href link and some whitespaces inside > > > > > > text > > > > > > > Does someone now what`s happening? > > > > > > > Thanks in advance, > > > > > > Mauro > > > > > > > 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: Email with unwanted white spaces and special characters
Well. I`ve tried the php standard mail() function and it worked fine. I`m going to take a look in Email Component and see what`s going on On 10 dez, 09:47, Mauro Ribeiro wrote: > I`m using it normaly, no extra features or anything. > > function sendMail($to, $subject, $message, $layout = 'default') { > $subject = '[noreply] ' . $subject; > > $this->Email->to = $to; > $this->Email->subject = $subject; > $this->Email->replyTo = 'no-re...@email.com.br'; > $this->Email->from = 'No Reply'; > $this->Email->sendAs = 'html'; > $this->Email->layout = $layout; > > return $this->Email->send($message); > } > > On 10 dez, 01:44, "Dr. Loboto" wrote: > > > How do you send email? I don't have such problems with $this->Email- > > > >send() call (no params). > > > On Dec 6, 7:57 pm, Mauro Ribeiro wrote: > > > > All I have in my template is the html/default.ctp: > > > > > > > > > > > > > > > > > > > > > > > The message is being written in controller and sent by CakePHP Email > > > Component. > > > > Even if I use the default text (text/default.ctp), I get the same > > > issue... > > > > No idea on what what`s going on. > > > > On 5 dez, 18:52, mike karthauser wrote: > > > > > Perhaps you could post the php inside your template so we could see > > > > it? Also are you sanitizing your email addresses as perhaps there is > > > > extra characters being captured that you are giving to your view? > > > > > Mike Karthauser > > > > Brightstorm limited > > > > Tel: 07939252144 > > > > > On 5 Dec 2009, at 12:22, Mauro Ribeiro wrote: > > > > > > Hi all! > > > > > > I`m using the CakePHP Email Component and the resulting email appear > > > > > with some not wanted whitespaces and special characters along the > > > > > HTML. > > > > > > Sometimes this happens inside tags and break the href > > > > > property. > > > > > > Here is an example: > > > > > > - > > > > > > http://www.empreendemia.com.br/users/ > > > > > create/ > > > > > user.em...@gmail.com+/X" target="_blank">http:// > > > > >www.empreendemia.com.br/users/create/user.em a...@gmail.com /X > > > > a> > > > > > > - > > > > > > It appeared a "+" in href link and some whitespaces inside text > > > > > > Does someone now what`s happening? > > > > > > Thanks in advance, > > > > > Mauro > > > > > > 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: Email with unwanted white spaces and special characters
I`m using it normaly, no extra features or anything. function sendMail($to, $subject, $message, $layout = 'default') { $subject = '[noreply] ' . $subject; $this->Email->to = $to; $this->Email->subject = $subject; $this->Email->replyTo = 'no-re...@email.com.br'; $this->Email->from = 'No Reply'; $this->Email->sendAs = 'html'; $this->Email->layout = $layout; return $this->Email->send($message); } On 10 dez, 01:44, "Dr. Loboto" wrote: > How do you send email? I don't have such problems with $this->Email- > > >send() call (no params). > > On Dec 6, 7:57 pm, Mauro Ribeiro wrote: > > > All I have in my template is the html/default.ctp: > > > > > > > > > > > > > > > > The message is being written in controller and sent by CakePHP Email > > Component. > > > Even if I use the default text (text/default.ctp), I get the same > > issue... > > > No idea on what what`s going on. > > > On 5 dez, 18:52, mike karthauser wrote: > > > > Perhaps you could post the php inside your template so we could see > > > it? Also are you sanitizing your email addresses as perhaps there is > > > extra characters being captured that you are giving to your view? > > > > Mike Karthauser > > > Brightstorm limited > > > Tel: 07939252144 > > > > On 5 Dec 2009, at 12:22, Mauro Ribeiro wrote: > > > > > Hi all! > > > > > I`m using the CakePHP Email Component and the resulting email appear > > > > with some not wanted whitespaces and special characters along the > > > > HTML. > > > > > Sometimes this happens inside tags and break the href > > > > property. > > > > > Here is an example: > > > > > - > > > > > http://www.empreendemia.com.br/users/ > > > > create/ > > > > user.em...@gmail.com+/X" target="_blank">http:// > > > >www.empreendemia.com.br/users/create/user.em a...@gmail.com /X > > > a> > > > > > - > > > > > It appeared a "+" in href link and some whitespaces inside text > > > > > Does someone now what`s happening? > > > > > Thanks in advance, > > > > Mauro > > > > > 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: Solution for multi-lingual application with the same content
Are you using CakePHP? Is it even related to CakePHP? Your problem sounds simple to solve, at least in CakePHP! What are you using? Enjoy, John On Dec 10, 1:09 pm, dev wrote: > I need solution for multi-lingual application where are galleries, > product's categories and product list. > > Let's say i create gallery, product's categories and products in > primary language and i need to translate them in second language, but > with the same gallery images, product categories and products. I don't > want to upload the same images to gallery, create the same products > and so on, just in another language. > > What solution would be best for this? I want to translate these items > in my custom cms, not .po files. 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
Solution for multi-lingual application with the same content
I need solution for multi-lingual application where are galleries, product's categories and product list. Let's say i create gallery, product's categories and products in primary language and i need to translate them in second language, but with the same gallery images, product categories and products. I don't want to upload the same images to gallery, create the same products and so on, just in another language. What solution would be best for this? I want to translate these items in my custom cms, not .po files. 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: shared host setup
No such luck! Any ideas ? Thanks Alex On Dec 9, 10:00 pm, Piotr Kilczuk wrote: > Hi, > > > worked it out. > > > heres the code i added > > > Debugger::dump($component); > > Debugger::dump($object); > > Debugger::dump($parent); > > So is your project working now? > > Regards, > Piotr 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: Problem with AJAX submission
Hi John, I just did and... still nothing at all when clicking! Thanks, On Dec 10, 7:20 am, John Andersen wrote: > Have you added the javascript libraries? > - prototype > - scriptaculous > > Enjoy, > John > > On Dec 9, 9:03 pm, thomaus wrote: > > > Hi John, > > > Thanks for helping. > > > I actually made a mistake when pasting the code. The original trial > > was > > > submit(__('send', true), array('url'=> array > > ('controller'=>'users', 'action'=> 'recoverPassword'), 'class'=> > > 'button', 'update' => 'messages')); ?> > > > and the same happens, basically nothing nothing at all when I click on > > the Send button. > > > Don't know if it helps but here is the corresponding generated HTML > > code : > > > > value="Send" id="submit116667344" onclick="event.returnValue = false; > > return false;" /> > > // > Event.observe("submit116667344", 'click', function(event) { new > > Ajax.Updater('messages','/MyApp/html/users/recoverPassword', > > {asynchronous:true, evalScripts:true, parameters:Form.serialize > > (Event.element(event).form), requestHeaders:['X-Update', > > 'messages']}) }, false); > > //]]> > > > > > > > > > Thanks, > > > On Dec 9, 6:42 pm, John Andersen wrote: > > > > I do observe that your ajax->submit is supposed to call your "login" > > > action in your "users" controller and not your "recoverPassword" > > > action! > > > Please check your code or your statement :) > > > Enjoy, > > > John > > > > On Dec 9, 3:03 pm, thomaus wrote: > > > > > Hi there, > > > > > I just built an AJAX form and it doesn't work at all! > > > > > My code: > > > > > > > > > Recover lost password > > > > Enter your e-mail address and we will send a reset link to your > > > > email > > > > create('User'); ?> > > > > input('email', array('label' > > > > => __('Your > > > > Email', true), 'class' => 'text-input')); ?> > > > > > > > > > submit(__('Send', true), > > > > > > > > array('url'=> array('controller'=>'users', 'action'=> > > > > 'login'), > > > > > > > > 'class'=> 'button', > > > > > > > > 'update' => 'messages')); ?> > > > > > end(); ?> > > > > > > > > > The button appears and when I click on it, absolutely nothing happens > > > > while if I type myapp/users/recoverPassword in my browser it of course > > > > calls my controller correctly. > > > > > Thanks in advance, > > > > > thomas... 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: index function question
I managed to sort this out. Changed from above to: function index() { $user_id = $this->Session->read('Auth.User.id'); $conditions = array('Health.user_id' => $user_id); $this->set('healths', $this->paginate($conditions)); } On Dec 9, 11:53 am, appel268576 wrote: > Hi guys. > > I have a question, I am defining my index function but I am struggling > a bit with something. > > I want to have my index function only show all records in my index > with the associated users id. > > How does one go about this? > > here is what I have: > > function index() { > $conditions = $this->Health->find('first', array('conditions' > => > array('Health.id' => '1'))); > $this->set('healths', $conditions, $this->paginate()); > } > > your reply and time is much appreciated. 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