You should think about changing your settings relating to imagecache to include only actual imagecache presets.
You should not create settings for image sizes otherwise in your spin box. The spinner should display for selection only imagecache presets
This way users will not have to go back into permissions and make assignments. This is just another step to prevent support issues with users.
In other words, users must make image cache presets first before using your module. Then they must make user permissions for imagecache viewers.
This way there is consistency in images. I realize users can still resize the image, but at least they start at a preset image size.
Comments
Comment #1
eugenmayer commentedWell in BETA4 i included 2 imagecache preset which are presets, but programmatically added (big, original). Do you mean them
Comment #2
domineaux commentedYes, do not create presets in your imageupload program. Use the presets from Imagecache and users will have uniformity in choices. This will make it easy to follow through for all users.
I have Ubercart installed on a couple of sites and UC has narrative presets for Imagecache built into the UC. This is a royal pain, because users have to think narrative term "product_image" = 200x200 pixels imagecache size, etc.
An excellent way to manage imagecache presets is very simple 85x85 = 85px x 85 px, 100x100 = 100px x 100px, etc.
Comment #3
eugenmayer commentedFixed in BETA5
Comment #4
eugenmayer commentedComment #5
alan d. commentedThe code here seems to have a logical error.
Eg:
1) If no presets, then the module adds two
2) The user uses the presets provided by the module
3) The user / module creates a preset
4) The system flushes the presets, the original / big presets disappear
5) The presets used by the user already are now invalid
Workarounds
a) Make the special case that there may be one option that uses the original image.
OR
b) Create one (or more) presets that are always available
Cheers
Comment #6
eugenmayer commentedHello Alan,
well thats a good point. My idea was to make the installation easier and work OOTB. But seeing your case, i have only 2 options.
1. Creating presets which stay in the system (that could most likely anoy people)
2. Not creating those at all. So one part of the wyswyg_imageupload installation is creating those presets
I really tend to case 2 seeing your valid point. What do you think?
Comment #7
eugenmayer commentedWell actually there is not much to decide. The case of "not deleteable presets" is just to anoying. I guess there is a hack, using a submodule for this, which users can deactivate by need but still those presets get invalid afterwards. So i better remove them and update the configuration guide.
Fixed in rc2
Comment #8
alan d. commentedSame feeling here. It just requires a simple check on the preset count on the selection form, something like:
Cheers
Comment #9
eugenmayer commentedWell wont be only that, also the JS part needs to no that "no preset" is possible. In addition, the show ajax handler should be aware of this alternative also.
Comment #10
eugenmayer commentedComment #11
alan d. commentedHi Eugen
I had a similar imagecache catch-22 on another project, and I think that I have a reasonable workaround. It is a bit more complex than you probably need, but hopefully it may give you some alternative ideas. I'm not sure how far back the schema goes, but it is working fine on my local install with up to date image modules.
Cheers
Alan
Comment #12
eugenmayer commentedWell Alan, i will not find the time to look into this right now, especially as we have a feature-freeze for 6--1-0 anyway due the release canditate.
Anyway i reopen this as a feature request, any patches and especially tests are much appriated.
Thanks for the investigation Alan
Comment #13
eugenmayer commentedWell marking as wontfix. Creating a preset at minimum is a installation-step now. You can select presets you want to use since 1.3 in addition.