The behavior uses nates phpThumb component, which you need to put into your controllers/components directory, that will then use GD to make your thumbnail.
I've been working on some inprovments, and the behaviour we very suited to my own needs. I've been working on some improvments but I've not finished them yet so I should release it later today. These include: * being able to pass in thumbnail sizes as an options - your able to create more than one thumbnail size at a time. * checking to see if the file exists, if it does generate a different file name * fixed an issue with image scaling on thumbnails, now correctly generates based on the image ratio. * a step bt step guide in the comments at the top. I want to make some further improvments to make it more universal. If anyone has any further suggestions, please let me know. On 6/14/07, Geoff Ford <[EMAIL PROTECTED]> wrote: > > The notices are easy to fix - just add a var infront of the first > occurence of each variable. > > The Warnings all seem to be from the createthumb method. And they seem > to be caused because the source filepath ($name param in createthumb) > is incorrect Are you calling it correctly? Or is it just the call to > createthumb in the beforeSave(). > > If you dont want thumbnails you can remove the line that starts $this- > >createthumb($saveAs, $options['dir'] - probably around line 151. > > Otherwise you are going to have find out what source path the > createthumb is trying to use and make sure that it is correct. > > On Jun 14, 12:56 pm, "Allen Romero" <[EMAIL PROTECTED]> wrote: > > thx for the pointers. I got it to work ... well kind of. it spits up > > all sorts of errors and doesn't properly save the .jpg in the > > directory (though does right the file location to the db) and it does > > create a file but it's a garbage image. any ideas? > > > > thx. > > > > allen > > > > Notice (8): Undefined variable: filtered_filename > > [CORE/app/models/behaviors/upload.php, line 97] > > > > Notice (8): Undefined index: random_filename > > [CORE/app/models/behaviors/upload.php, line 127] > > > > Notice (8): Undefined variable: thumbsize > > [CORE/app/models/behaviors/upload.php, line 151] > > > > Warning (2): imagecreatetruecolor() [function.imagecreatetruecolor]: > > Invalid image dimensions [CORE/app/models/behaviors/upload.php, line > > 200] > > > > Warning (2): imagecopyresampled(): supplied argument is not a valid > > Image resource [CORE/app/models/behaviors/upload.php, line 201] > > > > Warning (2): imagejpeg(): supplied argument is not a valid Image > > resource [CORE/app/models/behaviors/upload.php, line 207] > > > > Warning (2): imagedestroy(): supplied argument is not a valid Image > > resource [CORE/app/models/behaviors/upload.php, line 210] > > > > On 6/13/07, Geoff Ford <[EMAIL PROTECTED]> wrote: > > > > > > > > > Yeah forgot to mention that - I just assumed that you were using 1.2 > > > because you were asking about behaviours. I got caught out on that > > > when I was trying to use the Tree Behaviour on a 1.1 project :) > > > > > On Jun 14, 5:22 am, Joshua McFarren <[EMAIL PROTECTED]> wrote: > > > > You're using cake 1.2 right? FYI there are no behaviors in 1.1 > > > > -- > > blog:http://romeroax.blogspot.com > > non-profit:http://www.onematch.org > > events:http://www.galaxy13.com > > > > > -- Tane Piper http://webrocket.wordpress.com This email is: [ ] blogable [ x ] ask first [ ] private --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
