Hello,

I was wondering if colorbox will be fully compatible with Views 3 and if it is possible to expand the views image format options to similar as Lightbox2.

Lightbox2 views image format choices allows an image to be shown as any preset initially, then when clicked open up as a lightbox popup as any other preset created with imagecache. With thickbox this was not the same, and the popup version could only be set to one preset in the settings which was not good as with different views I require the thickbox popup to be a different image preset. It would be awesome to see this flexibility seen in Lightbox 2 in colorbox as well!

Thank you

Comments

frjo’s picture

Title: Views image format support » Views 3 and views image format support
Category: feature » support

Colorbox Views integration is only via CCK, not directly. Views 3 support should therefor be more or less automatic.

I know about the Lightbox2 solution you mention. I have not have any use for it and you are the first asking about it.

If more people want this I may work on it in the future. A good clean patch would make this feature a lot more likely :-).

jdwfly’s picture

If this is what I am thinking it is, then I end up using it a lot. I'm going to look into this and if its what I need then a patch will be coming.

Bilmar’s picture

subscribing - I first used Thickbox on my site but changed to Lightbox2 for this reason above.
The fast pace development of Colorbox is exciting and I look forward to following this module.

Regards

robby.smith’s picture

Title: Views 3 and views image format support » Views image format support
Category: support » feature

Changing title and category as feature request.
I hope this level of usability/functionality can be added to Colorbox =)
Thanks!

rburgundy’s picture

+1 subscribing

YK85’s picture

Title: Views 3 and views image format support » Views image format support
Category: support » feature

+1 all the way. I would definitely switch over to colorbox from lightbox2 as soon as this is available =) This module is looking very cool!

frjo & jdwfly - any idea of when we may see this in colorbox or begin helping with testing?

jdwfly’s picture

I'm working on this and should arrive soon.

YK85’s picture

Hi!

I was wondering if #799216: Views Colorbox custom field handler is related to this feature request?

Example of current options in views field Format: and the colorbox setting has Imagecache preset: that only allows one option for the popup imagecache preset.
Colorbox: profile
Colorbox: profile_expand
Colorbox: profile_expand2

Example options for the views field Format: that would make colorbox the best =)
Colorbox: profile -> profile
Colorbox: profile -> profile_expand
Colorbox: profile -> profile_expand2
Colorbox: profile_expand -> profile
Colorbox: profile_expand -> profile expand
Colorbox: profile_expand -> profile expand2
Colorbox: profile_expand2 -> profile
Colorbox: profile_expand2 -> profile expand
Colorbox: profile_expand2 -> profile expand2

I applied patch at #799216: Views Colorbox custom field handler but wasn't sure what changed or what it allows.
I look forward to helping with testing your work jdwfly!

Thanks

frjo’s picture

Title: Views image format support » Add additional CCK field display options for Colorbox similar to Lightbox2

#799216: Views Colorbox custom field handler adds a very flexible Colorbox trigger field to Views. It's related to this feature request but does not make it less relevant I think.

I believe Lightbox2 goes a bit overboard with all its options. I hope the Colorbox solution can be more "slim". For all edge/special cases we can direct people to Colorbox trigger field above instead.

Martyness’s picture

I was just wondering if the feature that every one is talking about is the one where you can make image groups at link level
such as Photo

Thanks! Marty

frjo’s picture

Martyness: No, that feature already exist. Just add a class "colorbox" and set rel to a common gallery name, like this.

<a href="/files/image1_thumb.jpg" class="colorbox" rel="gallery-name"><img src="/files/image1_full.jpg"></a>
<a href="/files/image2_thumb.jpg" class="colorbox" rel="gallery-name"><img src="/files/image2_full.jpg"></a>
<a href="/files/image3_thumb.jpg" class="colorbox" rel="gallery-name"><img src="/files/image3_full.jpg"></a>
YK85’s picture

Wanted to kindly ask if there has been any further development or a patch that may be tested for this feature. Thank you very muc for the support.

erik’s picture

Subscribing to yaz085's question, I would be very pleased to see this functionality integrated.

chuckbar77’s picture

exactly what i'm looking for!

(subscribing)

dddave’s picture

I am going to fall for colorbox when this feature lands. ;)

chuckbar77’s picture

I second #16 =) This module looks cool but I need this feature before switching my sites to it.

Is there an ETA on this feature?

alan d.’s picture

Before you do this, be aware of the performance issues associated with this option. The details can be found here #409354: Performance issues with large number imagecache presets and content types.

This is the primary reason why we are thinking about using colorbox instead of lightbox.

frjo’s picture

If this feature gets added to Colorbox I will make sure to make it optional via some settings. It pollutes the formatter popup, have performance issues and personally I have never had any use for it.

The default behaviour would be like today. One "middle" option would be to display options for all imagecache presets that scale to at least, let say, 800x600 pixels. Then a "full" option with some warning text.

When do you need to use this feature? Is not the point of a lightbox to show images as big as possible?

I normally just show the original image, on a few sites that saves hi res images I use Colorbox global settings to set a preset that scales to something like 1280x1280 pixels to use for the Colorbox.

alan d.’s picture

When do you need to use this feature? Is not the point of a lightbox to show images as big as possible?

lol. Have you ever had to teach a client that the 10MB photo is simply not in a web format!

But seriously, it is useful when trying to normalise the results.

One possible solution would be to create two checkbox arrays of the presets and let the end user select which ones they want. This would result in a fairly small matrix and everyone would be happy.

Something like:

<?php
  $options = array('0' => t('Original image'));
  if (module_exists('imagecache')) {
    foreach (imagecache_presets() as $preset) {
      $options[$preset['presetid']] = $preset['presetname'];
    }
  }
  $form['colorbox_preview_options'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Image formatter thumbnail options'),
    '#options' => $options,
    '#default_value' => variable_get('colorbox_thumb_options', array('0' => '0')),
    '#description' => t('This option select the thumbnail presets available to the CCK formatters.'),
  );
  $form['colorbox_full_options'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Image formatter popup options'),
    '#options' => $options,
    '#default_value' => variable_get('colorbox_full_options', array('0' => '0')),
    '#description' => t('This option select the colorbox popup presets available to the CCK formatters.'),
  );
  
  ....
  $options = array('0' => t('Original image'));
  if (module_exists('imagecache')) {
    foreach (imagecache_presets() as $preset) {
      $options[$preset['presetid']] = $preset['presetname'];
    }
  }  
  $thumb_options = array_filter(variable_get('colorbox_thumb_options', array('0' => '0'));
  $thumb_options = array_intersect_key($options, $thumb_options);
  $full_options = array_filter(variable_get('colorbox_full_options', array('0' => '0'));
  $full_options = array_intersect_key($options, $full_options);
  foreach ($thumb_options as $thumb_id => $thumb_name) {
    foreach ($full_options as $full_id => $full_name) {
      // define themes, formatters, etc
    }
  }
  
?>
chuckbar77’s picture

My usage of this feature would be:

view1: imagecache preset A -> original
view2: imagecache preset B -> imagecache preset C
view3: imagecache preset D -> imagecache preset E

Also, I have users upload an image, and crop it to be their profile picture (shown as an imagecache preset) and when other users click the picture I want it to show just a little larger, not the original picture.

I think it would be great to have a checkbox to enable this feature so admins that don't need this feature does not have all the additional options, but it would greatly help those with the need (not wanting just the original or just one preset to be shown for all pages when an image is clicked). I primarily use views.

Thank you!

magnus’s picture

Subscribe

mstrelan’s picture

As per the warning in #18 I've written a patch for lightbox2 to allow configuration of available formatters. I think the same would work well for Colorbox.

See http://drupal.org/node/409354#comment-3679836

hedac’s picture

it would be great to see this in colorbox. subscribing.

frjo’s picture

If you are interest in this feature in Colorbox for Drupal 7 please try out the patch I have posted at #982626: Use formatters setting instead of new formatter for every Image style .

dddbbb’s picture

Status: Postponed » Active

+1 for me too.

I just gave colorbox a go for the first time and it was the lack of this functionality (and a couple other things) that's made me switch back to LightBox2 for now. I'll be keeping a close eye on this project though.

chuckbar77’s picture

I was wondering if anyone has had any development on this feature? Thanks!!

frjo’s picture

Status: Active » Postponed

Since Drupal 7 is about to be released and most will move to it during this year I will not work on this feature for the D6 version. Colorbox for D7 already has this implemented in a really nice way.

If someone contribute a nice looking patch however…

YK85’s picture

Status: Active » Postponed

Kindly bumping. Has anyone been able to look into this feature?
Thank you

rjbrown99’s picture

You may want to have a look at the code in here as well -
http://drupal.org/project/hover_preview

Not because of the JS hover and how the module works, but because of the field output as it relates to imagecache. It might translate to what you are trying to accomplish.

hongpong’s picture

Subscribing -- Did this get implemented?

frjo’s picture

Status: Postponed » Closed (won't fix)

@HongPong, Not for Drupal 6 but in Drupal 7 you can do this in the formatter settings.

In Drupal 7 it was easy to implement, in Drupal 6 it's cumbersome.