I want user to enter fixed size images

Talk about Image/File fields (uploading, problems etc.)

Moderator: alexandrleonenko

mawais31
Newbie
Newbie
Posts: 5
Joined: Jul 1st, '09, 04:38

I want user to enter fixed size images

Postby mawais31 » Aug 11th, '09, 05:33

I am using the grid for advertisement purposes, so that the user enter the fixed size images i.e. 250/400 pix images.
How can I restrict the user for image sizes.

administrator
Site Admin
Site Admin
Posts: 6011
Joined: Jan 7th, '09, 23:18
Contact:

Re: I want user to enter fixed size images

Postby administrator » Aug 11th, '09, 10:07

Look here:

Code: Select all

"FieldName_7"  =>array("header"=>"Name_G", "type"=>"image",      "req_type"=>"st", "width"=>"220px", "title"=>"", "readonly"=>"false", "maxlength"=>"-1", "default"=>"", "unique"=>"false", "unique_condition"=>"", "visible"=>"true", "on_js_event"=>"", "target_path"=>"uploads/", "max_file_size"=>"100000|100K|10M|1G", "image_width"=>"120px", "image_height"=>"90px", "resize_image"=>"false", "resize_width"=>"", "resize_height"=>"", "magnify"=>"false", "magnify_type"=>""magnify_type"=>"popup|magnifier|lightbox"", "magnify_power"=>"2", "file_name"=>"", "host"=>"local|remote"),


You need to define
"resize_image"=>"true",
and
"resize_width"=>"250px", "resize_height"=>"400px"


Return to “Field type: "image/file"”