Re: CakePHP guide

2008-02-08 Thread Scott Sharkey
[EMAIL PROTECTED] wrote: I second this. it's a great way to provide the general method and usage while also providing multiple, more specific examples that often are more relevant in the real world. ONLY if they are moderated... too many people use the comments as a place to request free

Re: Frustration with FileHandler snippet and saving returned value, any advice?

2007-12-14 Thread Scott Sharkey
See comments below On 12月13日, 下午8時07分, designvoid [EMAIL PROTECTED] wrote: Hi there, I'm currently playing with the FileHandler snippet by Chris Partridge (http://cakeforge.org/snippet/detail.php?type=snippetid=52) and I've hit a problem! I can get the file to upload correctly and saved

File Upload, beforeValidate, and $this-data

2007-09-26 Thread Scott Sharkey
Hi All, I'm working on a form to upload a file, and the traditional way to do that involves the FileHandler model, and a beforeValidate() function in the model which validates the file type, size, etc and moves the file from tmp storage to where-ever. This is working just fine. Except that

Re: File Upload, beforeValidate, and $this-data

2007-09-26 Thread Scott Sharkey
it there if need be? -Scott Chris Hartjes wrote: On 9/26/07, Scott Sharkey [EMAIL PROTECTED] wrote: Hi All, I'm working on a form to upload a file, and the traditional way to do that involves the FileHandler model, and a beforeValidate() function in the model which validates the file type, size

Embed PDF generated from Cake Form in a Cake Page?

2007-09-17 Thread Scott Sharkey
Hi All, I'm using the examples from the Bakery article by Sam Devore to generate a PDF file (resume) from a cake form. This works just fine, if I use the PDF layout (header(Content-type:application/pdf), which displays the PDF just fine. BUT, I need to display that PDF in a cake page

Re: UserDir Installation

2007-07-09 Thread Scott Sharkey
urls, you also have to remove the * .htaccess files * release/.htaccess * release/app/.htaccess * release/app/webroot/.htaccess */ //define ('BASE_URL', env('SCRIPT_NAME')); On 7/7/07, * Scott Sharkey* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi All

Re: UserDir Installation

2007-07-08 Thread Scott Sharkey
(relative to home) for the content to serve. Thanks! -Scott francky06l wrote: Maybe the ~ character is screwing up the rewriting. Why not RewriteBase /ssharkey ? On Jul 8, 12:17 am, Scott Sharkey [EMAIL PROTECTED] wrote: Hi All, I'm trying a top-level installation into an apache UserDir

Re: UserDir Installation

2007-07-08 Thread Scott Sharkey
have done this, I guess. Thanks -Scott Tip2: 1.2 version promising and highly stable, just FYI On Jul 8, 5:08 pm, Scott Sharkey [EMAIL PROTECTED] wrote: The ~ is unix notation for home directory of, ie, in this case, home directory of ssharkey. It's standard notation for user_dir

UserDir Installation

2007-07-07 Thread Scott Sharkey
Hi All, I'm trying a top-level installation into an apache UserDir. I've read the documentation, which says to put a RewriteBase directive in the /~user/public_html/.htaccess file. This does not seem to be working for me. Here's what I know: 1) Mod_Rewrite is loaded and working fine on

Problems with FileHandler between 1.1.5 and 1.1.12?

2007-02-23 Thread Scott Sharkey
Hi All, I've been using the FileHandler class for uploading, and it seems to be working fine in versions of cake up to about 1.1.7. But when trying to use the same code under 1.1.12 (and probably 1.1.14) it's telling me Fatal error: Cannot instantiate non-existent class: filehandler in

OT: AJAX help

2006-10-04 Thread Scott Sharkey
Hi All, This is not cake-specific, though I will be building it into a cake-based site. I have an order form, that I want to AJAXIFY (?)... The first part, fetching the customer info from the tables when they type in their email address, is working fine. But I'm kinda stumped on exactly

Re: OT: AJAX help

2006-10-04 Thread Scott Sharkey
Troy Schmidt wrote: You will call a function that will then run an AJAX call, get the result, and manipulate it. Based on the result you will create childNodes no innerHTML or replacing. Actual DOM methods. It is probably programming level advanced, which is below expert. Personally I

Re: calculated fields -- best way?

2006-09-29 Thread Scott Sharkey
AD7six wrote: Hi Scott, I think the easiest way to deal with that is define in your model the method afterFind. use a loop to go through the results and define what you need. There is no need to worry about removing the data before saving - if there is no corresponding field the data

Help with Model Design

2006-08-18 Thread Scott Sharkey
Hi All, I'm working on a hockey league website, and need some ideas on the best way to handle this situation: I have models for Teams, Players, PlayerStats, GoalieStats. There will only be one entry in either PlayerStats or GoalieStats, depending on whether the player is a goalie or a

Re: Is del() recursive?

2006-07-17 Thread Scott Sharkey
nate wrote: Only if the 'dependent' association key is set to true, i.e.: class Post extends AppModel { var $hasMany = array( 'Comment' = array('dependent' = true) ); } Nate: I asked almost this very same question about a week ago. What about HABTM relationships, which

Help with Deletes

2006-07-10 Thread Scott Sharkey
Hi All, I'm rapidly nearing the completion of my first serious cake app (thanks to everyone for all the help!). I am having a problem with deletes. I have several models (artists, artworks, texts, etc). The relationsthips are: artist hasMany artworks, hasMany texts artwork

Re: Help with Query

2006-07-06 Thread Scott Sharkey
nate wrote: If Artwork belongsTo Artist, then reciprocally, Artist should hasMany (haveMany?) Artwork. Then, you can do the find on $this-Artist instead. Yes, Artist hasMany Artwork, so are you saying I can do: $this-Artist-findAllByCategory('xxx',null,'Artist.sortorder ASC') ??? And it

Re: Help with Query

2006-07-06 Thread Scott Sharkey
Scott Sharkey wrote: nate wrote: If Artwork belongsTo Artist, then reciprocally, Artist should hasMany (haveMany?) Artwork. Then, you can do the find on $this-Artist instead. Yes, Artist hasMany Artwork, so are you saying I can do: $this-Artist-findAllByCategory('xxx',null

Re: Help with Query

2006-07-06 Thread Scott Sharkey
nate wrote: Oh, sorry, I missed that. Try $this-Artist-Artwork-findAllByCategory('xxx', array('DISTINCT Artist.id', 'other', 'fields', 'here'), 'Artist.sortorder ASC')); Nate: that works, sorta grin. Thanks. If I pull in a Related field (like Artwork.filename) it duplicates all over

Help with Query

2006-07-05 Thread Scott Sharkey
Hi All, I have two tables: Artists and Artworks. Artworks BelongsTo Artists, and Artists hasMany Artworks. I need to generate a list of all of the artists who have artwork of a certain category. I tried $this-Artist-recursive = 1; $this-set('artists',

Re: AppController not registering Helpers

2006-05-25 Thread Scott Sharkey
modfather wrote: sorry - app_controller.php is in app/controllers/app_controller.php Shouldn't this be in the main app directory? Mine is, anyway. -Scott --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake

Re: using more than one model in a add_new view

2006-05-01 Thread Scott Sharkey
Carlos Mauricio Samour wrote: In the examples I read in the wiki using the add action I only see one model being use. What is the best way of using more the one model that uses hasMany reletionships into a view? In my add_new form I want to use 3 models. When I press the Save button it only