Re: How to modify a field in afterFind()

2008-12-17 Thread Matt Huggins
][$this-alias][$key2] );                         }                     }                 }             }         }     }     return $data; } On Dec 17, 12:55 am, Matt Huggins matt.hugg...@gmail.com wrote: I'm having the same issue, and I have yet to find a solution.  The Cake

Re: How to modify a field in afterFind()

2008-12-17 Thread Matt Huggins
) {                             $data[$key][$this-alias][$key2] = $this-doAfterFind( $data[$key][$this-alias][$key2] );                         }                     }                 }             }         }     }     return $data; } On Dec 17, 12:55 am, Matt Huggins matt.hugg...@gmail.com wrote: I'm

Re: How to modify a field in afterFind()

2008-12-16 Thread Matt Huggins
I'm having the same issue, and I have yet to find a solution. The Cake documentation is wrong and/or the implementation is incorrect. On Oct 23, 1:58 am, martin.westin...@gmail.com martin.westin...@gmail.com wrote: I compiled a list of the variations I have encountered in different

Re: Access a controller inside another controller?

2008-07-02 Thread Matt Huggins
Check out admin routing. Here are a few links to help get you started. Read about the Routing.admin configuration variable here: http://manual.cakephp.org/view/44/cakephp-core-configuration-var Read about the section on prefix routing here:

CakePHP memory usage: what is going on here???

2008-07-01 Thread Matt Huggins
I started getting Fatal error: Allowed memory size of... errors while developing my CakePHP app. In order to find out what's going on and where all the memory is going, I started placing some memory_get_usage() calls in my code. It seems like somewhere between my controller's construct method

Re: CakePHP memory usage: what is going on here???

2008-07-01 Thread Matt Huggins
is happening with my $uses and $components arrays though, just in case. On Jul 1, 6:45 pm, floob [EMAIL PROTECTED] wrote: By any chance, does your AppController reference a Helper that doesn't exist? (https://trac.cakephp.org/ticket/5010) That would explain it. On Tue, Jul 1, 2008 at 4:37 PM, Matt

Fatal Error: Memory exhausted

2008-06-26 Thread Matt Huggins
I'm getting a fatal error regarding my memory being exhausted when performing a very basic CakePHP operation. I'm not sure why I'm getting it or what I can do to fix it. Hopefully someone else can see what's wrong with my code since I seem to be missing something. Here's what I'm doing in my

Re: How to change the argument separator for named params?

2008-06-16 Thread Matt Huggins
Okay, I've been going insane over this, and it turns out there's a bug in the core. I'm uploading a patch to trac now. On Jun 16, 1:26 am, AD7six [EMAIL PROTECTED] wrote: On Jun 16, 1:57 am, Matt Huggins [EMAIL PROTECTED] wrote: For giggles, I also tried the following in my

Re: How to change the argument separator for named params?

2008-06-16 Thread Matt Huggins
And here's the ticket/fix: https://trac.cakephp.org/ticket/4923 I'm glad I'm not crazy, but now I lost like 3 days of work...now to make up for lost time! On Jun 16, 4:34 am, Matt Huggins [EMAIL PROTECTED] wrote: Okay, I've been going insane over this, and it turns out there's a bug

Bug in core? ContainableBehavior causing excessive SELECT's

2008-06-16 Thread Matt Huggins
I'm developing a site in which users create profiles (Profile model). These profiles have a significant number of 'belongsTo' bindings. When I create a standard find('first') call on the model, it performs a single SELECT statement to retrieve the model data and each associated belongsTo model

Re: How to change the argument separator for named params?

2008-06-15 Thread Matt Huggins
could use some more insight from someone who knows how to do this if possible. Nothing I'm trying is working. :'( On Jun 14, 10:06 pm, Matt Huggins [EMAIL PROTECTED] wrote: @Marcin - I searched all over for argSeperator (and argSeparator, I guess whoever coded the feature can't spell though :P

Re: How to change the argument separator for named params?

2008-06-15 Thread Matt Huggins
(); } Please help, my project is going to be delayed if I can't get past this. :( On Jun 15, 6:50 pm, Matt Huggins [EMAIL PROTECTED] wrote: I still can't manage to change the named parameter argument separator from a colon to a semicolon.  Here are the things I've tried doing, which look like

Re: How to change the argument separator for named params?

2008-06-14 Thread Matt Huggins
any documentation that properly showed how to set the separator for named params. :( On Jun 13, 12:50 pm, Nate [EMAIL PROTECTED] wrote: Try the API documentation for Router::connectNamed() On Jun 13, 1:34 pm, Matt Huggins [EMAIL PROTECTED] wrote: Really?  No one knows how to do

Re: How to change the argument separator for named params?

2008-06-13 Thread Matt Huggins
Really? No one knows how to do this? On Jun 12, 4:39 pm, Matt Huggins [EMAIL PROTECTED] wrote: Does anyone know how to change the argument separator for named parameters in CakePHP 1.2?  I keep finding posts where people say to set the value of $argSeperator (or $argSeparator

How to change the argument separator for named params?

2008-06-12 Thread Matt Huggins
Does anyone know how to change the argument separator for named parameters in CakePHP 1.2? I keep finding posts where people say to set the value of $argSeperator (or $argSeparator) in app_controller.php, but this doesn't change anything for me. I also stumbled across Router::connectNamed with

Re: Keep current password

2008-06-06 Thread Matt Huggins
You could specify which fields to save, including all the fields you need to update, and excluding the password field. However, you won't be able to validate the model if you do this since password will always be invalid. if ($this-User-save($this-data, false, array('username', 'email'))) {

Re: Keep current password

2008-06-06 Thread Matt Huggins
at this method I created within app_model.php that gets inherited by all models within the app: http://groups.google.com/group/cake-php/msg/dd21b207447b6206 On Jun 6, 3:49 pm, Matt Huggins [EMAIL PROTECTED] wrote: You could specify which fields to save, including all the fields you need to update

Re: Accessing plugin functions from app controller?

2008-06-03 Thread Matt Huggins
call $this-ModelName-method(); Pretty simple. :) On May 27, 12:26 pm, Matt Huggins [EMAIL PROTECTED] wrote: I'm building my first ever CakePHP plugin (1.2), and I can't find any help on how to access plugin functions from within a controller that resides within my application.  I've found

Accessing plugin functions from app controller?

2008-05-27 Thread Matt Huggins
I'm building my first ever CakePHP plugin (1.2), and I can't find any help on how to access plugin functions from within a controller that resides within my application. I've found that it can be done using requestAction, but I do not wish to access my plugin's controller actions in this way if

Including images within plugins?

2008-05-22 Thread Matt Huggins
Is it possible to provide images (and other files, such as CSS stylesheets) with a plugin, such that they are accessible via a URL in HTML (such as an IMG tag)? I'm working on a forum plugin, and I'd like it to be as easy to distribute as possible. Since I use some forum-specific images and

Re: Including images within plugins?

2008-05-22 Thread Matt Huggins
, May 22, 2008 at 12:41 PM, Matt Huggins [EMAIL PROTECTED] wrote: Is it possible to provide images (and other files, such as CSS stylesheets) with a plugin, such that they are accessible via a URL in HTML (such as an IMG tag)?  I'm working on a forum plugin, and I'd like it to be as easy

Re: Vendor issue: Duplicate class name

2008-05-20 Thread Matt Huggins
Ugh, I'm screwed if there's nothing I can do about this now. :/ On May 20, 1:51 pm, jonknee [EMAIL PROTECTED] wrote: On May 20, 3:36 am, Matt Huggins [EMAIL PROTECTED] wrote: I'm trying to import a vendor class, but the class I'm importing in turn references another 3rd party class named

Re: General purpose page / design issues

2008-05-20 Thread Matt Huggins
I've been using CakePHP for almost 2 years now, and I still don't know what the best way to do this is. The way I do it is I end up creating an added action in one of my controllers, and I change the routing for the homepage to point there. I'd really like to know of a better approach to this,

CakePHP Forum Software?

2008-05-20 Thread Matt Huggins
I've tried to get a few known forums (phpBB, SMF, etc.) to integrate into my custom CakePHP CMS, but I'm having so much difficulty. I was trying to see if anyone has made a forum coded in CakePHP that I can plug into my app, but of course a Google search for cakephp forum results in forums

Re: CakePHP Forum Software?

2008-05-20 Thread Matt Huggins
look in cakeforge.org On Tue, May 20, 2008 at 3:18 PM, Matt Huggins [EMAIL PROTECTED] wrote: I've tried to get a few known forums (phpBB, SMF, etc.) to integrate into my custom CakePHP CMS, but I'm having so much difficulty. I was trying to see if anyone has made a forum coded in CakePHP

Vendor issue: Duplicate class name

2008-05-20 Thread Matt Huggins
I'm trying to import a vendor class, but the class I'm importing in turn references another 3rd party class named cache. Since there is already a CakePHP class named Cache, I get an error message stating Fatal Error: Cannot redeclare class cache in [filename]. Does anyone have any clue how I can

Re: Validating only specific fields within a model?

2008-05-20 Thread Matt Huggins
. Zentgraf [EMAIL PROTECTED] wrote: I haven't come across any problems with the validations yet... Are you saying that it attempts to validate fields which aren't   present in your input data and fails on them? On 20 May 2008, at 12:34, Matt Huggins wrote: I originally thought the same thing

Re: Validating only specific fields within a model?

2008-05-20 Thread Matt Huggins
Thanks jonknee, I didn't even consider the 'on' key in my validation rules. I'll have to go back to this and see if that solution works better than the modification I made to app_model.php that I posted above. :) On May 19, 10:40 pm, jonknee [EMAIL PROTECTED] wrote: Does anyone have any

View this page CakePHP Unofficial Resources

2008-05-20 Thread Matt Huggins
Added a link to Facebook application development with CakePHP Click on http://groups.google.com/group/cake-php/web/cakephp-unofficial-resources - or copy paste it into your browser's address bar if that doesn't work. --~--~-~--~~~---~--~~ You received this

Re: Problem with HABTM not getting related data

2008-05-20 Thread Matt Huggins
You need to modelize your HABTM table. Hopefully this link will help you out. http://cricava.com/blogs/index.php?blog=6title=modelizing_habtm_join_tables_in_cakephp_more=1c=1tb=1pb=1 On May 20, 3:04 am, Reza Muhammad [EMAIL PROTECTED] wrote: Hi guys. I just tried to setup a HABTM

Validating only specific fields within a model?

2008-05-19 Thread Matt Huggins
In CakePHP 1.2, is there a way to validate only some specific fields within a model? I have a Member model is set up to validate several fields under normal conditions, such as username, password, email, etc. I'm trying to make a change password form for users of my application. Since I'll only

Re: Validating only specific fields within a model?

2008-05-19 Thread Matt Huggins
Alright, well I solved my own problem. It might not be the most efficient method, but given that I didn't find anything within CakePHP to handle this, I think it's pretty good. In case anyone else is looking for how to do it, here's what I did. Within app_model.php, simply create the following

Re: Validating only specific fields within a model?

2008-05-19 Thread Matt Huggins
I originally thought the same thing as you David. It seems instinctive that only the fields being saved should be validated. However, looking into the model.php file of the core shows that ALL fields are in fact being validated, even if only one or several fields are being updated.

Default form data

2008-01-22 Thread Matt Huggins
I'm currently using CakePHP 1.2 beta. I already know that you can do something like the following in order to provide a default INPUT value: $form-input('User.name', array('type'='text', 'value'='Beavis')); The problem is that I only want this default value to display when the page is first