Hello,

I would like to create a gallery with Colorbox. I installed Colorbox and worked fine, but now I need to put a hover action to the image before people click in it to open the Colorbox display. I could do it with CSS if the image style wasn't different in the hover one (I have two Image styles because one of them is desaturated). I founded the module Hover Preview for ImageCache (http://drupal.org/project/hover_preview) and is exactly what I want, but can't work with Colorbox: you can select one or the other, but not two at the same time because both are display options.

I do not know if it's a meaningless question, so please forgive me if this is not the place to put it in.

Comments

lsolesen’s picture

Status: Active » Postponed (maintainer needs more info)

Did you ever find a solution to your problem?

ckrina’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Sorry for late response!
First time I had this trouble I changed the way I showed images.
Second time used PHP in views and CSS for showing/hiding a user's picture. Printed it two times and using position: relative in parent item and fixed position (& top:, left: 0) for both images. Then used : hover CSS to hide the top one with opacity.

<img width="130" height="135" src="http://sitename/sites/default/files/styles/style_1/public/pictures/<?php
print_r($value->picture->filename);
?>" /> <img width="130" height="135" src="http://sitename/sites/default/files/styles/style_2/public/pictures/<?php
print_r($value->picture->filename);
?>" />

Moreover, I think in normal images is not necessary to use PHP. Just using two times the same field with different image style and the top one with colorbox.

dqd’s picture

Version: 7.x-1.0-beta4 » 7.x-2.x-dev
Component: Miscellaneous » Code
Category: Support request » Feature request
Issue summary: View changes
Status: Closed (works as designed) » Needs work

I think this is not a support request but maybe rather a arguable feature request, to make it possible to optionally inject hover_preview module widget into colorbox popup widget, if both present on manage display settings. That sad I remark this issue active and change it to feature request on latest dev. I will try to take a look on it, but would love to see more users chime in and show some interest and ideas.

dqd’s picture

Title: Hover image action/state before click on it » Hover_preview module widget support: additional hover action combined with click event (Colorbox widget)
dqd’s picture

INFO for followers: with views it is already possible to combine both. Thanks to the colorbox trigger feature in the colorbox module which can be called on output rewrite later, after setting up image field with hover_preview widget and exclude from display state. Later we can reuse this field setup as replacement token and can wrap it with colorbox trigger to get our wanted popup on click event.

But what if we can't involve views for some reasons (e.g. some clients want to keep the drupal core classes to prevent rewriting of html output and corresponding stylesheets / I would always prever Views awesomeness over anything else but anyway ...). In this case it would be great to have options at hand to combine both event-listeners and pair reactions of both field formatter module widgets. Not sure, but mayyyybe this can be also achieved with custom formatters module on drupal core manage field level, without views, not sure, not tested yet.

Neslee Canil Pinto’s picture

Status: Needs work » Closed (won't fix)