Re: Cakephp workflow - where to start
I first start by defining my database structure using something like MySQL workbench (Visual db design software). Once my db design is complete I export it into the db engine. I then bake a scaffold application and use that to revise my db (No need to delete your baked app between revisions if you use scaffolding) Once the db is finished I begin with the actual application - most of the applications we do are not simple CRUD apps (Usual systems require some sort of workflow). Sometime during the development our designer will create the final layout for the system. On Apr 25, 12:32 am, jacmoe wrote: > Ideally, that's how I do it too. Not always, but most of the time. :) > Creating the database first, bake something, test it. > Delete the app, revise the database, bake it again.. > The database is the single most important part of your application. > > On Apr 24, 11:51 am, viis wrote: > > > > > Would like to know what is your workflow when you start a new cakephp > > project from zero, > > > do you start from > > - making CSS and views > > - later create databases - models, > > - and leave the controllers last , > > > or you work with views, controllers, models simultaneously piece by > > piece > > > or in what order do you work > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > athttp://groups.google.com/group/cake-php?hl=en > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Dompdf unicode problem
Is there any solution for dompdf unicode. // Mongolian character Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: How do I refer to the controller's model from appcontroller?
Why do you want to do a describe on the model on each query? Descibes are slow. If you want the models schema for whatever reason then just use the Model::schema() method http://api13.cakephp.org/class/model#method-Modelschema On Apr 25, 4:26 am, Sergei wrote: > ... > $this->{$this->modelClass}->describe(); > ... > > On Apr 25, 5:52 am, ZAky wrote: > > > function describe() > > { > > $describe = $this->[myModel]->describe(); > > $this->set('describe',$describe) > > > } > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: I need full ORM example
In other words you want somebody to write your application for you? Just google around for the various CakePHP CMS projects. On Apr 25, 2:30 am, thatsgreat2345 wrote: > Then do a little reading, don't be so lazy it is very easy and fully > explained in the book about relationship stuff. > > On Apr 24, 5:23 pm, zonery wrote: > > > > > blog example has one database table. there is no associations several > > tables... > > so, blog example is not enough for me. > > > thank you > > > On 25 Nisan, 02:52, thatsgreat2345 wrote: > > > >http://book.cakephp.org/view/219/Blog > > > > Blog example > > > > On Apr 24, 4:38 pm, zonery wrote: > > > > > Hi everybody, > > > > I need full ORM crud example. (Not with scafolding). Manually created > > > > conroller, model and view including "one to many", "many to many" and > > > > "one to one" associations. including index, edit, add, delete > > > > functionalities. > > > > > do you know any tutorial or good example.. > > > > > thank you for advices > > > > > Check out the new CakePHP Questions > > > > sitehttp://cakeqs.organdhelpotherswith their CakePHP related questions. > > > > > You received this message because you are subscribed to the Google > > > > Groups "CakePHP" group. > > > > To post to this group, send email to cake-php@googlegroups.com > > > > To unsubscribe from this group, send email to > > > > cake-php+unsubscr...@googlegroups.com For more options, visit this > > > > group athttp://groups.google.com/group/cake-php?hl=en > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers > > > with their CakePHP related questions. > > > > You received this message because you are subscribed to the Google Groups > > > "CakePHP" group. > > > To post to this group, send email to cake-php@googlegroups.com > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > > athttp://groups.google.com/group/cake-php?hl=en > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > athttp://groups.google.com/group/cake-php?hl=en > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Clear field after validation failure
Hey guys, Trying to work out how to clear a form field if that field fails validation. I've tried doing an unset($this->data['Model']['fieldname']) but the data still seems to persist in the form when it is returned to the user to correct validation errors. Help??? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: cake/VERSION.txt
This is an automated process. Unfortunately, the commits, pushes and tagging process is not automated, and being my first release, I screwed that one up. It has since been corrected, and now reflects the actual version 1.2.7. Cheers, Graham Weldon (aka. Predominant) On Apr 23, 10:58 pm, cricket wrote: > On Apr 23, 8:41 am, Leonel Quinteros > wrote: > > > Hey guys, in the 1.2.7 release, the file cake/VERSION.txt still says > > 1.2.6. > > This seems to happen often. One would think it would be automated. > Anyway, I have no idea if it's important. > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Release: CakePHP 1.3.0
Announcing CakePHP 1.3.0 Stable The CakePHP development team presents CakePHP 1.3.0. After a solid release candidate cycle, we're happy to announce the release of the next version of CakePHP stable. This next instalment of the CakePHP line brings a myriad of enhancements, fixes and structural changes to the framework designed to ease your development experience and extend the capabilities of CakePHP. The documentation accompanying CakePHP 1.3 far exceeds any previous release. The development, enhancement and change process has been meticulously documented to ensure a seamless upgrade path is available from CakePHP 1.2.x. While most applications will be able to make this transition with minimal changes, those that need migration will find the process far easier than previous releases. A summary of CakePHP 1.3 [1] is available as well as a comprehensive migration guide [2] and a full list of new features [3]. The API [4] has been updated to the 1.3.0 release version to correctly reflect the changes in documentation and code. The CakePHP Cookbook has its own 1.3.x branch for documentation [5], which has been updated in numerous sections to reflect the changes and updates within this new release. The cookbook is heavily driven by user submissions. If you see an issue within the cookbook, or feel that a section could be extended or added to, please feel free to submit a change. This release comprises 39 commits and 20 tickets closed. As we push forward, the development teams efforts will be focused on CakePHP 2.0 and beyond. Soon a roadmap, release plan, and associated documentation, API and change details will be made available. CakePHP 1.3 will be updated as necessary to correct issues if they arise, enhancements are being pushed over to 2.0 as we push forward with development. We'd like to thank everyone that submitted bug reports, pull requests, documentation updates, API changes, helped out in the IRC channel and everyone that continues to contribute, promote and use the CakePHP framework. Download the release [6] View the changelog [7] [1] http://cakephp.lighthouseapp.com/projects/42648/13-new-features [2] http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3 [3] http://book.cakephp.org/view/1572/New-features-in-CakePHP-1-3 [4] http://api13.cakephp.org [5] http://book.cakephp.org/view/875/x1-3-Collection [6] http://github.com/cakephp/cakephp1x/downloads [7] http://cakephp.lighthouseapp.com/projects/42648/changelog-1-3-0 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Absolute URLs
Does anyone know the best way to change all html links within cakephp to absolute URLs? (besides preg_replace) e.g. From: /cake/css/cake.generic.css To: http://myurl.com/cake/css/cake.generic.css Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: How do I refer to the controller's model from appcontroller?
... $this->{$this->modelClass}->describe(); ... On Apr 25, 5:52 am, ZAky wrote: > function describe() > { > $describe = $this->[myModel]->describe(); > $this->set('describe',$describe) > > } Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Good database design -- multiple databases in one app??
On Apr 24, 2:17 pm, ZAky wrote: > You can easily say it's actually two application there for two > databases its fine. It really is one application. In fact, it uses basically the same code for the two databases. The staging area simply has more features, and then when it gets published, the changes are reflected in the public database. > About the undo thing. > You can't use "auto increment" with that approach, I think. The undo number is stored in the session and is incremented and decrimented as the user clicks undo and redo. each undo is a file (mysqldump) and they are all wiped when a new session is started. > Also the IO is much more then it should be. > But, I guess you don't have more 10 users in the staging application > and there for no performance issues. > > It looks like a newbie work around but if its working just the way > you like and it doesn't drag you to do more work around, this is what > work around usually do, then way change it. Well, the truth is, there is only one user doing the scheduling, and that is why the undo file thing works. if there were two users changing things at once, there would be issues anyway (like two people editing the same file on a server). > > BUT, a make over is a great time to try to think about the whole > challenge from a new perspective. > Until you will think your database is not "fairly complex" don't rest. Yes! Redesigning it is where I'm at now. How do people code multiple undos? Seems like you would have to determine what parts of the database you will be changing (beforeSave) and have a model that stores some kind of info about how to restore the database to that state... > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: I need full ORM example
Then do a little reading, don't be so lazy it is very easy and fully explained in the book about relationship stuff. On Apr 24, 5:23 pm, zonery wrote: > blog example has one database table. there is no associations several > tables... > so, blog example is not enough for me. > > thank you > > On 25 Nisan, 02:52, thatsgreat2345 wrote: > > > > >http://book.cakephp.org/view/219/Blog > > > Blog example > > > On Apr 24, 4:38 pm, zonery wrote: > > > > Hi everybody, > > > I need full ORM crud example. (Not with scafolding). Manually created > > > conroller, model and view including "one to many", "many to many" and > > > "one to one" associations. including index, edit, add, delete > > > functionalities. > > > > do you know any tutorial or good example.. > > > > thank you for advices > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers > > > with their CakePHP related questions. > > > > You received this message because you are subscribed to the Google Groups > > > "CakePHP" group. > > > To post to this group, send email to cake-php@googlegroups.com > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > > athttp://groups.google.com/group/cake-php?hl=en > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > athttp://groups.google.com/group/cake-php?hl=en > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: I need full ORM example
blog example has one database table. there is no associations several tables... so, blog example is not enough for me. thank you On 25 Nisan, 02:52, thatsgreat2345 wrote: > http://book.cakephp.org/view/219/Blog > > Blog example > > On Apr 24, 4:38 pm, zonery wrote: > > > > > Hi everybody, > > I need full ORM crud example. (Not with scafolding). Manually created > > conroller, model and view including "one to many", "many to many" and > > "one to one" associations. including index, edit, add, delete > > functionalities. > > > do you know any tutorial or good example.. > > > thank you for advices > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > athttp://groups.google.com/group/cake-php?hl=en > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: I need full ORM example
http://book.cakephp.org/view/219/Blog Blog example On Apr 24, 4:38 pm, zonery wrote: > Hi everybody, > I need full ORM crud example. (Not with scafolding). Manually created > conroller, model and view including "one to many", "many to many" and > "one to one" associations. including index, edit, add, delete > functionalities. > > do you know any tutorial or good example.. > > thank you for advices > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
I need full ORM example
Hi everybody, I need full ORM crud example. (Not with scafolding). Manually created conroller, model and view including "one to many", "many to many" and "one to one" associations. including index, edit, add, delete functionalities. do you know any tutorial or good example.. thank you for advices Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Cakephp workflow - where to start
Ideally, that's how I do it too. Not always, but most of the time. :) Creating the database first, bake something, test it. Delete the app, revise the database, bake it again.. The database is the single most important part of your application. On Apr 24, 11:51 am, viis wrote: > Would like to know what is your workflow when you start a new cakephp > project from zero, > > do you start from > - making CSS and views > - later create databases - models, > - and leave the controllers last , > > or you work with views, controllers, models simultaneously piece by > piece > > or in what order do you work > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
default.ctp not working
I m totally new to cakephp.. I have installed cakephp1.2.7 on my local machine running wamp.. I have put defaults.ctp in my app\views\layouts\ folder but cake is not rendering it .. it is still using its old default renderer.. What can go wrong? Thank you... Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Good database design -- multiple databases in one app??
You can easily say it's actually two application there for two databases its fine. For example let say the staging have no access from the web only from the company intra net while the public application should be browsed from the employs home. In that case the design looks fine. About the undo thing. You can't use "auto increment" with that approach, I think. Also the IO is much more then it should be. But, I guess you don't have more 10 users in the staging application and there for no performance issues. It looks like a newbie work around but if its working just the way you like and it doesn't drag you to do more work around, this is what work around usually do, then way change it. BUT, a make over is a great time to try to think about the whole challenge from a new perspective. Until you will think your database is not "fairly complex" don't rest. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
How do I refer to the controller's model from appcontroller?
I have a function in appmodel function describe() { return $this->query("describe $this->useTable;") } I want to call this function from every controller In my appcontroller I want to have this function function describe() { $describe = $this->[myModel]->describe(); $this->set('describe',$describe) } In my other controllers describe function I 'll call the appcontroller describe. How do I refer to the controller's model from appcontroller? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Cakephp workflow - where to start
That's sorta how I do it. I generally start by writing a database schema in a text editor in the form of CREATE TABLE statements (I'm curious how others define and update their schemas); then I create the database and tables; then I bake the models, controllers, and views. In the past, I often stopped at this point to design the layout, but recently I've found it better to just go ahead and prototype the application using Cake's stock layout since my projects never have a fixed specification, and I may find that my original layout with room for only 6 main menu items needs to be changed to accommodate 12 menu items--that, and I tend to spend an inordinate amount of time tweaking a layout once I get started. The coding usually begins with the controllers. I tend to think of an application in terms of what controllers/sections there are and what actions the user needs to perform in each controller. I find that this style of coding forces me to think in a top-down fashion, so I will code the controller actions using model methods that have yet to be written, then write the model methods afterward. Though, to be honest, I was mainly a fat-controller/skinny-model developer in the past, and I still have that tendency. So half the time I still end up with huge bloated controller actions that I have to go back and refactor, moving large chunks of the code to the model. Throughout most of this process, I rely on the stock cake views, which I often re-bake when new controllers are added/removed. I try to avoid any front-end development unless I need to create a custom UI element or a non-standard CRUD operation. The site is mostly REST-based until the business logic is completed. Then finally I go on to customize the UI and create the AJAX interface. On Apr 24, 12:02 pm, Renato de Freitas Freire wrote: > In my case, I create the database first... > then I bake the project in cakephp.. > then, I created the layout (css, images, menus) > then I start to work with controllers and views.. > I work on controllers, and action by action, when its ready, I create the > view to test it. > once its all done, i work on auth and acl if the project needs it... > > thats the way I work on my projects... not only in cakephp, but any > language/framework... > > -- > Renato de Freitas Freire > ren...@morfer.org > > > > On Sat, Apr 24, 2010 at 6:51 AM, viis wrote: > > > Would like to know what is your workflow when you start a new cakephp > > project from zero, > > > do you start from > > - making CSS and views > > - later create databases - models, > > - and leave the controllers last , > > > or you work with views, controllers, models simultaneously piece by > > piece > > > or in what order do you work > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.comFor > > more options, visit this group at > >http://groups.google.com/group/cake-php?hl=en > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Using Non-Inline Css in Element
> Think about it some more. The layout contains a line to echo > $scripts_for_layout, which includes any CSS added in a view/element. > So, the PHP engine gets to that line and Cake spits out whatever non- > inline JS and CSS was added. > > A few lines later, the element is encountered. How do you suppose the > call to $html-css() is supposed to reserve the link to be included in > $scripts_for_layout, rather than included inline? Ahh - he's rendering the element in the layout! yep, you're quite right! doh (me). J -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Using Non-Inline Css in Element
On Apr 24, 3:02 pm, Jon Bennett wrote: > >> But, regardless how hard I try, the css gets printed at > >> its own location instead of at $scripts_for_layout which remains > >> empty. > > > Of course. It's because you call the element in the layout. By the > > time the PHP interpreter arrives at that line, it's already passed the > > line, up above, with echo $scripts_for_layout. This will work if you > > instead include the element inside a view template. > > > Besides, if the element is inside a layout, you may as well include > > the CSS in the layout itself. > > I don't think that's correct - you can use this technique to include > javascript or css files from a view file, so I don't see any reason > why you can't from within an element, the html helper isn't aware of > the file that's called it. Think about it some more. The layout contains a line to echo $scripts_for_layout, which includes any CSS added in a view/element. So, the PHP engine gets to that line and Cake spits out whatever non- inline JS and CSS was added. A few lines later, the element is encountered. How do you suppose the call to $html-css() is supposed to reserve the link to be included in $scripts_for_layout, rather than included inline? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Cakephp workflow - where to start
In my case, I create the database first... then I bake the project in cakephp.. then, I created the layout (css, images, menus) then I start to work with controllers and views.. I work on controllers, and action by action, when its ready, I create the view to test it. once its all done, i work on auth and acl if the project needs it... thats the way I work on my projects... not only in cakephp, but any language/framework... -- Renato de Freitas Freire ren...@morfer.org On Sat, Apr 24, 2010 at 6:51 AM, viis wrote: > > Would like to know what is your workflow when you start a new cakephp > project from zero, > > do you start from > - making CSS and views > - later create databases - models, > - and leave the controllers last , > > or you work with views, controllers, models simultaneously piece by > piece > > or in what order do you work > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Using Non-Inline Css in Element
>> But, regardless how hard I try, the css gets printed at >> its own location instead of at $scripts_for_layout which remains >> empty. > > Of course. It's because you call the element in the layout. By the > time the PHP interpreter arrives at that line, it's already passed the > line, up above, with echo $scripts_for_layout. This will work if you > instead include the element inside a view template. > > Besides, if the element is inside a layout, you may as well include > the CSS in the layout itself. I don't think that's correct - you can use this technique to include javascript or css files from a view file, so I don't see any reason why you can't from within an element, the html helper isn't aware of the file that's called it. In cake 1.1 there was a define in core.php which forced all (default cakephp) helpers to echo rather than return, but I think that's been removed in 1.2. I realise this hasn't helped much! j -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Good database design -- multiple databases in one app??
Thanks to everyone for all of their helo so far. I have been learning so much! I am in the process of rebuilding an application that I wrote years ago, but this time using cake! So far it is looking very promising and I think the whole thing will be so much cleaner! One thing a colleague of mine suggested was that my database design might have been a little strange. I'd like to briefly explain it and see what you all think. This application is used to schedule the people who work at our center. It is fairly complex (different types of workers, different areas of work, and various shifts with multiple people on them. So, I had two databases. scheduler_public and scheduler_staging. The staging database was for the person doing the scheduling to log in and mess around until it was right. Then they would publish the schedule (which would copy the staging database to the public database). Public users would never see the staging database. Is it bad practice to have two databases for one application? What I loved about it was that I had a multiple undo/redo function in the staging area. It would simply do a mysqldump every time something was changed (the database was not that large, maybe 14k) and call it undo.1.sql, undo.2.sql etc. and then the user could easily cycle back and forth between undos. It was very cool, but some might say that it is crazy to do a mysqldump on every action! For me it was way better than trying to write a reverse action for every action. The other thing that was cool was that the public database was a little different from the staging database in that every table had an extra field which was a foreign key to an additional table called schedule. This schedule table had the publish date and some other info. So, I was able to keep a record of all of the published schedules and they could be browsed through and searched and all sorts of neat statistics could be calculated about the history of scheduling. So, now that I'm trying to do everything the cake way, does this seem to be way off? Do you ever change what database you're using depending upon the user? What do you think of that kind of design? What do you think of my undo feature? Thanks so much for your thoughts on this! Jason Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Using Non-Inline Css in Element
On Apr 23, 8:09 pm, Ch3ck3r wrote: > Hi folks, > > I am new to cakePHP and after two days reading I got quite far with my > current application. > Nevertheless I am stuck now. > > I created an Element called 'viewer.ctp' in the elements directory. > This Element is used by my layout 'page.ctp' by using this command: > > element('viewer'); ?> > > This Element is properly shown in the layout but i have a problem with > adding CSS Non-Inline. > Inside of the viewer.ctp i got the following line > > css('viewer', null, null, false); ?> > > which should add the viewer.css file to my $scripts_for_layout which > is located at the top of my layout file. > > But, regardless how hard I try, the css gets printed at > its own location instead of at $scripts_for_layout which remains > empty. Of course. It's because you call the element in the layout. By the time the PHP interpreter arrives at that line, it's already passed the line, up above, with echo $scripts_for_layout. This will work if you instead include the element inside a view template. Besides, if the element is inside a layout, you may as well include the CSS in the layout itself. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Pagination not working with custom conditions on query
On Apr 24, 8:17 am, Michele Ferri wrote: > Hi. > > I have the following models: User, Membership, Group. > The Membership model is like a HABTM table, but contains some more > info, like the role of the user in the group. > > I want to have an index page that lists all the groups of the logged > user. > > Controller code > class GroupsController extends AppController > { > ... > function my_index() > { > $user_id = $this->Session->read('Auth.User.user_id'); > $this->paginate = array( > 'conditions' => array('Membership.user_id' => > $user_id), > 'limit' => 25 > ); > $this->set('groups', $this->paginate('Membership')); > } > > } > > View code > > > sort('name');?> > > > > > > > > > ... > > > > > > The records are displayed fine. The problem is, when I click on the > table header to sort the results, nothing happens. It is always sorted > ASC. Also, there is no ORDER BY clause in the select query, in the sql > debug table. There's no 'order' key in your $paginate array. Declare $paginate as a class variable (up at the top, outside of your methods). Maybe you did do that but, in your example, you've re-declared the variable, rather than make adjustments to it. var $paginate = array( 'Membership' => array( 'fields' => ... 'order' => ... 'limit' => ... ) ); function my_index() { // you can use AuthComponent to get User id $this->paginate['Membership']['conditions'] = array( 'Membership.user_id' => $this->Auth->user('id') ); $this->paginate['Membership']['limit'] = 25; $this->set('groups', $this->paginate('Membership')); } However, you should first ensure that your class-wide $paginate works correctly before adding the other conditions. Also, I wonder why you're using pagination here at all. If the results you're looking for are all the Groups for a particular User do you really need to paginate them? Are there going to be that many? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: how to pass data from view to controller?
You can name the input field with cake's convintions using a dummy DB field in order to have this input accessable in {$this->data}, once you have completed execution your process you can simply unset this field {unset( $this->data['Recipe']['dummy_field']}, or otherwise you can also use the {$this->params} array to access this field from the POSTed form inouts, i would prefer using the first approach to access any submitted form data. On Sat, Apr 24, 2010 at 11:28 AM, Bryan Lim wrote: > Hi all, > > In the controller, there is a twitter php lib function to update > twitter status. I need to pass the string from view to controller. > > should i use form? but what if i don want the data to be saved to > database? > > thanks! > bryan > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Pagination not working with custom conditions on query
Hi. I have the following models: User, Membership, Group. The Membership model is like a HABTM table, but contains some more info, like the role of the user in the group. I want to have an index page that lists all the groups of the logged user. Controller code class GroupsController extends AppController { ... function my_index() { $user_id = $this->Session->read('Auth.User.user_id'); $this->paginate = array( 'conditions' => array('Membership.user_id' => $user_id), 'limit' => 25 ); $this->set('groups', $this->paginate('Membership')); } } View code sort('name');?> ... The records are displayed fine. The problem is, when I click on the table header to sort the results, nothing happens. It is always sorted ASC. Also, there is no ORDER BY clause in the select query, in the sql debug table. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
how to pass data from view to controller?
Hi all, In the controller, there is a twitter php lib function to update twitter status. I need to pass the string from view to controller. should i use form? but what if i don want the data to be saved to database? thanks! bryan Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: pagination
Please provide more information on this issue! What does your link html code look like? What does your link code look like in the view? How are you processing the ajax request - the controllers code? Enjoy, John On Apr 24, 9:15 am, priya dhakane wrote: > hello all, > I am doing pagination with ajax and cakephp.but its not properly > working. when i click on next,previous link or number link it not get > redirected to respected page. but when i give page:number, the > respective page get displayed. how to pass url to display respeced > page when click on that link. > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: if a controller does not need a table, is it still a controller? or a component?
If the controller contains actions, that are reachable from the outside or through request actions, then it is a controller. The controller does not need a model. What kind of functionality did you have in mind in your case? That may help answering the question for you. Enjoy, John On Apr 24, 3:15 pm, Bryan Lim wrote: > question as above. > > thanks! > bryan > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
if a controller does not need a table, is it still a controller? or a component?
question as above. thanks! bryan Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Cakephp workflow - where to start
Would like to know what is your workflow when you start a new cakephp project from zero, do you start from - making CSS and views - later create databases - models, - and leave the controllers last , or you work with views, controllers, models simultaneously piece by piece or in what order do you work Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: How can u write the order and unorder list
Sorry, but I'm unsure what it is that your are asking? Have you installed Cake and tried running a find that you're trying to order? Have you read the Cookbook and if so what part of it are you having difficulty with? http://book.cakephp.org/ HTH Paul Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CakePHP 1.2.6 - problem with displaying form error messages
Why have you chose to do various parts of this process manually? By doing so you simply increase the chances of human error IMO. View: echo $form->create('User'); echo $form->input('User.fname'); echo $form->input('User.lname'); echo $form->end('Submit'); Will submit to /users/add Controller: function add() { if (!empty($this->data)) { if ($this->User->save($this->data)) { // save some message using Session::setFlash // redirect to whichever page you want } else { // Model::save has validated your data, found an issue // view will be shown again, with validationErrors shown // unless you have broken conventions somewhere } } // show above view } What about this standard way of doing things (the way Cake would bake your setup) does not suit your requirements? HTH Paul Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: jquery tooltip
My advice would be to search google for 'jquery + tooltip' and implement whichever script you decide to use by first retrieving the tooltip content on page load, then if you want to ajax the tooltip content give it a go and come back to use with the specific issues your are facing. HTH Paul Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: doing complex sql using query or find? outpit with tablecell()?
Which controller are you running this from, I assumed you were running it from the BookingPosition Controller? Why are you loading all the models with $this->loadModel() they should be accessible by your model associations? Do all your models confirm to cake's conventions, have you created all the associations? If you must link your Request and Meal models in that manner then you need to create 3 associations to Meal with different Aliases var $belongsTo = array( 'FirstMeal' => array( 'className' => 'Meal', 'foreignKey' => 'first_meal_id' ), 'LastMeal' => array( 'className' => 'Meal', 'foreignKey' => 'last_meal_id' ), 'MealType' => array( 'className' => 'Meal', 'foreignKey' => 'meal_type_id' ) ); You would then include fields from these models in the find by calling them by there aliases 'FirstMeal.field_name', 'LastMeal.field_name', 'MealType.field_name' HTH Paul. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Sometimes ACL is just too much
I set $this->Auth->authorize = 'controller'; in app_controller and then create an isAuthorized() function in each controller returning true/false depending on if the user is allowed to access the action and/or record being requested. Obviously in your controllers/views you also need logic checks to only show add/edit/delete links if the user has access to those actions for the record being viewed. HTH Paul Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en