Slightly further down the instructions on the page there is :
Case 2: Upload or delete images from a Stand-Alone Edit Form
You can also allow your site members to upload or delete images from a stand-alone edit form. In other words to an existing weblog entry.
The module provides you with the code to display the images that have been uploaded for the current weblog entry. Each image has a “delete” button beneath it that removes the image from the entry (it does not delete the image from the server). If the number of images in the weblog entry is less that the upload limit then an upload button is also displayed.
To display the image editor, place the following code in your template:
The entry_id parameter is required, and specifies the weblog entry to upload the images to.
The max_images parameter is optional, and specifies the maximum number of images that can be uploaded for this weblog entry. The default value is 3.
The field parameter is optional, and specifies the name of the custom weblog field that holds the names of the uploaded images. The default value is “images”.
The upload_destination parameter is optional, and specifies the id of the upload destination to which the image should be uploaded. The upload destinations can be found at Admin -> Weblog Administration -> File Upload Preferences. Default value is 1.
Don’t know if that is the same for the Stand-Alone Entry Form though.
Right - I had too much on my plate today to crack it open to to see if this parameter also applies to the ENTRY half of this, rather than the EDIT part.
EDIT: Perfect, Ben, that’s what I needed to know. I’ll add the upload destination stuff right now…
Also, I guess the field, when filled, would look like {filedir_1}pic.jpg. But in my testing so far, ONLY the pic name gets inserted, (i.e. “pic.jpg").
that’s correct, only the file name is put into the field. the reason for this is that the filedir, which can optionally be specified, is appended when retrieving the images with the {exp:image_editor:display} and {exp:image_editor:images} tags.
that’s correct, only the file name is put into the field. the reason for this is that the filedir, which can optionally be specified, is appended when retrieving the images with the {exp:image_editor:display} and {exp:image_editor:images} tags.
I want to retrieve my images with Lumis’ imageizer plugin, so I would prefer that when the links to these images go in the field they have the {filedir} there (i.e. the field would read {filedir_2}pic.jpg). How is that “optionally specified”? If I try using the exp:image_editor:images tag to pull the image out of the field, I’m getting a path to the image - but an incorrect one. It’s just a path to the main upload directory with the image name appended to the end - the directory (filedir) the image is in isn’t actually there. (i.e. /uploads/pets/pic.jpg is the directory where the image really is, but the tag is returning /uploads/pic.jpg)
Can you not specify the extra part of the path in Lumis’ plugin so that you end up with the full path? You would only be doing this on the template side of things and so once done you could forget about it?
I personally work this way with only the name of the file going into a field as I prefer to not have to use plugins to then help me pull out just the name anyway. I find it is a lot quicker this way and gives you a lot more control over you final output.
Maybe see if you can add that part of the path in to the plugin. I’m sure if you can specify the file name as your field in the plugin then you must also be able to specify some information before it also?
Just purchased the module and am trying it out. However, I’m hitting an error in my SAEF:
MySQL ERROR:
Error Number: 1064
Description: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND f.group_id=w.field_group AND f.field_type='cbox'' at line 1
Query: SELECT f.field_id, f.field_name, f.field_pre_populate, f.field_pre_blog_id, f.field_pre_field_id FROM exp_weblog_fields AS f, exp_weblogs AS w WHERE w.weblog_id= AND f.group_id=w.field_group AND f.field_type='cbox'
It looks like a weblog_id var is not getting set somewhere along the line..?
UPDATE: That error was reflected everywhere I subsequently called up an entry from that particular weblog, which I guess stands to reason. Once I deleted the offending entry, all was good again. Hopefully this gets fixed very quickly.
Image Uploader Extension: Error setting server upload path
I’ve tried and tried to remedy the problem, but it doesn’t seem clear what the issue is. I can upload files to the server path fine using the Publish form in the Control Panel. I can’t place what the issue might be in the SAEF.
If you’d like to look at the form, it is the last field at: http://theaterchurch.com/groups/register/
Image Uploader Extension: Error setting server upload path
hi david, the issue is that the upload destination is not being set correctly. in the registration form you are setting the upload destenation id to 3. please check that that is a valid upload destination id at Admin -> Weblog Administration -> File Upload Preferences.
And, is there any way to make the upload optional?
the upload already is optional. just make sure that the upload field is not a required field at Admin -> Weblog Administration -> Custom Weblog Fields.
I think in your example from your site for displaying the image(s), you forgot to include the field_name parameter.
thanks ryan, i put that in
mdesign - 06 December 2007 09:35 PM
I want to retrieve my images with Lumis’ imageizer plugin, so I would prefer that when the links to these images go in the field they have the {filedir} there (i.e. the field would read {filedir_2}pic.jpg). How is that “optionally specified”?
i’m afraid it can’t be “optionally specified” at the moment. did you try mark’s suggestion?
I’ve checked and double checked the upload destination in the settings of the 3rd upload preference. I cannot spot a problem. Are you certain there is a problem with that setting? Keep in mind, I can upload using the CP. It seems like EE would rely on the same path setting. So if I can upload via the CP, why not the SAEF with this module?
By the way, I am also using your LogMeIn module for this form. Could that cause the conflict, even though everything else seems to post fine using this system?
basically, the reason this error is happening is because the path specified in your upload destination is not a directory. if you go to Admin -> Weblog Administration -> File Upload Preferences, and select the upload destination, what are the values of “Server Path to Upload Directory” and “URL of Upload Directory”?
I have it set to ‘Images Only’ with no other value in the form and permission for the user group I’m logged into to post images to this location.
I still don’t understand why EE will allow me to upload images here using the Control Panel. Should I not assume that EE and the SAIE Module use the same conventions for uploading?
they use much the same conventions for uploading. i haven’t been able to replicate the problem you are having, so i suggest you do a number of tests:
- change the upload destination and try it
- log in as a super admin and try it
- leave out the upload destination hidden input field and try it (the first available upload destination is chosen by default)
i don’t see why it would not work with LogMeIn if “small group leaders” are specifically allowed to upload to that destination.