[eluser]unsub[/eluser]
[quote author="JamesL" date="1220066368"]After a short break I took g's advice and modified the image.php file so that the script now does exactly what I want it to. I hard coded the smaller thumbnail parameters into the script, although a more elegant solution would be to add to the parameters the script accepts to allow for this kind of image handling. I'm not sure how common this kind of request is, but I would be happy to post my code if anyone needs it.
g and JTabby, thanks again for your quick replys.
Best, JamesL[/quote]
Hi, JamesL,
glad it works for you.
One thing I wonder though, is why not send the thumbnail dimensions in the form setup? In the controller, in the $config array where you are defining your fields, it's like this:
Code:
'image'=>array(
'class'=>'Image',
'label'=>'Upload Picture',
'params'=>array(
'make_thumbnail'=>'true',
'width'=>'40', 'height'=>'40',
'url_path'=>'path/to/image_folder/',
'upload_path'=>'./path/to/image_folder/',
'display_name'=>'My Pictures'
)
)
...or if you're using a YAML definition file, then it looks like:
Code:
image:
class: Image
label: Upload Image
params:
make_thumbnail: true
height:40
width:40
url_path: path/to/image_folder/
upload_path: ./path/to/image_folder/
display_name:My Pictures
Using that type of setup, you could probably set it up to take parameters for your image resizing too.
Anyway, I'm glad I could finally help someone
I've recieved a lot of help here myself.
cheers
gabriel