Will there be support for the Imagefield Crop module?
Thanks
Steve

Comments

basanta86’s picture

I'm interested in this, too!

gooddesignusa’s picture

I know this is somewhat off topic but I use http://drupal.org/project/imagecrop
Since that opens a new window and works a little different the Insert module Does work with it.
I've been using it now for at least a month and haven't had any major problems.

endiku’s picture

Status: Active » Fixed
StatusFileSize
new598 bytes

This is a quick do-it-yourself to make this work. Only takes a minute.

First simply duplicate the imagefield.inc file within sites/all/modules/insert/includes and name it imagefield_crop.inc, within that file replace mentions of imagefield with imagefield_crop, only two refernces (I've provided the file below, just rename it to .inc)

Next open sites/all/modules/insert/insert.module and at line # 36 after

  // ImageField support
  if (module_exists('imagefield')) {
    module_load_include('inc', 'insert', 'includes/imagefield');
  }

add a new block for the imagefield_crop module

  // imagefield_crop support
  if (module_exists('imagefield_crop')) {
    module_load_include('inc', 'insert', 'includes/imagefield_crop');
  }

That's all it takes to get imagefield_crop working. There is only one slight bug I've found and that is that you will need to save your node first after uploading and cropping an image before you can insert it inline into the body. Probably because the cropped image hasn't actually been created yet.

endiku’s picture

Status: Fixed » Patch (to be ported)

should have set this to patch

deciphered’s picture

Status: Patch (to be ported) » Needs review

As a side note, you might want to make a duplicate request with the ImageField Crop module as the code would work in either module (with minor adjustments to the include call).

Plus the status should be 'needs review', not 'patch (to be ported)'.

Cheers,
Deciphered.

dagmar’s picture

Version: 6.x-1.0-beta2 » 6.x-1.x-dev
StatusFileSize
new1.19 KB

Here is a simpler patch. This patch automatically creates the imagefield_crop.inc inside the includes dir.

I have tested this and its working pretty well. However, as @endiku explained in #3, the cropping is not performed until the node is edited again. But this is how imagecache works...

bryancasler’s picture

subscribe

quicksketch’s picture

Title: Support for Imagefield Crop? » Support for Insert?
Project: Insert » Imagefield Crop

Seems like this would be better provided by ImageField Crop. Insert was designed so that it could be extended by other modules, this is a perfect example of where the providing module should declare its own support.

yhager’s picture

Status: Needs review » Active
Trunkhorn’s picture

sub

gg4’s picture

+1

pearcec’s picture

So I tried the patch and it just inserts the original image into the WYSIWYG. Am I missing something? Seems to me we need to somehow communicate the crop to the server before we perform the insert. Any thoughts?

Renee S’s picture

@pearsec Yeah, that's what happened to me, as well. I'm going to take a look this weekend, because we'd like this functionality too... but no promises that I can fix it. But maybe :)

It also kicks out "File Sources" because it defines its own widget type; all of these add-ons are for the "Image" widget-type and require a different include for Image-with-crop as they do for Image. Maybe a re-think of how the module operates? Should it perhaps be included with the Image widget like other add-ons are? That's a big change, I realize, but...

toomanypets’s picture

Subscribe.

merilainen’s picture

Any progress on this?

dgastudio’s picture

sub

wooody’s picture

What about Drupal 7 ...?