Re: Retreiving values from Jquery to a controller in cakephp
huh? i think the data is already in the controller.. it's should be in $this-data array. Do a debug in your BeersController-view_beer method. Get firebug, and inspect the response from the webserver. On Jul 16, 11:53 am, jeremy jeffery2k2...@gmail.com wrote: hai can anyone tell me how can i get the posted values from jquery to a controller so far this problem has not been solved.. my jquery alerts correctly as shown in the above disucssion now its the only problem of how to get this values to a controoler in cakephp any refrence or examples or tutorilas will also help thankyou --~--~-~--~~~---~--~~ 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: Retreiving values from Jquery to a controller in cakephp
On Jul 16, 1:50 pm, rchavik rcha...@gmail.com wrote: huh? i think the data is already in the controller.. it's should be in $this-data array. Do a debug in your BeersController-view_beer method. let me rephrase: Do a debug($this-data) in your BeersController-view_beer method, eg: class BeersController extends AppController { function view_beer() { debug($this-data); // your own code here. } } --~--~-~--~~~---~--~~ 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: Retreiving values from Jquery to a controller in cakephp
On Jul 16, 1:50 pm, rchavik rcha...@gmail.com wrote: huh? i think the data is already in the controller.. it's should be in $this-data array. Do a debug in your BeersController-view_beer method. let me rephrase: Do a debug($this-data) in your BeersController-view_beer method, eg: class BeersController extends AppController { function view_beer() { debug($this-data); // your own code here. } } --~--~-~--~~~---~--~~ 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: $_POST
As you know Cake is MVC framework , simply you can access the data posted from your view(your form),in the controller's method with the following: say the function name is mario then, function mario() { if(!empty($this-data)){ $mariodata=$this-data; $this-set('yourdata',$mariodata); } }, Now in your mario.ctp file,which is the view file of this action (method rather) from where you had posted your data type the following code ?php echo pr($yourdata); ? this will solve your problem. If not i will continue to help . On Jul 16, 4:57 am, mario vallejo gp2xmex...@gmail.com wrote: Hello and thank you for your time and attention. I am building a Facebook app and I want to use CakePHP to build it. The problem is the following I have tried to translate this into cake to no avail: $is_tab = isset($_POST['fb_sig_in_profile_tab']); if( !$is_tab ) $user = $fb-require_login(); And that's really the only thing left in order to finish my app. I have got no clue on how to access 'normal' $_POST data inside of cake. Thank you very much and I really appreciate this. Mario R. Vallejo --~--~-~--~~~---~--~~ 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: Render Xml
Ty Alexandru for your help.I will use a little different block of code as i tested it and it works fine.Beow is my code.where i take each geoname's fields and save them in my db. for ( $i = 1; $i = 4; $i += 1) { /** total results**/ $root=$xml-children[0]-children[0]-name; $total_results = $xml-children[0]-children[0]-children[0]-value; $this-data['Destination']['total_count'] = $total_results; $this-set('total_results',$total_results); /** Name of destination**/ $nameof = $xml-children[0]-children[$i]-children[0]-children[0]-value; $this-data['Destination']['name'] = $nameof; $this-set('name',$nameof); /** Latitude of destination**/ $lat = $xml-children[0]-children[$i]-children[1]-children[0]-value; $this-data['Destination']['lat'] = $lat; $this-set('lat',$lat); /** Longtitude of destination**/ $lng = $xml-children[0]-children[$i]-children[2]-children[0]-value; $this-data['Destination']['lng'] = $lng; $this-set('lng',$lng); /** Geoname-id of destination**/ $geoid = $xml-children[0]-children[$i]-children[3]-children[0]-value; $this-data['Destination']['geonameId'] = $geoid; $this-set('geoid',$geoid); /** Country code of destination**/ $ctrcode = $xml-children[0]-children[$i]-children[4]-children[0]-value; $this-data['Destination']['countryCode'] = $ctrcode; $this-set('code',$ctrcode); /** Country name of destination**/ $ctrname = $xml-children[0]-children[$i]-children[5]-children[0]-value; $this-data['Destination']['countryName'] = $ctrname; $this-set('ctrname',$ctrname); /** Fcl of destination**/ $fcl = $xml-children[0]-children[$i]-children[6]-children[0]-value; $this-data['Destination']['fcl'] = $fcl; $this-set('fcl',$fcl); /** Fcode of destination**/ $fcode = $xml-children[0]-children[$i]-children[7]-children[0]-value; $this-data['Destination']['fcode'] = $fcode; $this-set('fcode',$fcode); /*** saves the user_id **/ $userId = $this-Session-read('Auth.User.id'); $this-data['Destination']['user_id'] = $userId; /** saves the input data from user**/ //$this-data['Destination']['place'] = $place; $this-Destination-saveAll($this-data); } $destinations = $this-Destination-find('all', array('conditions' = array('Destination.user_id =' = '142'))); $this-set(compact('destinations')); The only thing i want to fix in this code is the for where i want to loop for the number of children as well as in find to replace the 142 with something like $this-Session-read('Auth.User.id') which it isn't work. 2009/7/15 Alexandru Ciobanu ics.cake...@gmail.com On 07/14/2009 04:29 PM, Paulos23 wrote: How i can take these data from the array[] and print them like this for example? name:Barcelona lat:... lng... Given $i is the name of your array. foreach($i['Geoname'] as $parent){ foreach($parent as $key = $child){ echo $key, ': ', $child; } } PS: Look into arrays; lots of resources available. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Problem with form type get
Hello, so if I write this in view ?php echo $form-create('User', array('url' = array('controller' = 'users', 'action' ='login'))); echo $form-input('User.username', array('label' = 'E-mail:', 'style' = 'width: 138px;')); echo $form-input('User.password', array('label' = 'Geslo:', 'style' = 'width: 138px;')); echo brcenter . $form-end('Prijava') . /center; ? I get the input field ok name=data[User][username] input id=UserUsername type=text value= maxlength=255 style=width: 138px; name=data[User][username]/ But if I would like to use form type get ?php echo $form-create('User', array('type' = 'get', 'url' = array ('controller' = 'users', 'action' ='login'))); echo $form-input('User.username', array('label' = 'E-mail:', 'style' = 'width: 138px;')); echo $form-input('User.password', array('label' = 'Geslo:', 'style' = 'width: 138px;')); echo brcenter . $form-end('Prijava') . /center; ? then I get a wrong name of inpuf field name=username input id=UserUsername type=text value= maxlength=255 style=width: 138px; name=username/ So, this is a bug or I'm doing something wrong? Regards Andraž --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Reasons for moving from the MIT license to the 3-clause BSD one
Hi all! Cake3 is a wonderful project, and you might know that I really like it :o) However I just notice that the license will be changed from MIT to the 3-clause BSD one, which is a bit obscure to me. As a developer who made a quick topology of FLOSS licenses, I do not see the difference between these two licenses as they both are not copylefted. It would be awesome if someone could explain to the curious guy I am what are the differences between these two licenses, and the reason of this choice. Thanks in advance! Pierre --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Enumerate CakePHP Layouts
Hello all. I like to create a CMS that will hold many layouts depeding on a page content. e.x. : If the page has a layout for the mane page and then the web site owner will deside to have another layout for the offers to be able to cage to new layout, and if after three months will need a new layout for another part of the web site to be able to change to this one for this part of tha web site. So, my main problem is how to enumerate the available layouts that are installed on the CakePHP layouts directory, to give the ability to the user to choose the one he prefer for the page that he creates ? ? ? Also I like to store the layout name in my database and then automaticly when the controller start generate the data for the View, to change the layout to the chosen one that is stored in the database ? ? ? Kind regards Merianos Nikos --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
form with reset and submit button
Hi Everybody, I want to know how to show the form with reset or clear and submit button. reset to clear all form values , submit to submit the form.how do i do in cakephp, i can able to show the buttons like !-- File: /app/views/posts/add.ctp -- h1Add Post/h1 ?php echo $form-create('Post'); echo $form-input('title'); echo $form-input('body', array('rows' = '3')); echo $form-submit('Save Post'); echo $form-button('Reset', array('type'='reset')); echo $form-end(); ? but how do i assign the clear taks to that reset button Regards, Dhileepen --~--~-~--~~~---~--~~ 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: Reasons for moving from the MIT license to the 3-clause BSD one
Agreed, I noticed it and was wondering the same thing. --~--~-~--~~~---~--~~ 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 use 'group by' with paginate()?
Do you have a $paginate property in your controller? You should place the group within the model within the $paginate. --~--~-~--~~~---~--~~ 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: CakePHP Model Join Strategy - Returning mixed Array/Objects finds results
Hi, http://book.cakephp.org/view/474/Containable containable and recursive -1 in your AppModel/AppController is the way to go. greets Andreas Dérico Filho schrieb: Hi, I have a doubt on the future of CakePHP regarding how will it handle joins in future releases. The issue is: When you have several models tied together through hasMany/belongsTo/hasAndBelongsToMany/hasOne, CakePHP will execute the database queries all at once, parse them and organise them into an array. So it'll likely you'll have something such: $users[0] = Array( User = Array(name = My Name, Remark = array(remark = i see it))); or even $remarks[0] = Array( Remarks = array(remark = i see it), User = array(name = My Name)); OK. That's how CakePHP works nowadays. I am not a master in MVC concepts and subtleties, but I wonder it could be a bad thing. You see, one of the main goals of OO programming is that you write code that can be changed. So let's suppose you have a model named User, it'd not be joint to anyone else. You write a whole application using: $this-User-find('all', c); For some wicked reason that shall remain rather vague, you do _not_ specify the recursiveness of these finds, and therefore CakePHP will default it to 1, which brings all model's data and additionally the first degree of joins. As this model has no such degree, it'll return only User's data. Yet this system is not complete, and at some point it demands that a Remark system to be attached to User model. The programmer goes on app/model/User.php and adds a hasMany entry into User, and a belongsTo entry into Remark. Suddenly, according to CakePHP's current logic, ALL finds will return not only User's data but also it'll return all the Remark entries each User has stored. All over the system. You ought to grep the source for $this-User- and write down a $this-User-recursive=0; all over the source code. So far, no news. Here's the catch: Should CakePHP model code return something like: $users[0] = Array( User = Array(name = My Name, Remark = new RemarkSpecialJoinObjectWhichSeeksInformationOnFirstCall($user ['User']['id'])); On the views reading $users and User data only, it'll imply neither a change on memory consumption nor SQL performance, because although User comunicates with Remark, the view would not demand the Remark entries, thus avoiding one database seek. They'd never read the Remark dimension, and therefore the database would never be read too. On the other hand, on the new code which needs both User's and Remark's entries, the object on its own would understand the situation and seek further data. Does anyone know if CakePHP will solve this problem in future releases? Thanks, Dérico Filho --~--~-~--~~~---~--~~ 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: Enumerate CakePHP Layouts
Well, to list the items in the directory, maybe use the ls method of the Folder class. http://api.cakephp.org/class/folder#method-Folderls To store names in the database, I'd create a table: layouts(id, name, template, created, updated); where template refers to the *.ctp file. I'd possibly goes as far as adding a text field to include the content of the *.ctp file, to enable revision history, and dump the contents in the afterSave calback. On Thu, Jul 16, 2009 at 8:58 AM, DatacenterHellas merianosni...@gmail.comwrote: Hello all. I like to create a CMS that will hold many layouts depeding on a page content. e.x. : If the page has a layout for the mane page and then the web site owner will deside to have another layout for the offers to be able to cage to new layout, and if after three months will need a new layout for another part of the web site to be able to change to this one for this part of tha web site. So, my main problem is how to enumerate the available layouts that are installed on the CakePHP layouts directory, to give the ability to the user to choose the one he prefer for the page that he creates ? ? ? Also I like to store the layout name in my database and then automaticly when the controller start generate the data for the View, to change the layout to the chosen one that is stored in the database ? ? ? Kind regards Merianos Nikos --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
variable to string
Hi people, i am facing a problem with my app.In particular i use httpsocket for a request in an external site to get some information.I have an element to force user put some name: ?php echo ($form-create('Destination', array ('controller'='destinations','action' ='search')));? ?php echo $form-input('place', array('label'= 'Search Location:'));? div align=center ?php echo ($form-submit('Search', array('div' = false,'class' = 'submitbutton'))); ? ?php echo($form-end()); ? /div now in my controller i have a search function where i want to take the place variable as a parameter so i do: function search($place=null) { App::import('Core', 'HttpSocket'); App::import('Xml'); $HttpSocket = new HttpSocket(); $results = $HttpSocket-get('http://ws.geonames.org/search?', 'q='. $place.'maxRows=10'); I am doing this '.$place.' to take place as a string but it doesnt work.Any help to this plz? Ty v much! Paulos --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
problem with saveAll
I'm experiencing weird behavior with using $this-model-saveAll(). When I pass it an array of just one record, it successfully inserts this to the db table. However, when I pass it an array of more than one record, they all successfully insert except for the last record. Anybody have an idea of what could be wrong? Thanks. -- Jon Chin smime.p7s Description: S/MIME Cryptographic Signature
Translate behavior - associated models
Hello, It is my understanding that the Translate Behavior is not capable of translating associated models. Would someone be kind enough to confirm/infirm this ? thanks you in advance thomas --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Themed implementation in cakephp
Hy i am using themes in my application: It might be stupid question for you but i am facing problem: suppose my themed directory is --view users index.php admin_index.php themed users no file here while themed folder is empty but when my url is http://localhost/cakephp/users it works but http://localhost/cakephp/admin/users it dont works. According to cakephp structure it should detect automatically admin_index file from users controller : any help related to article thanks --~--~-~--~~~---~--~~ 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: Insert Query from another table in .ctp
You load the record in the controller, before you push the data to the view that you have in your link below. I would record the statistics at this point in the controller. I noticed in your view code, you have an array which you iterate. After the first iteration, you have a header(Location:) - so I wouldn't bother load an array of data, just the single record you wish to redirect from. Hope this helps, Richard On Thu, Jul 16, 2009 at 2:50 AM, ramzwatcher coolramz...@gmail.com wrote: Hi, I want to create a redirect function in cakephp while having cloak redirect (using iframe) or normal redirect, plus I want to records the statistics of views for every attempt. Here's the link that I want to redirect where it's cloaked. http://www.hoturl.im/recommends/url/testing Below are codes that i write: So where can I place a query to insert date for every views? I seriously don't have any idea to do this one. And i also attach my db structure for references and thanks a lot! This file is recommends/URL.CTP head meta content=text/html; charset=utf-8 http-equiv=Content- Type/ ?php e($html-css('empty')); ? /head ?php foreach ($recommends as $recommend): if($recommend['Recommend']['cloacked'] == 1){ $this-layout = 'empty'; ? iframe height=100% frameborder=0 width=100% marginwidth=0 marginheight=0 name=body src=?php echo $recommend['Recommend'] ['url'] ?/ /iframe ?php }else{ header(Location: .$recommend['Recommend']['url']); } endforeach; ? I want to insert hits to statistics table in this /recommends/url.ctp that contains: -id -click date -click counts -recommend_id Your comment is appreciated. Thanks! --~--~-~--~~~---~--~~ 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: Using layouts with themes
yes you need to put you layout folder in theme folder and as mention in previus post you need to put your css and js in webroot folder . you should visite also http://book.cakephp.org/view/488/Themes On Jul 16, 7:55 am, ramzwatcher coolramz...@gmail.com wrote: Did you place the css files at webroot? That should work. You can call custom css for specific page by placing in the ctp file: ?php e($html-css('empty')); ? Hopefully it helps On Jul 16, 5:19 am, djfingers john.arr...@gmail.com wrote: I have implemented themes on my site but I'm having trouble getting layouts within themes to work. Right now only the default layout with any given theme is being used. Can layouts work within themes? If so, are there any special things that need to be coded. Shouldn't $this-layout = 'mylayout' work within a theme? I couldn't find any information on this within the cakephp site or the google group. Any help or links would be appreciated! --~--~-~--~~~---~--~~ 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: Themed implementation in cakephp
you can ask your colleagues On Thu, Jul 16, 2009 at 3:04 PM, shahgeb superior.am...@gmail.com wrote: Hy i am using themes in my application: It might be stupid question for you but i am facing problem: suppose my themed directory is --view users index.php admin_index.php themed users no file here while themed folder is empty but when my url is http://localhost/cakephp/users it works but http://localhost/cakephp/admin/users it dont works. According to cakephp structure it should detect automatically admin_index file from users controller : any help related to article thanks --~--~-~--~~~---~--~~ 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: Auth - get all public Controllers for SitemapDeluxe
Configure::listObjects('controller') returns an array list of all the controllers - first element is 'App' which you probably don't want. On Jul 15, 8:52 pm, ixopo i...@townhill-park.com wrote: Hello, we are using Auth and this is working fine so far. I'm just implementing the SitemapDeluxe =http://bakery.cakephp.org/articles/view/sitemap-deluxe and cauze i dont want to add every controller manually when new controllers are available i search for a way to get this automatically done by reading all the Public Controllers from Auth so the Sitemap will be automatically up2date all the time. Is there a way to read all Public Controllers ? Thx 4 any Help ixopo --~--~-~--~~~---~--~~ 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: Getting Started With CakePHP
Cookbook is a good start, after that you can try make a simple application and then ask here if is necessary or look for somethings in my friend GOOGLE! On Jul 15, 11:38 am, GravyFace gravyf...@gmail.com wrote: I think he's closer to trolling (whether he knows it or not) by asking a question like that. On Wed, Jul 15, 2009 at 10:31 AM, Carlos Gonzalez Lavincarloslavi...@gmail.com wrote: Feeling a bit trollish are we:)? 2009/7/15 GravyFace gravyf...@gmail.com Sure, why don't you tell me what you want to build and I'll start working on it for you! Don't worry about any fussy things like details or requirements -- I won't stop working until you're completely satisfied. On Wed, Jul 15, 2009 at 6:57 AM, Pradip Jadhavjadhavpradi...@gmail.com wrote: Hello All, I am new to cakephp. Can anybody tell me what are steps required to build a new application in cakephp. Best Regards, Pradip Jadhav --~--~-~--~~~---~--~~ 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: ambiguous routes
Hello, I highly dislike working with routes, but there are few points where it can break. 1. What is the difference between the two rules you supplied? Any chance that the 2nd route will be ever used? 2. I suppose you use Router::connect not $Route-connect, just a typo here... 3. As far as I understand your beforeFilter(), it WILL make a redirection loop every time, since always 1st route is used and for some reason if condition is never met. What I would suggest, is to make a action (no beforeFilter), which would dispatch the request to proper method depending on wheter the url argument is a valid user name, valid group name or neither ($this-cakeError probably). Hope this is any help to you. Regards, Piotr --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Structure of book.cakephp.org
Dear Bakers, When browsing book.cakephp.org, I'm usually looking for the Model page. Especially page 73 (getting data), 75 (saving data) and 78 (associations). Those pages are three levels deep and stored under 'Developing with CakePHP'. While advanced topics like Components, Behaviors, Console, Utility libaries have their own top-level entry. The fundamental parts like Models, Views, Controllers are missing here. In other words, the documentation structure does not reflect the way I use and 'think' Cake. I would like to know how you guys think about it. Cheers, Bram --~--~-~--~~~---~--~~ 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: ambiguous routes
Thank you very much Piotr! I'll give that a try tomorrow morning. Cheers! On Jul 16, 10:01 pm, Piotr Kilczuk kilc...@gmail.com wrote: Hello, I highly dislike working with routes, but there are few points where it can break. 1. What is the difference between the two rules you supplied? Any chance that the 2nd route will be ever used? 2. I suppose you use Router::connect not $Route-connect, just a typo here... 3. As far as I understand your beforeFilter(), it WILL make a redirection loop every time, since always 1st route is used and for some reason if condition is never met. What I would suggest, is to make a action (no beforeFilter), which would dispatch the request to proper method depending on wheter the url argument is a valid user name, valid group name or neither ($this-cakeError probably). Hope this is any help to you. Regards, Piotr --~--~-~--~~~---~--~~ 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: HABTM with additional data scaffold update problem.
no ideas? --~--~-~--~~~---~--~~ 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: hasMany question
On Jul 16, 6:16 am, fedekun fedekil...@gmail.com wrote: Hi! I have just started with CakePHP and it seems very good so far! But i have a little question... i have a Post model, each post hasMany comments, and comments belongsTo a Post. If i want to order posts ASC and comments DESC...How do i do it? I suggest you could setup your order clause and your conditions in the model association: http://book.cakephp.org/view/78/Associations-Linking-Models-Together#Relationship-Types-79 -- Domenico Testa http://del.icio.us/domtes --~--~-~--~~~---~--~~ 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 association problem
Hi! I'm having a dilema, maybe the better word is that I'm puzzled. The problem is when I'm baking models. The console doesn't detect relations between tables automatically. For instance, the console does recognize all the tables from the database, but when it's triying to detect associations it comes up with the result like on the end of this post or just skips to 'Look okay?'. It the noted example on end of the post, I manage to create a complete model (with association to user), but association among other models fails. So my question's are: 1. Am I breaking some convetions and it's not working? 2. Could it be that I'm using InnoDB type? 3. Anything else? Any kind of sugestions is appreciated. Thnx. Possible Models based on your current database: 1. DocumentsDevice 2. Group 3. InvestigationalSite 4. Investigator 5. Manufacturer 6. MedicinalDevice 7. MedicinalProduct 8. ReportDevice 9. ReportProduct 10. SoaDevice 11. SoaProduct 12. User Enter a number from the list above, type in the name of another model, or 'q' to exit [q] 2 Would you like to supply validation criteria for the fields in your model? (y/n) [y] n Would you like to define model associations (hasMany, hasOne, belongsTo, etc.)? (y/n) [y] y One moment while the associations are detected. --- Please confirm the following associations: --- Would you like to define some additional model associations? (y/n) [n] --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Associations - naming conventions
Hi, I have a matches table that consist of a home_team and an away_team column. I also have a teams table with the team information so home_team and away_team are foreign keys referring to the particular id of teams. Unfortunately I can't seem to configure this with cakephp (the naming conventions would suggest to make a home_teams table and an away_teams table but that's ridiculous, data duplication, I guess). Could someone help me setting up the associations? $hasMany? $belongsTo? Thanks! --~--~-~--~~~---~--~~ 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: with debug = 0, Cakelog::write results in blank page
Most probably you fogot to define view file or something else that cold lead to 404 error. On 9 июл, 01:25, rb rbo...@epsbooks.com wrote: After searching the group, I'm seeing there are a few issues when debug = 0. My issue is with Cakelog::write. Anytime I use it w/ debug 0, everything renders just fine -- no errors. Once I set debug = 0, the page will show up blank. Is there something about cakephp classes while debug = 0 that I'm not aware of? Or has anyone seen this issue before? Thanks.. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
App Controller not intialized on error (missing action/controller)
I am having a problem, The array for my view's nav menu is built in app/app_controller.php, when an error occures the variable is not being initialized, I assume this is because app_controller.php is not being called? any solutions? --~--~-~--~~~---~--~~ 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: hasMany question
A thorough read of the cookbook is always a good place to start I have never tried sorting by two fields, but how about: *$this-Post-find('all',array('order' = array('Post.created ASC', 'Comment.created DESC')));* if that doesnt work: *$this-Post-find('all',array('order' = 'Post.created ASC, Comment.created DESC'));* And you can't do $this-Comment in the Posts Controller because $this refers to an instance of the class (Posts Controller)... and this class by itself doesn't have an instantiated reference to the Comment model's class... However, due to the defined relationships, cake takes care of making a reference of the Comment model instance inside the Post model instance (which the Posts Controller can acces through $this-Post).. making it accesible by $this-Post-Comment Hope I didn't confuse you much 2009/7/15 fedekun fedekil...@gmail.com Hi! I have just started with CakePHP and it seems very good so far! But i have a little question... i have a Post model, each post hasMany comments, and comments belongsTo a Post. So, recursive in the Post model is default, so when i do $this-Post-find('all'); I get all posts and comments, now...If i want to order posts ASC and comments DESC...How do i do it? Also, another thing i dont know...When i'm in the Posts controller, i do $this-Post-find to get posts and $this-Post-Comment-find to get comments Why not $this-Comment-find ? --~--~-~--~~~---~--~~ 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 association problem
Maybe if you described the tables' fields.. theres gotta be some convention breaking there 2009/7/16 Zoran Kovac zoko2...@gmail.com Hi! I'm having a dilema, maybe the better word is that I'm puzzled. The problem is when I'm baking models. The console doesn't detect relations between tables automatically. For instance, the console does recognize all the tables from the database, but when it's triying to detect associations it comes up with the result like on the end of this post or just skips to 'Look okay?'. It the noted example on end of the post, I manage to create a complete model (with association to user), but association among other models fails. So my question's are: 1. Am I breaking some convetions and it's not working? 2. Could it be that I'm using InnoDB type? 3. Anything else? Any kind of sugestions is appreciated. Thnx. Possible Models based on your current database: 1. DocumentsDevice 2. Group 3. InvestigationalSite 4. Investigator 5. Manufacturer 6. MedicinalDevice 7. MedicinalProduct 8. ReportDevice 9. ReportProduct 10. SoaDevice 11. SoaProduct 12. User Enter a number from the list above, type in the name of another model, or 'q' to exit [q] 2 Would you like to supply validation criteria for the fields in your model? (y/n) [y] n Would you like to define model associations (hasMany, hasOne, belongsTo, etc.)? (y/n) [y] y One moment while the associations are detected. --- Please confirm the following associations: --- Would you like to define some additional model associations? (y/n) [n] --~--~-~--~~~---~--~~ 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: Submit/Cancel problem
I've got the same problem than you. did you find a solution? On 20 mai, 00:23, Nancy nancy.milli...@gmail.com wrote: Buttons without type of submit don't really do anything without onClick javascript right? I tried your idea and it just doesn't do anything. Reset just resets a form. I'd use the Javascript but I'm not entirely sure to how make that work with Ajax. On May 18, 5:35 pm, Gabriel A. Gonzalez gabriel...@gmail.com wrote: Use reset or button NOT submit type for the cancel button. input name=Cancel value=cancel type=reset or input name=Cancel value=cancel type=button Nancyescribió: So, I added a submit and a cancel button to my ajax form and it doesn't matter which you press, it always returns the submit button, not the cancel. The view code has this at the bottom (I stopped using helpers to see if raw HTML would help, it didn't): input name=Submit value=submit type=submit input name=Cancel value=cancel type=submit In the controller (admin_edit) function, I'm dumping out the contents of $this-params['form'] and it always shows Array ( [Submit] = submit ) Even if you press the cancel button. Am I doing something wrong? Thanks! Nancy --~--~-~--~~~---~--~~ 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: Structure of book.cakephp.org
Thanks for the feedback. I happen to agree with you. I know the docs team struggles sometimes with where to put things. They try their best to look at it from a new developer's perspective, but that is not an easy thing to do. Please feel free to suggest an alternate structure. If you can get on irc, go to #cakephp-docs on irc.freenode.net. We'll continue to review where we can make things better and easier for everyone. --~--~-~--~~~---~--~~ 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: Associations - naming conventions
Anyone? --~--~-~--~~~---~--~~ 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: $_POST
Hey, thank you very much! Let me try this out and I'll inform you if it was what I needed. On 7/16/09, cbhan gotob...@gmail.com wrote: As you know Cake is MVC framework , simply you can access the data posted from your view(your form),in the controller's method with the following: say the function name is mario then, function mario() { if(!empty($this-data)){ $mariodata=$this-data; $this-set('yourdata',$mariodata); } }, Now in your mario.ctp file,which is the view file of this action (method rather) from where you had posted your data type the following code ?php echo pr($yourdata); ? this will solve your problem. If not i will continue to help . On Jul 16, 4:57 am, mario vallejo gp2xmex...@gmail.com wrote: Hello and thank you for your time and attention. I am building a Facebook app and I want to use CakePHP to build it. The problem is the following I have tried to translate this into cake to no avail: $is_tab = isset($_POST['fb_sig_in_profile_tab']); if( !$is_tab ) $user = $fb-require_login(); And that's really the only thing left in order to finish my app. I have got no clue on how to access 'normal' $_POST data inside of cake. Thank you very much and I really appreciate this. Mario R. Vallejo --~--~-~--~~~---~--~~ 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: Associations - naming conventions
Hello, I have a matches table that consist of a home_team and an away_team column. I also have a teams table with the team information so home_team and away_team are foreign keys referring to the particular id of teams. Unfortunately I can't seem to configure this with cakephp (the naming conventions would suggest to make a home_teams table and an away_teams table but that's ridiculous, data duplication, I guess). Could someone help me setting up the associations? $hasMany? $belongsTo? You are right, no need for two tables. Just setup two 'belongsTo' relationships. var $belongsTo = array( 'HomeTeam' = array( 'className'= 'Team', 'foreignKey'= 'home_team' ), 'AwayTeam' = array( 'className'= 'Team', 'foreignKey'= 'away_team' ) ); Works? Regards, Piotr --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Modificar html del mensaje de contraseña incorrecta en el componente Auth.
Hola; Estoy intentando modificar el html que se genera automáticamente en el mensaje de contraseña incorrecta del componente Auth. El texto en si lo he modificado sin problemas tal como se comenta en la documentación: function beforeFilter() { $this-Auth-loginError = 'Su contraseña es incorrecta.'; $this-Auth-authError = 'Debe entrar en el sistema con una contraseña.'; } Lo que no veo es la manera de decirle que html me genera, o mejor aun, que solo me salga el texto que ya me encargo yo en la vista de poner las etiquetas adecuadas. He buscado en los foros en inglés y por aquí pero no he encontrado nada. --~--~-~--~~~---~--~~ 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: jQuery UI Tabs and Ajax
On Wed, Jul 15, 2009 at 5:04 PM, havannathomas.blas...@diacs.de wrote: Hi Brian, thank you for your answer. With $this-contain = false I'm using the shortform (see on http://book.cakephp.org/view/474/Containable). Yes, it's the short form to tell Cake not to bother invoking Containable. So there's no point in attaching it at all. You could simply use 'recursive' = -1 instead. I tried your changes. The errors changed: now in my view the vars which I set in the controller are unknown: Undefined variable: Objektnummer. Is it right, that the view is the same as for tab 1 to 4 or need I an element to display my variables? Yes, you need to have a view for each. Think of it as a normal request to the server, but no layout is used. Each tab has a link to some controller action and those actions each have their own view. --~--~-~--~~~---~--~~ 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: Associations - naming conventions
You've done a great deed for a noob today. Thanks a lot Piotr! --~--~-~--~~~---~--~~ 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: variable to string
You should get the value from $this-data['Destination']['place'] On Thu, Jul 16, 2009 at 5:09 AM, Paulos23paulitosthe...@gmail.com wrote: Hi people, i am facing a problem with my app.In particular i use httpsocket for a request in an external site to get some information.I have an element to force user put some name: ?php echo ($form-create('Destination', array ('controller'='destinations','action' ='search')));? ?php echo $form-input('place', array('label'= 'Search Location:'));? div align=center ?php echo ($form-submit('Search', array('div' = false,'class' = 'submitbutton'))); ? ?php echo($form-end()); ? /div now in my controller i have a search function where i want to take the place variable as a parameter so i do: function search($place=null) { App::import('Core', 'HttpSocket'); App::import('Xml'); $HttpSocket = new HttpSocket(); $results = $HttpSocket-get('http://ws.geonames.org/search?', 'q='. $place.'maxRows=10'); I am doing this '.$place.' to take place as a string but it doesnt work.Any help to this plz? Ty v much! Paulos --~--~-~--~~~---~--~~ 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: cakephp with javascript
(¨`•.•´¨) I may be busy, `•.¸(¨`•.•´¨) but I assure you, (¨`•.•´¨)¸.•´ you are always in my heart `•.¸.•´ With Lots of Love. THANKS AND REGARDS Jeffery Jacob Hey Jeff, Looks like you got your Cakephp message signature mixed up with the one for the Dating Site. :-) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
CakePHP and Jcrop
Has anyone implemented JCrop into a cake application? ***not interested in the jQuery Crop and Upload as in the Bakery *** So far I have upload images function which creates 1 size for the gallery and a thumbnail. Added editimage function which loads the fullsize image and the jCrop interface to select the part of the large image you would like to use for the thumb Built the form and pass the x,y, w, h back to the controller but cant seem to get the new thumb to save. I have img/gallery /thumb/ where i want to savethe cropped thumb to /lrg/ = holds the master image to sample from Can someone who has used jCrop please help me out with the final step? Thanks, Dave --~--~-~--~~~---~--~~ 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: Tried to install another application inside cakePHP configuration
If you have httpd.conf access, I'd put the directive in there. Alias /pma /var/www/html/phpMyAdmin Directory /var/www/html/phpMyAdmin ... /Directory On Jul 15, 9:11 am, saavedrajj saavedr...@gmail.com wrote: it works with this code IfModule mod_rewrite.c RewriteEngine on rewritecond %{REQUEST_URI} ^/(name_of_folder_application|fm)/ RewriteRule .* - [S=2] RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] /IfModule any better idea? --~--~-~--~~~---~--~~ 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: Root Server: email-component fails sometimes, why?
Anything on your system to suggest it's overloaded and the messages are getting silently dropped? If you increase Cake's debug level you should see some output which could help you out, it'll give you a full stack trace I believe. On Jul 15, 1:17 pm, DigitalDude e.blumsten...@googlemail.com wrote: Hey, yes, all emails that are not being delivered are not listet in the logs of my email server. It looks like the send() command never gets executed, the email is never passed into the mail-queue on the server. The weirdest thing of all is, that on another server, every email gets send without ANY problems. And it is the exact same code! On 15 Jul., 22:07, GravyFace gravyf...@gmail.com wrote: Anything in your sendmail/qmail/postfix queue? logs? On Wed, Jul 15, 2009 at 4:01 PM, DigitalDudee.blumsten...@googlemail.com wrote: Hey, the App on my root-server sometimes does not send emails, even if the recipients are the same. So when I use a testfunction which sends the exact same email to the same address let's say 5 times, there are only 3 or 4 mails delivered and the other(s) are not! How can this happen? --~--~-~--~~~---~--~~ 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: $_POST
cbhan - I think that Cake will only store data into the Controller::data attribute if the corresponding HTML entity is named according to Cake convention (e.g. data[Field]). Without that data identifier, I don't think you'll be able to access the facebook POST'd values in the controller in that manner. Instead, I suggest you try out the Webservice Behavior (from the Bakery, natch). http://bakery.cakephp.org/articles/view/webservice-behavior. It's designed to allow your app to act as a webservice, so it should do the trick for you. On Jul 16, 12:05 am, cbhan gotob...@gmail.com wrote: As you know Cake is MVC framework , simply you can access the data posted from your view(your form),in the controller's method with the following: say the function name is mario then, function mario() { if(!empty($this-data)){ $mariodata=$this-data; $this-set('yourdata',$mariodata);} }, Now in your mario.ctp file,which is the view file of this action (method rather) from where you had posted your data type the following code ?php echo pr($yourdata); ? this will solve your problem. If not i will continue to help . On Jul 16, 4:57 am, mario vallejo gp2xmex...@gmail.com wrote: Hello and thank you for your time and attention. I am building a Facebook app and I want to use CakePHP to build it. The problem is the following I have tried to translate this into cake to no avail: $is_tab = isset($_POST['fb_sig_in_profile_tab']); if( !$is_tab ) $user = $fb-require_login(); And that's really the only thing left in order to finish my app. I have got no clue on how to access 'normal' $_POST data inside of cake. Thank you very much and I really appreciate this. Mario R. Vallejo --~--~-~--~~~---~--~~ 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: CakePHP and Jcrop
Does the controller receive the values? What are you using to do the actual cropping? Is the webserver allowed to write to the directory? Are you seeing errors in the log? On Thu, Jul 16, 2009 at 12:30 PM, Dave Maharaj :: WidePixels.comd...@widepixels.com wrote: Has anyone implemented JCrop into a cake application? ***not interested in the jQuery Crop and Upload as in the Bakery *** So far I have upload images function which creates 1 size for the gallery and a thumbnail. Added editimage function which loads the fullsize image and the jCrop interface to select the part of the large image you would like to use for the thumb Built the form and pass the x,y, w, h back to the controller but cant seem to get the new thumb to save. I have img/gallery /thumb/ where i want to savethe cropped thumb to /lrg/ = holds the master image to sample from Can someone who has used jCrop please help me out with the final step? Thanks, Dave --~--~-~--~~~---~--~~ 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: CakePHP and Jcrop
I just figured it out Was missing the save the new image function. Added; imagejpeg($dst_r, $output_filename, $jpeg_quality); in the editimage function and presto Much easier than the Bakery component Thanks Dave -Original Message- From: brian [mailto:bally.z...@gmail.com] Sent: July-16-09 2:27 PM To: cake-php@googlegroups.com Subject: Re: CakePHP and Jcrop Does the controller receive the values? What are you using to do the actual cropping? Is the webserver allowed to write to the directory? Are you seeing errors in the log? On Thu, Jul 16, 2009 at 12:30 PM, Dave Maharaj :: WidePixels.comd...@widepixels.com wrote: Has anyone implemented JCrop into a cake application? ***not interested in the jQuery Crop and Upload as in the Bakery *** So far I have upload images function which creates 1 size for the gallery and a thumbnail. Added editimage function which loads the fullsize image and the jCrop interface to select the part of the large image you would like to use for the thumb Built the form and pass the x,y, w, h back to the controller but cant seem to get the new thumb to save. I have img/gallery /thumb/ where i want to savethe cropped thumb to /lrg/ = holds the master image to sample from Can someone who has used jCrop please help me out with the final step? Thanks, Dave --~--~-~--~~~---~--~~ 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: URI problem
On Wed, Jul 15, 2009 at 5:23 PM, Yc Zhangnjit...@gmail.com wrote: and I add a line of RewriteBase to public_html/cake/app/weboot folder RewriteBase /~username/cake/ CakePHP has three .htaccess files. Besides the one at public_html/cake/app/webroot, try adding the RewriteBase to the others too, in your case, at public_html/cake and public_html/cake/app. Best regards. -- MARCELO DE F. ANDRADE Belem, PA, Amazonia, Brazil Linux User #221105 http://mfandrade.wordpress.com --~--~-~--~~~---~--~~ 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: jQuery UI Tabs and Ajax
Hi Brian, thank you again for your answer. I think I comming a step forward. I thought also yesterday, that the ajax call will call my other view. Now I think my problem is the ui tab. At ui tabs you can include your content from the view - that works for tab1 to tab4. It's also possible to say that the content come from an ajax call ( remote: true ). But I don't know, how to combine this togehter: script type=text/javascript $(function() { $(#tabs).tabs(); $('#tabs').tabs(5)({ remote: true }); // this doesn't work }); /script Regards Thomas On 16 Jul., 17:28, brian bally.z...@gmail.com wrote: On Wed, Jul 15, 2009 at 5:04 PM,havannathomas.blas...@diacs.de wrote: Hi Brian, thank you for your answer. With $this-contain = false I'm using the shortform (see on http://book.cakephp.org/view/474/Containable). Yes, it's the short form to tell Cake not to bother invoking Containable. So there's no point in attaching it at all. You could simply use 'recursive' = -1 instead. I tried your changes. The errors changed: now in my view the vars which I set in the controller are unknown: Undefined variable: Objektnummer. Is it right, that the view is the same as for tab 1 to 4 or need I an element to display my variables? Yes, you need to have a view for each. Think of it as a normal request to the server, but no layout is used. Each tab has a link to some controller action and those actions each have their own view. --~--~-~--~~~---~--~~ 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: jQuery UI Tabs and Ajax
Sorry, I don't know. You might get a better response from the jquery google group. There are a lot of people who are very helpful with it. Ask how to mix UITab content between local page content and remote. On Thu, Jul 16, 2009 at 1:30 PM, havannathomas.blas...@diacs.de wrote: Hi Brian, thank you again for your answer. I think I comming a step forward. I thought also yesterday, that the ajax call will call my other view. Now I think my problem is the ui tab. At ui tabs you can include your content from the view - that works for tab1 to tab4. It's also possible to say that the content come from an ajax call ( remote: true ). But I don't know, how to combine this togehter: script type=text/javascript $(function() { $(#tabs).tabs(); $('#tabs').tabs(5)({ remote: true }); // this doesn't work }); /script Regards Thomas On 16 Jul., 17:28, brian bally.z...@gmail.com wrote: On Wed, Jul 15, 2009 at 5:04 PM,havannathomas.blas...@diacs.de wrote: Hi Brian, thank you for your answer. With $this-contain = false I'm using the shortform (see on http://book.cakephp.org/view/474/Containable). Yes, it's the short form to tell Cake not to bother invoking Containable. So there's no point in attaching it at all. You could simply use 'recursive' = -1 instead. I tried your changes. The errors changed: now in my view the vars which I set in the controller are unknown: Undefined variable: Objektnummer. Is it right, that the view is the same as for tab 1 to 4 or need I an element to display my variables? Yes, you need to have a view for each. Think of it as a normal request to the server, but no layout is used. Each tab has a link to some controller action and those actions each have their own view. --~--~-~--~~~---~--~~ 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: CakePHP and Jcrop
Yeah, that component at the Bakery seemed a bit dubious. On Thu, Jul 16, 2009 at 1:04 PM, Dave Maharaj :: WidePixels.comd...@widepixels.com wrote: I just figured it out Was missing the save the new image function. Added; imagejpeg($dst_r, $output_filename, $jpeg_quality); in the editimage function and presto Much easier than the Bakery component Thanks Dave -Original Message- From: brian [mailto:bally.z...@gmail.com] Sent: July-16-09 2:27 PM To: cake-php@googlegroups.com Subject: Re: CakePHP and Jcrop Does the controller receive the values? What are you using to do the actual cropping? Is the webserver allowed to write to the directory? Are you seeing errors in the log? On Thu, Jul 16, 2009 at 12:30 PM, Dave Maharaj :: WidePixels.comd...@widepixels.com wrote: Has anyone implemented JCrop into a cake application? ***not interested in the jQuery Crop and Upload as in the Bakery *** So far I have upload images function which creates 1 size for the gallery and a thumbnail. Added editimage function which loads the fullsize image and the jCrop interface to select the part of the large image you would like to use for the thumb Built the form and pass the x,y, w, h back to the controller but cant seem to get the new thumb to save. I have img/gallery /thumb/ where i want to savethe cropped thumb to /lrg/ = holds the master image to sample from Can someone who has used jCrop please help me out with the final step? Thanks, Dave --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
How to make use of the error method for one controller with different modules
My scenario is : Keep for example there is a view file and it has 2 input fields for entering name. First field belong to model_1 which is the primary model of the view page. Second field belongs to another model model_2. Both fields are mandatory and has an error msg. if left blank. If I use $this-model-invalidFields() in my controller, I am getting the errors as an array. -- No issues here. But when I try to use $form-error(...) function, errors get displayed for the first field which belongs to the primary model but for the second field though I leave it blank no error msg. are getting displayed. I understand we have to tell cakePHP that second field belongs to another model, So I declared it in following way: echo $form-input('model_2.NAME', array('class' = 'input_edit')); echo $form-error('model_2.NAME', 'error msg'); What is wrong with the above? Am I not addressing something here? Please help me to solve this issue. --~--~-~--~~~---~--~~ 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: CakePHP and Jcrop
I tried the Bakery one over and over and finally got it workingthen after a few uploads of testing I get 500 Internal Server Error...but who knows. Figured I would try it on my own and to my surprise it works perfect and with very little code. Dave -Original Message- From: brian [mailto:bally.z...@gmail.com] Sent: July-16-09 3:15 PM To: cake-php@googlegroups.com Subject: Re: CakePHP and Jcrop Yeah, that component at the Bakery seemed a bit dubious. On Thu, Jul 16, 2009 at 1:04 PM, Dave Maharaj :: WidePixels.comd...@widepixels.com wrote: I just figured it out Was missing the save the new image function. Added; imagejpeg($dst_r, $output_filename, $jpeg_quality); in the editimage function and presto Much easier than the Bakery component Thanks Dave -Original Message- From: brian [mailto:bally.z...@gmail.com] Sent: July-16-09 2:27 PM To: cake-php@googlegroups.com Subject: Re: CakePHP and Jcrop Does the controller receive the values? What are you using to do the actual cropping? Is the webserver allowed to write to the directory? Are you seeing errors in the log? On Thu, Jul 16, 2009 at 12:30 PM, Dave Maharaj :: WidePixels.comd...@widepixels.com wrote: Has anyone implemented JCrop into a cake application? ***not interested in the jQuery Crop and Upload as in the Bakery *** So far I have upload images function which creates 1 size for the gallery and a thumbnail. Added editimage function which loads the fullsize image and the jCrop interface to select the part of the large image you would like to use for the thumb Built the form and pass the x,y, w, h back to the controller but cant seem to get the new thumb to save. I have img/gallery /thumb/ where i want to savethe cropped thumb to /lrg/ = holds the master image to sample from Can someone who has used jCrop please help me out with the final step? Thanks, Dave --~--~-~--~~~---~--~~ 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: Tried to install another application inside cakePHP configuration
thanks everybody for the help On 16 jul, 12:31, Travis L lele...@gmail.com wrote: If you have httpd.conf access, I'd put the directive in there. Alias /pma /var/www/html/phpMyAdmin Directory /var/www/html/phpMyAdmin ... /Directory On Jul 15, 9:11 am,saavedrajjsaavedr...@gmail.com wrote: it works with this code IfModule mod_rewrite.c RewriteEngine on rewritecond %{REQUEST_URI} ^/(name_of_folder_application|fm)/ RewriteRule .* - [S=2] RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] /IfModule any better idea? --~--~-~--~~~---~--~~ 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: Associations - naming conventions
Hi, Now I have a problem with the hasOne association. Users have a favorite club (favclub) which is a foreign key to the Clubs (contains id and name) table. How do I code that? So every user hasOne favclub (referring to clubs.id)? Thanks for much appreciated your help. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
belongsto relationship not working
I have successfully set up other belongsto relationships in this program but one does not work the model code is: class IrrigationEvent extends AppModel { var $name = 'IrrigationEvent'; var $useTable = 'irrigation_events'; var $belongsTo = array( 'Field' = array( 'className' = 'Field', 'foreignKey'= 'fields_id' )); } ? I am not sure what other code would help, so let me know if you need more code. any ideas why my relationship does not work? Thanks --~--~-~--~~~---~--~~ 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: belongsto relationship not working
Hello, I have successfully set up other belongsto relationships in this program but one does not work the model code is: class IrrigationEvent extends AppModel { var $name = 'IrrigationEvent'; var $useTable = 'irrigation_events'; var $belongsTo = array( 'Field' = array( 'className' = 'Field', 'foreignKey'= 'fields_id' )); } ? FK should be field_id? Regards, Piotr --~--~-~--~~~---~--~~ 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: Associations - naming conventions
Hello, Now I have a problem with the hasOne association. Users have a favorite club (favclub) which is a foreign key to the Clubs (contains id and name) table. How do I code that? So every user hasOne favclub (referring to clubs.id)? Thanks for much appreciated your help. This might be illogical at first, but it's a belongsTo relationship. User belongsTo his favorite club :) Regards, Piotr --~--~-~--~~~---~--~~ 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: CakePHP and Jcrop
You should try my uploader plugin, it wont cause any errors. http://www.milesj.me/resources/script/uploader-plugin On Jul 16, 10:50 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I tried the Bakery one over and over and finally got it workingthen after a few uploads of testing I get 500 Internal Server Error...but who knows. Figured I would try it on my own and to my surprise it works perfect and with very little code. Dave -Original Message- From: brian [mailto:bally.z...@gmail.com] Sent: July-16-09 3:15 PM To: cake-php@googlegroups.com Subject: Re: CakePHP and Jcrop Yeah, that component at the Bakery seemed a bit dubious. On Thu, Jul 16, 2009 at 1:04 PM, Dave Maharaj :: WidePixels.comd...@widepixels.com wrote: I just figured it out Was missing the save the new image function. Added; imagejpeg($dst_r, $output_filename, $jpeg_quality); in the editimage function and presto Much easier than the Bakery component Thanks Dave -Original Message- From: brian [mailto:bally.z...@gmail.com] Sent: July-16-09 2:27 PM To: cake-php@googlegroups.com Subject: Re: CakePHP and Jcrop Does the controller receive the values? What are you using to do the actual cropping? Is the webserver allowed to write to the directory? Are you seeing errors in the log? On Thu, Jul 16, 2009 at 12:30 PM, Dave Maharaj :: WidePixels.comd...@widepixels.com wrote: Has anyone implemented JCrop into a cake application? ***not interested in the jQuery Crop and Upload as in the Bakery *** So far I have upload images function which creates 1 size for the gallery and a thumbnail. Added editimage function which loads the fullsize image and the jCrop interface to select the part of the large image you would like to use for the thumb Built the form and pass the x,y, w, h back to the controller but cant seem to get the new thumb to save. I have img/gallery /thumb/ where i want to savethe cropped thumb to /lrg/ = holds the master image to sample from Can someone who has used jCrop please help me out with the final step? Thanks, Dave --~--~-~--~~~---~--~~ 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: CakePHP and Jcrop
Looks good. Will give it a try later tonight. Thanks, Dave -Original Message- From: Miles J [mailto:mileswjohn...@gmail.com] Sent: July-16-09 6:28 PM To: CakePHP Subject: Re: CakePHP and Jcrop You should try my uploader plugin, it wont cause any errors. http://www.milesj.me/resources/script/uploader-plugin On Jul 16, 10:50 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I tried the Bakery one over and over and finally got it workingthen after a few uploads of testing I get 500 Internal Server Error...but who knows. Figured I would try it on my own and to my surprise it works perfect and with very little code. Dave -Original Message- From: brian [mailto:bally.z...@gmail.com] Sent: July-16-09 3:15 PM To: cake-php@googlegroups.com Subject: Re: CakePHP and Jcrop Yeah, that component at the Bakery seemed a bit dubious. On Thu, Jul 16, 2009 at 1:04 PM, Dave Maharaj :: WidePixels.comd...@widepixels.com wrote: I just figured it out Was missing the save the new image function. Added; imagejpeg($dst_r, $output_filename, $jpeg_quality); in the editimage function and presto Much easier than the Bakery component Thanks Dave -Original Message- From: brian [mailto:bally.z...@gmail.com] Sent: July-16-09 2:27 PM To: cake-php@googlegroups.com Subject: Re: CakePHP and Jcrop Does the controller receive the values? What are you using to do the actual cropping? Is the webserver allowed to write to the directory? Are you seeing errors in the log? On Thu, Jul 16, 2009 at 12:30 PM, Dave Maharaj :: WidePixels.comd...@widepixels.com wrote: Has anyone implemented JCrop into a cake application? ***not interested in the jQuery Crop and Upload as in the Bakery *** So far I have upload images function which creates 1 size for the gallery and a thumbnail. Added editimage function which loads the fullsize image and the jCrop interface to select the part of the large image you would like to use for the thumb Built the form and pass the x,y, w, h back to the controller but cant seem to get the new thumb to save. I have img/gallery /thumb/ where i want to savethe cropped thumb to /lrg/ = holds the master image to sample from Can someone who has used jCrop please help me out with the final step? Thanks, Dave --~--~-~--~~~---~--~~ 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: Using layouts with themes
I got it to work, there was some other code interfering in some unpredictable ways, when that was cleaned up the theming worked. It's pretty nice to be able to theme and use different layouts now. thanks for the css tip, I will probably update the layout code to use that html css helper. On Jul 15, 6:55 pm, ramzwatcher coolramz...@gmail.com wrote: Did you place the css files at webroot? That should work. You can call custom css for specific page by placing in the ctp file: ?php e($html-css('empty')); ? Hopefully it helps On Jul 16, 5:19 am, djfingers john.arr...@gmail.com wrote: I have implementedthemeson my site but I'm having trouble getting layouts withinthemesto work. Right now only the default layout with any given theme is being used. Can layouts work withinthemes? If so, are there any special things that need to be coded. Shouldn't $this-layout = 'mylayout' work within a theme? I couldn't find any information on this within the cakephp site or the google group. Any help or links would be appreciated! --~--~-~--~~~---~--~~ 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: hasMany question
Thanks! Hmm is there a way to do that on read instead of find? I have... $this-Post-read(null, $id); I cant find documentationfor read method though..i just find about find, findAll etc... On 16 jul, 10:59, Carlos Gonzalez Lavin carloslavi...@gmail.com wrote: A thorough read of the cookbook is always a good place to start I have never tried sorting by two fields, but how about: *$this-Post-find('all',array('order' = array('Post.created ASC', 'Comment.created DESC')));* if that doesnt work: *$this-Post-find('all',array('order' = 'Post.created ASC, Comment.created DESC'));* And you can't do $this-Comment in the Posts Controller because $this refers to an instance of the class (Posts Controller)... and this class by itself doesn't have an instantiated reference to the Comment model's class... However, due to the defined relationships, cake takes care of making a reference of the Comment model instance inside the Post model instance (which the Posts Controller can acces through $this-Post).. making it accesible by $this-Post-Comment Hope I didn't confuse you much 2009/7/15 fedekun fedekil...@gmail.com Hi! I have just started with CakePHP and it seems very good so far! But i have a little question... i have a Post model, each post hasMany comments, and comments belongsTo a Post. So, recursive in the Post model is default, so when i do $this-Post-find('all'); I get all posts and comments, now...If i want to order posts ASC and comments DESC...How do i do it? Also, another thing i dont know...When i'm in the Posts controller, i do $this-Post-find to get posts and $this-Post-Comment-find to get comments Why not $this-Comment-find ? --~--~-~--~~~---~--~~ 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 saveAll
Seems like it's working now. I changed the table type to MyISAM, which corrupted the table. So I repaired it and changed it back to InnoDB. Now it's working fine. I didn't change any code. Can anybody explain this? Jon Chin Jon Chin wrote: I'm experiencing weird behavior with using $this-model-saveAll(). When I pass it an array of just one record, it successfully inserts this to the db table. However, when I pass it an array of more than one record, they all successfully insert except for the last record. Anybody have an idea of what could be wrong? Thanks. smime.p7s Description: S/MIME Cryptographic Signature
Re: App Controller not intialized on error (missing action/controller)
not quite right.. the beforeFilter() and afterFilter() functions are not triggered but if you put your code in the beforeRender() it should work On 16 Jul., 09:34, Brendon Gleeson gleeso...@mobilitas.org wrote: I am having a problem, The array for my view's nav menu is built in app/app_controller.php, when an error occures the variable is not being initialized, I assume this is because app_controller.php is not being called? any solutions? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Blank white screen on new upload
Hiya, Our client has a site built with CakePHP and has today had a prob with their previous host - so we've quickly had to move it all to a new hosting account. We've got everything uploaded and all paths seem to be ok - but when .htaccess is set to redirect to app/webroot it just returns a blank white screen. We've checked PHP is working (we've tried a lot of stuff!), we've tried turning Debug to 2 to show errors but it doesn't make any difference, and we've tested mod rewrite is apparently on. Any ideas gratefully received! It's been a very long day and we need to go to bed! Thank you! Lx --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
replacing parts of url
Hi all, I'm developing a web application, in which the when the user adds a filter, it is appended to the url, for example http://www.classifieds.my/categories/list_post/category_name/price:245/title:something/keyword:somethingelse/name:newname Everything is working fine now, But I want the user to add the filter city. When the user clicks a particular city link, the above url must be turned into http://cityname.classifieds.my/categories/list_post/category_name/price:245/title:something/keyword:somethingelse/name:newname ie) i don't want to loose other filters . I have done an ugly hack, in which i get the url from $this-here and replace the sudomain part. Is there a cake way to do it. Or how to implement this feature in cakephp? Thanks Isaac --~--~-~--~~~---~--~~ 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: Blank white screen on new upload
Are you sure index.php under webroot/ is pointing to the right ROOT, APP_DIR and CAKE directories? Lapinski Lisa-69 wrote: Hiya, Our client has a site built with CakePHP and has today had a prob with their previous host - so we've quickly had to move it all to a new hosting account. We've got everything uploaded and all paths seem to be ok - but when .htaccess is set to redirect to app/webroot it just returns a blank white screen. We've checked PHP is working (we've tried a lot of stuff!), we've tried turning Debug to 2 to show errors but it doesn't make any difference, and we've tested mod rewrite is apparently on. Any ideas gratefully received! It's been a very long day and we need to go to bed! Thank you! Lx -- View this message in context: http://www.nabble.com/Blank-white-screen-on-new-upload-tp24526674p24527093.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
App::import - I'm doing it wrong?
Hello! So I'm in the process of upgrading to Cake 1.2 (from an earlier beta, I believe), and I'm switching from the vendors() function to the App::import function. According to http://book.cakephp.org/view/499/The-App-Class, there's an example that's close to what I want to do: App::import('Vendor', 'flickr/flickr'); However, my class is in ResultSet.php, and since I've got a couple of these, I put them all into the vendors/StudentTracker file. So naturally I tried App::import('Vendor', 'StudentTracker/ResultSet'); I expected this to work, but it didn't. After putting some handy printf's*cough*debug statements into App::__load, I noticed that Cake is inflecting the name I gave it. It's both lowercasing the path, and putting underscores in. My question is this: am I doing this wrong, or is this a bug? I ask because I was under the impression that the 'vendors' directory wasn't supposed to make any assumptions about how the directories/files were named, and therefore it seems like inflecting the provided filename would therefore be wrong. It appears to be pretty easy to hack a change into the core Cake files (see http://bin.cakephp.org/view/1215188782), although I've no idea how it will affect anything else (haven't even run the unit tests) Anyways - am I wrong about the vendors files not needing inflection, or is this a bug? Thanks! --Mike P.S. It appears that I can forcibly direct Cake to the right file using the following, in case anyone else is using this post as a 'help file' :) App::import( 'Vendor', 'StudentTracker/ResultSet', array('file' = 'StudentTracker'.DS.'ResultSet.php')); --~--~-~--~~~---~--~~ 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: jQuery UI Tabs and Ajax
IIRC, $('#tabs').tabs() should be sufficient, as long as one of your LI contains a remote URL. For your fifth tab, try using the following: li a href=/admin/attachments/getlist/?php echo $this-data ['Posts']['id']; ? /a /li Note that I removed the span there. It should call /admin/attachments/getlist/XXX when the fifth tab is clicked/activated. On Jul 17, 12:30 am, havanna thomas.blas...@diacs.de wrote: Hi Brian, thank you again for your answer. I think I comming a step forward. I thought also yesterday, that the ajax call will call my other view. Now I think my problem is the ui tab. At ui tabs you can include your content from the view - that works for tab1 to tab4. It's also possible to say that the content come from an ajax call ( remote: true ). But I don't know, how to combine this togehter: script type=text/javascript $(function() { $(#tabs).tabs(); $('#tabs').tabs(5)({ remote: true }); // this doesn't work }); /script Regards Thomas On 16 Jul., 17:28, brian bally.z...@gmail.com wrote: On Wed, Jul 15, 2009 at 5:04 PM,havannathomas.blas...@diacs.de wrote: Hi Brian, thank you for your answer. With $this-contain = false I'm using the shortform (see on http://book.cakephp.org/view/474/Containable). Yes, it's the short form to tell Cake not to bother invoking Containable. So there's no point in attaching it at all. You could simply use 'recursive' = -1 instead. I tried your changes. The errors changed: now in my view the vars which I set in the controller are unknown: Undefined variable: Objektnummer. Is it right, that the view is the same as for tab 1 to 4 or need I an element to display my variables? Yes, you need to have a view for each. Think of it as a normal request to the server, but no layout is used. Each tab has a link to some controller action and those actions each have their own view. --~--~-~--~~~---~--~~ 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: Blank white screen on new upload
Can you post the content in .htaccess here? Why you set it manually? On Fri, Jul 17, 2009 at 6:39 AM, Lisa adminbris...@googlemail.com wrote: Hiya, Our client has a site built with CakePHP and has today had a prob with their previous host - so we've quickly had to move it all to a new hosting account. We've got everything uploaded and all paths seem to be ok - but when .htaccess is set to redirect to app/webroot it just returns a blank white screen. We've checked PHP is working (we've tried a lot of stuff!), we've tried turning Debug to 2 to show errors but it doesn't make any difference, and we've tested mod rewrite is apparently on. Any ideas gratefully received! It's been a very long day and we need to go to bed! Thank you! Lx -- Thanks Joshua 5span Inc. https://www.5span.com --~--~-~--~~~---~--~~ 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: App::import - I'm doing it wrong?
Yeah if the import doesnt work right off the bat, you have to use the file option. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
url to array
Hi, Every functions in helpers like $html-link $html-urlconverts the array url parameters in to an url (like array('controller' = 'posts','action' = 'view'); gets converted in to /posts/view is there any function in cakephp that does the reverse?. Example convert /posts/view/1/cat:animals/name:rajato something like array('controller' = 'posts', 'action' = view,'pass' = 1, params['named']['cat'] = 'animals'); Thanks Isaac --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Cakephp development questions
Hi, what is the development flow in cakephp, define routers and then start creating application or create application and then create routing config? also how to name the controller methods like Categories::list_post() or Categories::listPost() ? Thanks Isaac --~--~-~--~~~---~--~~ 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: A Table Belongs to the Same Table
Thanks Miles, thanks ecommy... On Jul 14, 11:17 am, ecommy bstdevelopm...@gmail.com wrote: you may want to check this:http://bakery.cakephp.org/articles/view/coding-a-self-join-in-a-cake-... On Jul 14, 9:04 am, si-mon sijumo...@gmail.com wrote: Hi All, I am creating a CRM application in cake php. In it, in my user table, there are three levels of users viz. Director, Manager and Executive. I need to include a field reports_to Eg: executive1 reports_to manager1 executive2 reports_to manager1 executive3 reports_to manager2 executive4 reports_to manager3 and so on... This means, the users table belongsTo (or hasAndBelongsToMany) the same users table. Please help me to implement this... 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: App::import - I'm doing it wrong?
Is that by design (for the 'vendors' stuff)? If it is, I'd love to volunteer to update the documentation in the online Cake book to make this more clear. Thanks! On Jul 16, 8:15 pm, Miles J mileswjohn...@gmail.com wrote: Yeah if the import doesnt work right off the bat, you have to use the file option. --~--~-~--~~~---~--~~ 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 with reset and submit button
Please anyone gave me a solution --~--~-~--~~~---~--~~ 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 with reset and submit button
Trying moving your $form-button('Reset', ) to before $form-submit ('Save Post'); On Jul 17, 11:57 am, Dhileepen Chakravarthy dhileepen.cake...@gmail.com wrote: Please anyone gave me a solution --~--~-~--~~~---~--~~ 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 with reset and submit button
Upon rereading your snippet, I think your code should've worked. I'm not sure what's going on here. On Jul 16, 3:36 pm, Dhileepen Chakravarthy dhileepen.cake...@gmail.com wrote: Hi Everybody, I want to know how to show the form with reset or clear and submit button. reset to clear all form values , submit to submit the form.how do i do in cakephp, i can able to show the buttons like !-- File: /app/views/posts/add.ctp -- h1Add Post/h1 ?php echo $form-create('Post'); echo $form-input('title'); echo $form-input('body', array('rows' = '3')); echo $form-submit('Save Post'); echo $form-button('Reset', array('type'='reset')); echo $form-end(); ? but how do i assign the clear taks to that reset button Regards, Dhileepen --~--~-~--~~~---~--~~ 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 with reset and submit button
uses in reset action $this-data['Post']['body'] = ''; $this-data['Post']['title'] = ''; hope it will work On Thu, Jul 16, 2009 at 2:36 PM, Dhileepen Chakravarthy dhileepen.cake...@gmail.com wrote: Hi Everybody, I want to know how to show the form with reset or clear and submit button. reset to clear all form values , submit to submit the form.how do i do in cakephp, i can able to show the buttons like !-- File: /app/views/posts/add.ctp -- h1Add Post/h1 ?php echo $form-create('Post'); echo $form-input('title'); echo $form-input('body', array('rows' = '3')); echo $form-submit('Save Post'); echo $form-button('Reset', array('type'='reset')); echo $form-end(); ? but how do i assign the clear taks to that reset button Regards, Dhileepen -- Best Regard Amjad Farooq Web developer Bramerz (Pvt)Ltd. 00923214239682 --~--~-~--~~~---~--~~ 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 with reset and submit button
A reset button will only return the form to the state it had upon showing the page with the form! Reset will not clear the form if the form already contains values! If you want to clear the form, use javascript or turn the reset/clear button into at submit button and handle the clearing in the controller. Just like you where proposing below :) Enjoy, John On Jul 17, 8:16 am, Amjad Farooq superior.am...@gmail.com wrote: uses in reset action $this-data['Post']['body'] = ''; $this-data['Post']['title'] = ''; hope it will work On Thu, Jul 16, 2009 at 2:36 PM, Dhileepen Chakravarthy dhileepen.cake...@gmail.com wrote: Hi Everybody, I want to know how to show the form with reset or clear and submit button. reset to clear all form values , submit to submit the form.how do i do in cakephp, i can able to show the buttons like !-- File: /app/views/posts/add.ctp -- h1Add Post/h1 ?php echo $form-create('Post'); echo $form-input('title'); echo $form-input('body', array('rows' = '3')); echo $form-submit('Save Post'); echo $form-button('Reset', array('type'='reset')); echo $form-end(); ? but how do i assign the clear taks to that reset button Regards, Dhileepen -- Best Regard Amjad Farooq Web developer Bramerz (Pvt)Ltd. 00923214239682 --~--~-~--~~~---~--~~ 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 with reset and submit button
Thanks all !-- File: /app/views/posts/add.ctp -- h1Add Post/h1 ?php echo $form-create('Post'); echo $form-input('title'); echo $form-input('body', array('rows' = '3')); echo $form-button('Reset', array('type'='reset'), action=); echo $form-submit('Save Post'); echo $form-end(); ? //controller function add() { if (!empty($this-data)) { if ($this-Post-save($this-data)) { $this-Session-setFlash('Your post has been saved.'); $this-redirect(array('action' = 'index')); } } } how do i add the controller code here --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---