at first i want to thank you all for this wonderful module! before i used uberimage, the image-management in drupal was always some kind of a pain in the a**, but now the pain is gone ; )

so far so good, but somehow i'm stuck at the moment. let me explain my problem:

i got an uberimage cck field with "unlimited values" set on my content-type, so on the node/add screen i have
the possibility to upload multiple images.
i created two imagecache-thumbnail presets (one for landscape-mode and one for portrait-mode thumbnails). when i now e.g. upload 2 images - one in landscape mode, one in portrait mode - and want to select
the corresponding imagecache-thumbnail preset in the "image formats" fieldset via the "use this format" radiobutton, then it always selects (automatically) the same preset for all images.

my first thought on this was, that the preset selection happens on a "per field basis" and due to the fact that this is an "unlimited values" field (with multiple images in it) i can only select ONE preset for all the images.

am i right with this assumption? if i'm right, how could i solve this problem?

any help is greatly appreciated

so long,
michael

Comments

ndeschildre’s picture

Hey,

Sorry for the late answer, quite a lot of work lately ;-)

You're right, if you select one formatter, it will be the same for all. We did that for the diaporama usecase, where journalists could upload several pictures, select a format, and logically all the pictures should have the same format, otherwise it would be a weird diapo!

The good thing for you is, this is a javascript procedure that do that. If you open aef_image.js and remove/comment this code:

  // When selecting a format in a given delta in a field, select the same format for each others delta
  $('.aef_image_wrapper:not(aef_image_wrapper-processed)').addClass('aef_image_wrapper-processed').each(function() {
    var field_name = $(this).attr('field_name');
    var id = $(this).attr('id');

    $(this).find('input.aef_image_preset_selection').click(function() {
      var selected_preset = $(this).attr('value');

      $('.aef_image_wrapper[field_name=' + field_name + '] input.aef_image_preset_selection[value=' + selected_preset + ']').attr("checked", "checked");
    });

  });

It should remove this same-preset selection feature.

Ideally later, this should be configurable as a checkbox.
Hope it helps,

Cheers,
Nicolas

stefan81’s picture

Status: Active » Fixed

works & saved my day :)

Status: Fixed » Closed (fixed)
Issue tags: -imagecache, -upload, -multiple values, -thumbnail, -presets, -uberimage

Automatically closed -- issue fixed for 2 weeks with no activity.