Re: Doubt in cake php

2009-09-29 Thread Travis L
I don't see it as making the controller "fat", really. It's where this call belongs. I usually think of fat controllers as doing some of the models' heavy lifting for them. But in this case, putting the code in your controller is clearly the right thing to do, by Cake's MVC principles. Don't w

Re: PHP IDEs

2009-09-10 Thread Travis L
I have to put my vote in for Coda. Simplicity. On Sep 10, 4:05 am, jason m wrote: > I have used textmate, coda, eclipse, netbeans, and aptana on Mac. For > me, > textmate has worked the best with the cakephp bundle. Although it is > not free, > I feel that I am the most productive on textmate b

Re: MVC-way to obtain common data formatting

2009-08-27 Thread Travis L
I think the potential solutions have all been highlighted, but I'd like to add my 2 cents. If you insist on translating binary bool values into human readable values, you should pair your afterFind() method with a beforeSave() method. beforeSave() will then translate back from the 'human' values

Re: How i can use after properties in textarea.

2009-08-19 Thread Travis L
Just testing this, and it seems to work. Try: input('name',array('type' => 'textarea', 'label'=>'name','after'=>'Must be 6 character')); ?> Just add the type => textarea and it worked OK for me. On Aug 18, 2:56 am, arif hossen wrote: > Dear all, > > How i can use after properties in textarea.

Re: Notification emails - how to send them automatically?

2009-08-06 Thread Travis L
Second the recc for using cron. I used a tutorial I found at http://blogchuck.com/?p=22 You will need to define the actions you want performed in a controller file, then add a crontab entry to call it. Your crontab entry will look something like: 0 0 0 0 0 /usr/bin/php /path/to/cron_dispatcher

Re: Full HABTM Example

2009-08-06 Thread Travis L
Taff, Remember if you want to use Tag::find using conditions from the Dolist table, you can use the Containable behavior. It's kind of like being able to set recursion levels with a high degree of precision, as well. On Aug 5, 10:25 am, Taff wrote: > You are the man Brian. Thanks for your help

Re: Web hosting company advice

2009-08-06 Thread Travis L
I was checking out Dreamhost's offers to see what kind of RAM / disk / CPU they offer in their VPS packages. They force you to register and use a credit card before you can see this. To me, that's a HUGE red flag. Out of curiousity, though, what kind of resources do you get for $20 a month? On

Re: Web hosting company advice

2009-08-05 Thread Travis L
With any shared hosting setup, you're going to notice a pretty significant amount of latency. Cake isn't fast, and shared hosting isn't great. Even moving up to a VPS doesn't improve it that much -- I've got 1.2s page load times, unfortunately. On Aug 5, 3:44 am, Vijay Kumbhar wrote: > Dreamho

Re: $_POST

2009-07-16 Thread Travis L
cbhan - I think that Cake will only store data into the Controller::data attribute if the corresponding HTML entity is named according to Cake convention (e.g. data[Field]). Without that data identifier, I don't think you'll be able to access the facebook POST'd values in the controller in that m

Re: Root Server: email-component fails sometimes, why?

2009-07-16 Thread Travis L
Anything on your system to suggest it's overloaded and the messages are getting silently dropped? If you increase Cake's debug level you should see some output which could help you out, it'll give you a full stack trace I believe. On Jul 15, 1:17 pm, DigitalDude wrote: > Hey, > > yes, all email

Re: Tried to install another application inside cakePHP configuration

2009-07-16 Thread Travis L
If you have httpd.conf access, I'd put the directive in there. Alias /pma /var/www/html/phpMyAdmin ... On Jul 15, 9:11 am, saavedrajj wrote: > it works with this code > > >    RewriteEngine on >    rewritecond %{REQUEST_URI} ^/(name_of_folder_application|fm)/ >    RewriteRule .* - [S=2] >  

Re: Tried to install another application inside cakePHP configuration

2009-07-15 Thread Travis L
I've got PMA installed on all my systems, even those with Cake. I use the httpd.conf to specify an alias in Apache to redirect the request to a different part of the filesystem. Works great everywhere I've done it. On Jul 14, 12:52 am, "Dr. Loboto" wrote: > Or install them into cake webroot, o

Re: Any dissadvantage to adding Containable behvior to all models

2009-07-15 Thread Travis L
There's the small overhead of linking that behavior to those models, but I suspect it's so minimal as to be not noticed. BTW, I just figured out the Containable behavior, and I love it! Should be more prominent in the Cake book. On Jul 14, 12:38 am, Miles J wrote: > No its basically what it was

Re: Simple relationship problem

2009-06-30 Thread Travis L
Carlos is right, but he was a little implicit in his answer. The short answer is that the Agency belongsTo Seller means that each agency belongs to only one seller. It wants a seller_id field in the agency table (which is how the relationship is linked). >From what I understand, you want the Se

Re: cron job question..

2009-06-18 Thread Travis L
I'm not a huge fan of the cake console stuff, for various reasons. However, you can go to http://blogchuck.com/?p=22 and check out the instructions for setting up a cron job in cake without using curl. One note, however, is that you must have command line access to set this up (and php has to be i

Re: Route instead of redirect?

2009-06-11 Thread Travis L
Have you tried using App::import('Controller', 'ControllerName') to get an instance of a new controller? You'd then have to initialize it with the bootstrap stuff that Cake automatically does for you (assuming you want the object attributes set correctly). From there I would guess that you could

Re: Confirmation Page for Form?

2009-06-09 Thread Travis L
Check out the Wizard component for sure. Otherwise, use a helper or element that will display the data differently -- if the POST'd values are present, it will display it as static, non-editable. If they aren't there, it will display them as input fields. On Jun 8, 9:13 am, brian wrote: > I su

Re: The best database setup for this?

2009-06-09 Thread Travis L
Agreed with Brian. It may seem like the table is getting huge (which it eventually will). But you're just keeping record of 2-3 INT data types (depending on how you do the key), so much of it will fit into memory anyhow. I wouldn't worry too much about join tables being a source of slowness (un

Re: Share a hasMany association ?

2009-06-09 Thread Travis L
iFeghali, Your decision will need to be based on your specific application. Take a look at the following tradeoffs and determine what's best for you. 1) Will a telephone EVER POSSIBLY have both a supplier AND a customer? If so, you def. want to go with option a; otherwise, you'll need to have t

Re: Poll: what do you hate about CakePHP?

2009-05-19 Thread Travis L
Upvote for this post. The ACL component was really neat, until I tried to actually use it. It was more difficult to try and use it than to just roll my own. Auth Component works great, I wish ACL worked great with Auth. Also ++ to commenters who asked for more real-world tutorials. The manual i