I've created a patch which adds an admin form for Imagefield Crop which contains a checkbox which sets the value of a variable. This variable is used to determine if the theme_imagefield_crop_preview function is to return any output or not, and therefore if the preview image to appear or not.

Patch is attached.

Comments

opdavies’s picture

StatusFileSize
new2.36 KB

Here's a much cleaner version...

yhager’s picture

Status: Patch (to be ported) » Needs work

Why make it site-wide and not make it field specific?

opdavies’s picture

What do you suggest? Make it configurable for each specific image field?

yhager’s picture

It makes more sense to provide this flexibility IMO.
Also note that 7.x-2.x is an experimental branch at the moment, and it is being maintained by zhgenti. It's better to base your work at this time on the 7.x-1.x branch.

iamjon’s picture

Status: Needs work » Needs review
StatusFileSize
new5.15 KB

I created a patch against the 6.x branch of the module. If I am high-jacking the issue or should open a new issue please let me know.

To the best of knowledge the patch works but I think I'm missing something to make it work as it should.

Right now, I added another field to the settings form. I check if it has been clicked and surround the '// show dynamic crop previews' list function an if statement, avoiding the preview image output all together.
I wrapped the section in the js with a similar if statement.

But by avoiding the call to 'imagefield_crop_dynamic_preview' the drupal settings js looses all the predefined parameters of the orginal images.

To my surprise it worked although I need to refresh to actually see the changes.

Any ideas?
Thanks :)