Re: General organization question...

2009-09-26 Thread Matt Palermo
I realize that there will be several MVC files for an app. I'm just worried that if I have a CMS with a bunch of modules, that it will build up into TOO many to easily deal with. For example, I'm working on putting in a photo gallery module into the CMS now. That is basically a whole application

Documenting tools for final projects

2009-09-26 Thread Josh
Hello, What are peoples preferences for PHP Documentation tools? phpdoc? Are there IDEs that do it automatically? Is there any solution that works particularly well with cake? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: jQuery support in cake

2009-09-26 Thread James K
You can use whatever javascript framework you like. The built-in helpers don't do a whole lot to begin with, so you're not out much by rolling your own. I prefer Mootools, personally and I use that in all my Cake applications. - James On Sep 24, 4:37 am, Intunet wrote: > I'm just looking at Cak

RE: Just curious question

2009-09-26 Thread Dave Maharaj :: WidePixels.com
Yeah that looks like a nifty approach, Will give that a shot! Thanks I am just cleaning up my app I have been playing round with over the last few months so as I learn to make things better and evolve I see functions I have made where some grab 3 fields, some grab all, other 10 or so. So there

Re: Just curious question

2009-09-26 Thread teknoid
... haven't tested, but something like this should work: In the model: $this->myFields = array('field_one, 'field_two', 'and_some_other'); public function modifyRequiredFields($additionalFields) { array_push($this->myFields, $additionalFields); return $this->myFields; } In the controller: $t

Re: General organization question...

2009-09-26 Thread Hols Kay
Well, you can do the whole thing as plugins, I guess, but it's really easier to do it all as one app and only create plugins for the parts that you might want to port to another system later. You always get loads of files and folders when you're using MVC, it's just something that you've got to li

Just curious question

2009-09-26 Thread Dave Maharaj :: WidePixels.com
Just wondering if anyone has an opinion or fact about this. When pulling model data, keep it simple so Users controller getting straight info from Users database. Users table has 15 fields. You may only need 5 fields data and in another case you may need all 15 fields. Is it best to specify

Re: simple "contain" question

2009-09-26 Thread lorenx
sorry... i didn't explain it well at all! :P i meant this: if it is possible to set in the model file the "contain" array with all the details; 'contain' => array( 'DpageStruct' => array( 'DpageStructField' => array( 'DpageField' => array(

Re: Trouble with installation

2009-09-26 Thread brian
I know, it can be a bugger to get set up. Have you checked everything on this page? http://book.cakephp.org/view/333/A-Note-on-mod_rewrite On Sat, Sep 26, 2009 at 1:30 PM, Nigel wrote: > > What I meant by displaying properly is that the styles are not coming > up.  I enabled mod_rewrite with su

Error View in JSON?

2009-09-26 Thread Christian
Hello All, I am building an application which will communicate through REST with the interface, and so all of my output messages/data will be encoded into json to be feeded into the interface. I have created an AppError class to have my app specific errors (and ultimately all errors) encoded into

Re: formhelper: deep model values

2009-09-26 Thread lorenx
me again... i found the following link (i'm not using the $uses controller attribute) and i did some tests: https://trac.cakephp.org/ticket/4626 so. i built 3 models (TestGrandfather, TestFather and TestChild) and, starting from the grandfather, tried to edit the 3-level dependecies: in the edit

Re: change defalt layout

2009-09-26 Thread brian
It should be: app/views/layouts/default.ctp Are you sure the filename is correct? On Sat, Sep 26, 2009 at 7:18 AM, dhiraj ray wrote: > > i am new in cake php > > i change  app/view/layout/defalt.ctp > > but still found no changes . > > thanks in advance. > > > --~--~-~--~~

architecture question: payments

2009-09-26 Thread brian
I'm writing an app for an organization that charges a fee for membership and also has an annual meeting for which a further fee is required. Online payments will be handled though Moneris (similar to PayPal), and I'm considering writing a component for that. I need to deal with the following cases

General organization question...

2009-09-26 Thread Matt Palermo
I previously asked about using Cake for a CMS (content management system) I'm building. I'm looking for advice for this. I know that I can create multiple "apps" for use in Cake. My main question is should the whole CMS be one big app? Or should the CMS core and each module/component be their o

Re: simple "contain" question

2009-09-26 Thread brian
var $contain = array(...); In controller: 'contain' => $this->YourModel->contain On Sat, Sep 26, 2009 at 5:50 AM, lorenx wrote: > > sorry... i didn't explain it well at all! :P > i meant this: if it is possible to set in the model file the "contain" > array with all the details; > > 'contain'

Re: simple "contain" question

2009-09-26 Thread brian
On Sat, Sep 26, 2009 at 10:36 AM, lorenx wrote: > > ok, just to make sure we understand each other :) > > the following is not correct: > > class ModelA extends AppModel { >        var $belongsTo = array('ModelB'); > >        // i recently learn that this will raise "auto-recursive" > automatical

Re: simple "contain" question

2009-09-26 Thread lorenx
ok, i follow your advice and i stop here. thank a lot, really! On Sep 26, 4:45 pm, brian wrote: > On Sat, Sep 26, 2009 at 10:36 AM, lorenx wrote: > > > ok, just to make sure we understand each other :) > > > the following is not correct: > > > class ModelA extends AppModel { > >        var $b

Re: simple "contain" question

2009-09-26 Thread lorenx
ok, just to make sure we understand each other :) the following is not correct: class ModelA extends AppModel { var $belongsTo = array('ModelB'); // i recently learn that this will raise "auto-recursive" automatically, marvellous! var $actsAs = array('Containable');

Re: Trouble with installation

2009-09-26 Thread Nigel
What I meant by displaying properly is that the styles are not coming up. I enabled mod_rewrite with sudo a2enmod rewrite. The symbolic link for mod_rewrite is there in mods-enabled and the sites-enabled default also has all the statements above, but unfortunately, it still doesn't work. I had

Re: how to use migration in Cakephp

2009-09-26 Thread Vijay Kumbhar
Hello Daniel, Thanks for the help. I will check all the links you sent & if any problem i will revert you back. Thanks . On Sat, Sep 26, 2009 at 2:02 PM, danfreak wrote: > > If you have plugins in your application use the "-f" option to include > their tables in your schema

Re: simple "contain" question

2009-09-26 Thread brian
On Sat, Sep 26, 2009 at 10:03 AM, brian wrote: > On Sat, Sep 26, 2009 at 9:38 AM, lorenx wrote: >> >> sorry... >> >> and if i need something like this >> >> 'contain' => array( >>       'DpageStruct' => array( >>               'DpageStructField' => array( >>                       'DpageField' =>

Re: simple "contain" question

2009-09-26 Thread brian
No, the behavior wouldn't automatically pick it up. Also, it accepts only 3 options ('recursive', 'notices', 'autoFields'), so you couldn't pass the array like this: var $actsAs = array( 'Containable' => array( 'DpageStruct' => array( 'DpageStructF

Re: newbie table association

2009-09-26 Thread Rick
You should have a country table. You would associate this table in country_of_fabrication as has one country and the country_to_sell_to has one country. On Sep 25, 6:10 pm, spooknick wrote: > hi there > I want to make a product model that has a country_of_fabrication and a > country_to_sale_too

Auth component bug

2009-09-26 Thread Marcelo
I'm using Auth component and this is one of the settings in my AppController's beforeFilter() method: $this->Auth->loginAction = array( 'controller' => 'users', 'action' => 'login', Configure::read('Routing.admin') => false

change defalt layout

2009-09-26 Thread dhiraj ray
i am new in cake php i change app/view/layout/defalt.ctp but still found no changes . thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-p

login attempts limit and auth

2009-09-26 Thread rrd...@gmail.com
Hari, I use auth component to do the login. I want to limit login attempts like for 3 attempts. Where should I put my code? UserController login ()? beforeFilter? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake

Re: login attempts limit and auth

2009-09-26 Thread midas
I would put it into login() function. After each unsuccessful login attempt, I would increment a variable, like $login_attempts, save it into user session table and maybe log last unsuccessful login attempt, too. Just my quick thought. On 26. Sep., 14:45 h., "rrd...@gmail.com" wrote: > Hari, > >

Re: login attempts limit and auth

2009-09-26 Thread brian
On Sat, Sep 26, 2009 at 9:47 AM, midas wrote: > > I would put it into login() function. After each unsuccessful login > attempt, I would increment a variable, like $login_attempts, save it > into user session table and maybe log last unsuccessful login attempt, > too. Just my quick thought. This

Help with advanced installation (paths/server setup)

2009-09-26 Thread number9
I basically want to share the app and cake folder of an application, so that the only thing that needs to be uploaded for a new instance of the app is the webroot folder. To complicate matters slightly caching is utilised, so the tmp folder needs to be moved to the webroot (as well as the config f

formhelper: deep model values

2009-09-26 Thread lorenx
hi all, again. i have a $form->data populated with models deeply related and i'm not able to take full advantage of the formhelper magic. in the last part of the form i use foreach to cycle on the deep models and i refer to them with: 'ModelA.ModelB.'.$i.'.ModelC.0.field' but nothing happens. i

Re: formhelper: deep model values

2009-09-26 Thread lorenx
sorry but... the FormHelper magic is limited just to one-level recursion? On Sep 26, 12:34 pm, lorenx wrote: > hi all, again. > > i have a $form->data populated with models deeply related and i'm not > able to take full advantage of the formhelper magic. > > in the last part of the form i use f

Re: simple "contain" question

2009-09-26 Thread lorenx
sorry... and if i need something like this 'contain' => array( 'DpageStruct' => array( 'DpageStructField' => array( 'DpageField' => array( 'Language' ), 'HtmlInputType',

Re: Setting up Auth is breaking my Add and Edit functions on all controllers.

2009-09-26 Thread Dr. Loboto
If all your problems was because of forgotten parent::beforeFilter() call it is only your problem, not cake one. On Sep 26, 12:38 am, gparra wrote: > Does anyone have a good sense of whether this is could be considered a > bug and if so, how can i submit it as one to the CakePhp community? > > M

Integrate Cake with existing system?

2009-09-26 Thread Matt Palermo
I have a custom content management system setup already. This CMS has been built from scratch several years ago and it's getting to a point where code files are getting huge and hard to follow, since it's not well structured. I like the idea of implementing the MVC idea. I'm wondering if I can

RE: Strip whitespaces

2009-09-26 Thread Dave Maharaj :: WidePixels.com
Thanks! I am just getting to the point of testing saving data and trying to cleanup junk I attempt to save. Basically the app I went thru all the fields in forms and all of them all I want to allow is words and numbers so paranoid clean works but the forms are serialized so I have to use clean f

Re: how to use migration in Cakephp

2009-09-26 Thread danfreak
If you have plugins in your application use the "-f" option to include their tables in your schema i.e. --- cake schema generate -f --- Daniel On 26 Set, 10:29, danfreak wrote: > By the way, now cakePHP has an integrated schema > shell:http://book.cakep

how can i let user create subdoamin and have thier own website at my website???

2009-09-26 Thread leafchild
Hi I need to create web site like organizing event site, maybe similar to wedding planning site like thenest.com, weddingchannel.com etc etc... those kind of site sometime has the functionality to let user have decide subdomain and have website. like this xxx.mywebsite.com I'm wandering how can I

Re: how to use migration in Cakephp

2009-09-26 Thread danfreak
By the way, now cakePHP has an integrated schema shell: http://book.cakephp.org/view/734/Schema-management-and-migrations --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send e

Re: Database structure and json_encode()

2009-09-26 Thread danfreak
Well in case of solution B, if you serialize (json_encode) you have the order in which they got inserted, therefore you will know that the first is the "start" and the last the "end". In order to search in them ... it gets a bit complicated... For solution A) I suggest having a - TRIPS TABLE (HA

Re: simple "contain" question

2009-09-26 Thread brian
On Sat, Sep 26, 2009 at 9:38 AM, lorenx wrote: > > sorry... > > and if i need something like this > > 'contain' => array( >       'DpageStruct' => array( >               'DpageStructField' => array( >                       'DpageField' => array( >                               'Language' >      

Re: how to use migration in Cakephp

2009-09-26 Thread danfreak
By the way, now cakePHP has an integrated schema shell: http://book.cakephp.org/view/734/Schema-management-and-migrations --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send e

Re: how to use migration in Cakephp

2009-09-26 Thread danfreak
Well, I'm the author of the article you read: it's a bit outdated now. Anyway, I would also suggest you a fixturize plugin to sincronize stored data: http://github.com/felixge/debuggable-scraps/tree/master/cakephp/shells/fixturize --~--~-~--~~~---~--~~ You receiv

Re: Strip whitespaces

2009-09-26 Thread brian
preg_replace('/\s\s+/', ' ', $str) But, if you have a single whitespace character other than space (eg. tab), it'll be retained. On Sat, Sep 26, 2009 at 12:24 PM, Dave Maharaj :: WidePixels.com wrote: > I am saving a field in a form and just messing around by > entering  AB   C

Re: simple "contain" question

2009-09-26 Thread lorenx
...and so 'contain' => $this->YourModel->contain is not automatic... i guess that var $order setting has the same behaviour... thanks a lot. On Sep 26, 3:27 pm, brian wrote: > var $contain = array(...); > > In controller: > > 'contain' => $this->YourModel->contain > > > > On Sat, Sep 26, 200

Re: Help with advanced installation (paths/server setup)

2009-09-26 Thread brian
On Sat, Sep 26, 2009 at 11:18 AM, number9 wrote: > > I basically want to share the app and cake folder of an application, > so that the only thing that needs to be uploaded for a new instance of > the app is the webroot folder. To complicate matters slightly caching > is utilised, so the tmp fold

Strip whitespaces

2009-09-26 Thread Dave Maharaj :: WidePixels.com
I am saving a field in a form and just messing around by entering A B C After the save the data is displayed as A B C ...ok fine Go back to edit what i entered and it shows up as AB C in my controller: $clean = new Sanitize(); // Sanitize the data $