installation in subdirectory
Sorry about this basic question. I just seem to be getting conflicting reports, and am having trouble getting it working on a domain on which I only have FTP upload. If I'm setting up a cake project in a directory on a host. ie: www.test.com/projectfolder/ should it be sufficient to just dump the app, cake, vendors etc into the projectfolder? I'm assuming URLs would then look like www.test.com/projectfolder/controller/action What configuration changes, if any, would I need to make? Let me know if you need clarification. Chur, Toby --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: requestAction won't stay in div
That was just a typo, my point still stands --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: installation in subdirectory
Hi Toby, Do you perhaps have access to the folder above your html (www on my host) directory on the host? For instance, on my host I have the following kind of setup... myAccount - mydomain1 - mydomain2 - CakePHPLibs - ssl - myCakeApp - www - mysubfolder1 - mysubfolder2 - mysubfolder3 - myCakeAppWebRoot I then setup the index.php in the myCakeAppWebRoot folder to reference that setup. It took me a while to understand exactly how to set this file up, but if you need any help then I can tell you what I did. At lease this way no public user has access to my application files, nor to my CakePHPLibs folder. If you dumped them all in the same folder off your html directory, then public users will have access to all those files. Regards, Graham half_brick wrote: Sorry about this basic question. I just seem to be getting conflicting reports, and am having trouble getting it working on a domain on which I only have FTP upload. If I'm setting up a cake project in a directory on a host. ie: www.test.com/projectfolder/ should it be sufficient to just dump the app, cake, vendors etc into the projectfolder? I'm assuming URLs would then look like www.test.com/projectfolder/controller/action What configuration changes, if any, would I need to make? Let me know if you need clarification. Chur, Toby --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: installation in subdirectory
Hi Graham, Do you have multiple cake apps set up this way? Are each of your sites accessed by www.mydomain.com/mysubfolder1? If that's the way you set it up what did you have to do? Was it just a case of editing the first few lines in the index.php file in the webroot folder? Cheers, Toby --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: installation in subdirectory
Hi Toby, I only have the one app setup at the moment, but this will apply to additional apps as well. I altered the following lines in the index.php file in the webroot (myCakeAppWebRoot) folder... if (!defined('ROOT')) { //define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECTORY IS LOCATED DO NOT ADD A TRAILING DIRECTORY SEPARATOR'; //You should also use the DS define to seperate your directories define('ROOT', DS.'mounted-storage'.DS.'home34f'.DS.'sub234'.DS.'fa15349-CRWL'); } if (!defined('APP_DIR')) { //define('APP_DIR', 'DIRECTORY NAME OF APPLICATION'; define('APP_DIR', 'myCakeApp'); } /** * This only needs to be changed if the cake installed libs are located * outside of the distributed directory structure. */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { //define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR'; //You should also use the DS define to seperate your directories define('CAKE_CORE_INCLUDE_PATH', DS.'mounted-storage'.DS.'home34f'.DS.'sub234'.DS.'fa15349-CRWL'.DS.'CakePHPLibs'); } I left in my host root folders for you to reference, just changed them a bit... HTH, Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Where would you put common functions?
Hi, I'm relatively new to CakePHP and I was wondering if someone could give me some advice on where to put common snippets of code. For example, I have a simple function that determines the file extension of a given file. I want to be able to access this function from a model, component or view. Where would I put these types of utility functions so that it will be available throughout every part of the application? I'd appreciate any help. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Fatal error: Allowed memory size of 83886080 bytes exhausted at (null):0 (tried to allocate 32 bytes) in dbo_mysql.php
Hi All: I am facing memory exhausted problem in my application. The file use to pick up around 600 records from one table and runs a for loop.Under this for loop there is another loop runs for 120 times. In simple php applications these queries use to work fine. But in cake its giving a problem. I don't know, How to handle it in cake. Is there any method in cake to free mysql memory not in use? Can anyone help me in this regard? Thanks in advance, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
views controlling layouts
On 8/3/06, lorenzo wrote: Mark Quinn ha scritto: My current problem is how to get a view to set a variable that is available in the layout. From everything i've read. this should be easy, but i'm just not getting any loving. I baked a trivial example: my layout contains pmy favourite cheese is ?= $cheese ?/p my view contains ? $this-controller-set( 'cheese', 'cheddar' ); $cheese = 'brie'; ? put this in your controller: $this-set('cheese','padano'); I understand that variables are _usually_ set in the controller. As an experienced RoR developer, I am used to being able to have a VIEW set a variable that is used by the LAYOUT. This makes complete sense to seperate code logic and presentation. A trivial example is that the controller programmer doesn't care what the title of a page is - that is the call of the page designer/html person (yes, localisation etc, may change this - but this is just a simple example). A better example may be when the designer/html person wants the layout to include a different element for certain pages/views. Why have two layouts, solely in order to replace one element with a different one? Wouldn't it be nice if the view could dictate which element it needed? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: HABTM with 3 tables
i recommend you have a look at DHH's keynote at railsconf this year, where he describes a way of further embracing CRUD and viewing relationships as CRUDable things in their own right. e.g. think of the user-group relationship as a CRUDable Membership model. suddenly the world becomes a much simpler place. Obviously, it doesn't make sense to seperate out all relationships as models, but in many cases, applications evolve such that we start needing to store metadata about what was once a simple relationship (e.g. when did that user join the group? who added them? at what date does the membership expire?) Video (embedded) http://blog.scribestudio.com/articles/2006/07/09/david-heinemeier-hansson-railsconf-2006-keynote-address Slides (PDF) http://www.loudthinking.com/lt-files/worldofresources.pdf On 8/5/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hey henthoca, Thanks for your posts, I pretty much understand your explanations and I'll let you know how I get on. Ryno henthoca wrote: Whoops, I forgot to mention that each other model should have a hasMany relation with the JoinModel, and the JoinModel should belongTo each of the other three models. I think I might have implied that, but better to explicitly come out and say it. I think this method would ideally allow for an n-way join table, not limited to 2 like the HABTM relations are. henthoca wrote: I had ran into this situation a while back, trying to figure out how to do a three-way join table. I believe gwoo helped me figure out that it was best to create an extra model that belonged to the other three models, instead of trying to do crazy HABTM join querys. My three models were Resources (rooms), Users and Groups (permissions). Each user has a certain set of permissions per resource. Eg, User A is an Teacher for Room A and a Student for Room B. Then I made an extra model ( I named mine GroupsResourcesUser ) to store just the primary id's of each of the other three tables, and set all of those as the primary key in my new table. This method lets you pick one side and see which other sides it has, like pick a User and see for which Projects the User has each Role, or pick a Project to see which Users have each Role for that Project, or pick a Role to see which Users have that Role for each Project. For example, finding the Project-Role combinations for a particular (maybe logged in) user, I'd set $this-User-recursive = 3; and just use $this-User-findById($id); to get the data. It'll be in the form, $data['JoinModelName']['TargetModel1'] etc, so you should be able to capture the relationships that way. It seems to work well enough for me. LMK if I need to explain it better though. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: views controlling layouts
The line that has to be drawn here is not easy to see, I hope I can make my opinion clear without using too much words (long explanations are more confusing than helpful). A view should not be able to set any kind of data whatsoever - because it is a _view_. I would tackle your described problem in a way that the controller has to make sure that the called view gets access to all the required data. The controller knows/determines which view to use, as such it also has to ensure the availability of the required data. If you have two layouts, with just one element replaced, than why do you have to pass two different sets of data to the view? Controller serves all the data (or access to it), view uses the data as required. To conclude - of course the view should dictate what element it needs - it already does by using it. But for expanding that do not look from the view side and what the view can set - look at how the data source can grow to satisfy different views. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Where would you put common functions?
Let me make sure I understand what you're saying. In this particular case I should create a model called File that has a method called getExtension(). In my controller I can then use the method by declaring uses('File'). and calling: $ext = $File-getExtension($myFile); Is that what you were getting at? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: requestAction won't stay in div
?php $this-requestAction('foo/bar'); ? would echo the foo/bar action to the output automatically so you don't need to echo(print) it. And also because of that you are not able to treat it like a string variable. But if you use the function like this: ?php echo $this-requestAction('foo/bar', array('return')); ? Then you can do this: ?php echo 'foo'.$this-requestAction('foo/bar', array('return')).'bar'; ? I hope it's clear. half_brick yazdi: Just a heads up for any n00bs (I'm a recovering one myself) If you're using requestAction, it doesn't work in quite the same way as renderElement for example: echo 'div'.$this-renderElement('foo', $params).'/div'; will spit the rendered element nicely into the div while: echo 'div'.$requestAction('foo/bar').'/div'; will not. to make it work you must do: echo 'div'; echo $this-requestAction('foo/bar'); echo '/div'; I wasted half an hour on this, just thought I'd try to save others the time. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: creating and viewing an image database
Cheers, thats great, in fact I recycled some code from a tutorial on the cake wiki (http://wiki.cakephp.org/tutorials:beginners_only) to do what i wanted fairly sucessfully. I have another question regarding the safety of letting users upload content to my database, as it seems a fairly risky business if you get it wrong! Firstly i check if the uploaded file exists and is a photo with if ($file = $this-params['form']['userfile']) and if ((is_uploaded_file($file['tmp_name'])) and ($filedetails = getimagesize($file['tmp_name']))) Then I get the filestype to store in 'ext' by $filename = $file['name']; if (($pos = strrpos($filename, .)) === FALSE) { $this-Picture-invalidate('no_file'); } else { $this-data['Picture']['ext'] = substr($filename, $pos + 1); } I then validate 'ext' in Picture.php using regex '/^(?:jpg|jpeg|gif|png)$/i' so that upload into the databse will be prevented before $this-Picture-save($this-data) It is a bit of a belt and braces approach, but is it safe? would a non-picture file be able to still be uploaded to the temp directory, and will it be able to execute if it was mailicous? when should i read the file content into the database, and when would a malicous piece of code be executed if it was uploaded sucessfully? would it be when the image was viewed again? Sorry for all the questions! Cheers, JP --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: views controlling layouts
On 8/7/06, ByteDoc [EMAIL PROTECTED] wrote: The line that has to be drawn here is not easy to see, I hope I can make my opinion clear without using too much words (long explanations are more confusing than helpful). A view should not be able to set any kind of data whatsoever - because it is a _view_. To me, this is where your argument breaks down. A view is only part of the picture. A view *and a layout* *and perhaps some elements* is the _view_ To say a view cannot set data is shortsighted. Perhaps a better way to think of this is to think of passing data instead of setting data. A view passes data into its helpers which in turn generate html on behalf of the view. A view passes data into its elements for the same reason. Why should a view not be able to pass data to its layout, which in turn generates html on behalf of the view. - it strikes me as odd that people would want to seperate this case. I wholely agree that views should not be allowed to set any data other than in these circumstances. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
A problem with upload and refresh of image.
I have a database table where save the image's name. I have to implement the edit function, and I try to do with this code : $file = $_FILES['immagine']; $imgpath = WWW_ROOT.img/; $msg =; if (move_uploaded_file($file['tmp_name'],$imgpath.$file['name'])) { $msg = File uploaded.; } else { $msg = Error in uploading of file.; } $this-data['Lavoro']['immagine'] = $file['name']; $this-Lavoro-save($this-data['Lavoro']['immagine']); if ($this-Lavoro-save($this-data['Lavoro'])) { $this-flash($msg.'Refresh done.','/lavori'); } But in the debug code cakephp never change the immagine field. How I can do ? Thanks ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Where would you put common functions?
$ext = $File-getExtension($myFile); Is that what you were getting at? kinda, though I would have thought that this kind of functionality would be better suited to a Component. Then it's not tied to an applications structure, and can be reused easily. check out the page on the manual http://manual.cakephp.org/chapter/9 hth jon -- jon bennett t: +44 (0) 1225 341 039 w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: A problem with upload and refresh of image.
Ok, now go all. I have wrong the use of a field ... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: views controlling layouts
@ByteDoc: Mark is correct. The chief concern of MVC is separating view and controller logic, and secondarily, separating controller and model logic. This says nothing of preventing templates and layouts (view and view) from sharing data. In fact, I would argue that embedding view data in the controller violates DRY and tier separation almost as much as does putting business logic in the view. @Mark: We'll be adding a set() method in the View class to allow this. If you check out http://api.cakephp.org/class_view.html#9b395079675c6a66ff23ea9c6c4a668e you can see that there are a few properties of the View class which are available in templates, elements, and layouts (i.e. $pageTitle [when rendering templates, elements or layouts, View is available as $this). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
migrating to cake
i'm interested in migrating a site over to cake a few apps at the time, what would the best strategy to do this? my idea now is to make a /c/ subdirectory that handles the cakified pages, while my old apps all run as usual in the root web directory. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Comment in Simple User Authentication example is wrong
Thanks for submitting. Every time I went to submit, it told me I didn't have permission, and I couldn't find where to register. Went to look right now, and found the register link immediately. Thanks again. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Routes with variables
I've got something similar in the app I build. You'd need to set up all items off of /shop/ to go through a single action. Then, take that action, and have it route to internal functions. like: function processAction($param1, $param2=null) { if($param2){ $this-_products($param1, $param2); }else { $this-_intro($param1); }; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Two CakePHP Newbie Qs
Sorry, i am late on this one: the other day i have wondered: what is so bad about having slugs as primary keys? i might be running against some database practices that they should rather be numbers. But it is rather trivial to make slugs unique, as well. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: selected items in HABTM multiple select
Any thoughts ?? how about adding this function to your app_controller.php function getSelectedItems ($data) { $return = array(); foreach ($data as $row) { $return[$row['id']] = $row['name']; } return $return; } then you can use: $this-set('selected_categories', $this-getSelectedItems ($this-params['data']['ProductCategory'])); hth jon -- jon bennett t: +44 (0) 1225 341 039 w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Scaffolding on cake_1.1.6.3264 allowing add and delete but server dropped reply on others
Bump. I cross-checked this url database by installing CodeIgniter and trying out the scaffolding feature there. While not quite as mature as Cake seems to be, the CodeIgniter scaffolding code worked perfectly with the database for all operations. It also works properly with mod_rewrite. I don't know what this means in terms of figuring out where Cake is going wrong in accessing the MySQL tables in scaffolding but I thought it might interest Cake devs that a similar project (CodeIgniter) was able to work with the database I set up without any errors. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Using Subversion for both site and cake
Hey, I've set up subversion/TortoiseSVN on windows for the site I'm working on, and I've come to like using the latest svn version of Cake since it containes the latest fixes. Right now I've just been checking out Cake's SVN builds from time to time and copying that to my working copy of the site, but that doesn't allow me to make any changes to the cake core files when necessary. (I know you're not supposed to change cake core files generally and that extending appcontroller/appmodel is better, but I've needed to make a few changes sometimes to the helpers, which tickets are already submitted for) Would there be a way to set my subversion up such that I can use it to merge the latest Cake version with my local website repository? Such that the latest version I retrieved from Cake's SVN could be merged with my local site in case I made changes to my local copy of cake's core files? Or rather, what's the best way to keep it all up-to-date without losing my modifications? Thanks, Shutter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Using Subversion for both site and cake
On Aug 7, 2006, at 12:38 PM, Shutter wrote: Hey, I've set up subversion/TortoiseSVN on windows for the site I'm working on, and I've come to like using the latest svn version of Cake since it containes the latest fixes. Right now I've just been checking out Cake's SVN builds from time to time and copying that to my working copy of the site, but that doesn't allow me to make any changes to the cake core files when necessary. (I know you're not supposed to change cake core files generally and that extending appcontroller/appmodel is better, but I've needed to make a few changes sometimes to the helpers, which tickets are already submitted for) Make copies of those core helpers, modify them, and place them in / app/views/helpers. Would there be a way to set my subversion up such that I can use it to merge the latest Cake version with my local website repository? Such that the latest version I retrieved from Cake's SVN could be merged with my local site in case I made changes to my local copy of cake's core files? Or rather, what's the best way to keep it all up-to-date without losing my modifications? By following best practices advice and never modifying core files. :o) Keep the CakePHP libs as an SVN working copy (so you can update whenever you want), and keep your own apps (including your modified helpers) in other repositories as you see fit. You'll always run into problems by modifying core files. The libraries are structured in such a way that it's extensible - check to see how to make those extensions first. -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Using Subversion for both site and cake
Thanks John. I'm still learning my way around, and that's sound advice. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Using Subversion for both site and cake
Would there be a way to set my subversion up such that I can use it to merge the latest Cake version with my local website repository? Such that the latest version I retrieved from Cake's SVN could be merged with my local site in case I made changes to my local copy of cake's core files? Or rather, what's the best way to keep it all up-to-date without losing my modifications? if you are editing the files in your working copy and are doing an svn update then you'll keep your changes. If there have been changes to the files you have changed then 2 things can happen depending on if the changes conflict. 1. no conflict, svn merges the remote changes into your local copy 2. there are conflicts, svn tells you and you can resolve the conflicts by hand. its the beauty of using revision control. :) martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Can you find out the last controller/action?
Is there any way to find out the controller/action that a user was at prior to the current controller/action? Say you wanted to redirect a user back to the page they came from - how would you find out that page? I'd prefer not to have to keep any sort of history, or last page, in a session. Just wondering if the last controller/action comes for free in CakePHP. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: selected items in HABTM multiple select
You're definitely right. thanks a lot. I should think about it every time I see something recurrent in my code. Jon Bennett wrote: Any thoughts ?? how about adding this function to your app_controller.php function getSelectedItems ($data) { $return = array(); foreach ($data as $row) { $return[$row['id']] = $row['name']; } return $return; } then you can use: $this-set('selected_categories', $this-getSelectedItems ($this-params['data']['ProductCategory'])); hth jon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Can you find out the last controller/action?
Hi On Mon, 7 Aug 2006 12:58:17 -0700 John Zimmerman [gmail] [EMAIL PROTECTED] wrote: This won't work all the time and can't be completely trusted, but you can write a function to deal with different scenarios based on the contents of $_SERVER['HTTP_REFERER']. Cake already has such a function, $this-redirect($this-referer()), but--as you mention--it won't work if people turn it off. Regards, Chris -- Chris Lamb, Cambridgeshire, UK WWW: http://chris-lamb.co.uk Q. Why is top posting bad? GPG: 0x634F9A20 A. Because it breaks the logical sequence of discussion --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
problem in FormHelper, 1.1.7 release
Howdy all, I didn't see an open ticket for this issue, and in my newness I haven't figured out how to submit a proper bug report. If someone can point me in the right direction, I'll be happy to put in a ticket and I'll even fix the problem. (It's an easy one.) This applies to the 1.1.7.3363 release. (And maybe earlier versions) In the FormHelper class (file cake/libs/view/helpers/form.php) the TAG_FIELDSET constant has a typo resulting in a fieldset tag that is not closed. Existing: - snip /** * Tag template for a fieldset with a legend tag inside. */ define('TAG_FIELDSET', 'fieldsetlegend%s/legend%s/label'); - /snip The closing tag for the fieldset is missing, having instead a /label closing tag. Proposed change: /** * Tag template for a fieldset with a legend tag inside. */ define('TAG_FIELDSET', 'fieldsetlegend%s/legend%s/fieldset'); -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Where would you put common functions?
That'll do it. Thanks a lot. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: problem in FormHelper, 1.1.7 release
Uhm I don't see the point for a fieldset helper method. Sorry for the offtopic. On 8/7/06, iceaxe [EMAIL PROTECTED] wrote: Howdy all, I didn't see an open ticket for this issue, and in my newness I haven't figured out how to submit a proper bug report. If someone can point me in the right direction, I'll be happy to put in a ticket and I'll even fix the problem. (It's an easy one.) This applies to the 1.1.7.3363 release. (And maybe earlier versions) In the FormHelper class (file cake/libs/view/helpers/form.php) the TAG_FIELDSET constant has a typo resulting in a fieldset tag that is not closed. Existing: - snip /** * Tag template for a fieldset with a legend tag inside. */ define('TAG_FIELDSET', 'fieldsetlegend%s/legend%s/label'); - /snip The closing tag for the fieldset is missing, having instead a /label closing tag. Proposed change: /** * Tag template for a fieldset with a legend tag inside. */ define('TAG_FIELDSET', 'fieldsetlegend%s/legend%s/fieldset'); -- -- Armando Sosa www.nolimit-studio.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---