Is it possible to display an embedded image field using colorbox?
I created a cck type containing an embedded image field. And then I went to the "display fields" tab to select the display for my embedded image field. Unfortunately, 'colorbox' was listed among the display options.

Any suggestions, for how I can use colorbox with a multi-valued embedded image field?
Thanks for your help.

P.S. I had no problem getting colorbox to work with an embedded video field.

Comments

aaron’s picture

Category: support » feature

sadly, no, it does not currently. patches are welcome, of course... basically would need to add the theme functions (probably by copying largely verbatim from emvideo). the menu items should be in place. look for anything saying 'modal' or 'colorbox' in the theme.inc file.

aaron’s picture

Title: Does "Embedded Image Field" support colorbox? » Support colorbox/modal display in emimage & emaudio
aaron’s picture

Version: 6.x-2.1 » 6.x-2.x-dev
kobnim’s picture

Hi Aaron,
I have an emimage patch that adds support for colorbox, but there is one thing I have not been able to figure out: how to display emimages in a colorbox overlay when the node is previewed. Currently, when the user clicks a previewed image, they are redirected to the remote image. Any suggestions?
Thanks,
Mindy

kobnim’s picture

P.S. I see that emvideo.theme.inc has these two functions, which I am guessing are used to theme the previewed video. But I don't see how these functions are getting called:

function theme_emvideo_video_replace($field, $item, $formatter, $node, $options = array()) {
  $options['modal'] = 'emvideo';
  $options['width'] = isset($options['width']) ? $options['width'] : $field['widget']['video_width'];
  $options['height'] = isset($options['height']) ? $options['height'] : $field['widget']['video_height'];
  $options['wrapper-class'] = isset($options['wrapper-class']) ? $options['wrapper-class'] . ' emvideo-thumbnail-replace-full' : 'emvideo-thumbnail-replace-full';
  return theme('emvideo_modal_generic', $field, $item, $formatter, $node, $options);
}
function theme_emvideo_video_replace_preview($field, $item, $formatter, $node, $options = array()) {
  $options['modal'] = 'emvideo';
  $options['width'] = isset($options['width']) ? $options['width'] : $field['widget']['preview_width'];
  $options['height'] = isset($options['height']) ? $options['height'] : $field['widget']['preview_height'];
  $options['wrapper-class'] = isset($options['wrapper-class']) ? $options['wrapper-class'] . ' emvideo-thumbnail-replace-preview' : 'emvideo-thumbnail-replace-preview';
  return theme('emvideo_modal_generic', $field, $item, $formatter, $node, $options);
}
stephen Piscura’s picture

Any further developments on adding Colorbox support to Embedded Image Field?

kobnim’s picture

I implemented support for displaying embedded image fields within colorbox. It's working, but I still need to clean up the code and create a patch. I will do my best to get this done within the next month.

- Mindy

stephen Piscura’s picture

Mindy,

Wow this would be really timely! Many thanks in advance for your work on this...

stephen Piscura’s picture

Mindy,

Any updates on the emimage/colorbox combo?