Shadowbox is excellent!! I am looking for support, but this could be a feature request also.

When using Shadowbox as the image field formatter, is there a simple way to designate a different image to be used for the Shadowbox link in all instances of the content type? (rather than using an existing image style preset).

Basically I want to use an arbitrary image (my 1st choice) or arbitrary text (my 2nd choice) as the link to open the shadowbox for my file.

Across hundreds of nodes the files which open in a shadowbox will be different, but I want the links to open the shadowbox to be always the same image or text (not a thumbnail or other rendering of the file).

Seems like perhaps this should be a feature request unless there is already a simple way to do this.

Thanks in advance for any and all help with this!!

Comments

bharata’s picture

Category: support » feature
Priority: Normal » Minor
Status: Active » Fixed

My solution was this:

Design the generic link image that you would like use. Make it the appropriet size. No transparency.

Install and enable the "Imagecache Actions" module. Also enabe the "Imagecache Canvas Actions" sub module.

Create an image style [your_image_style] with the following effects:

Effect 1) resize the image to the same dimensions as your link image.
Effect 2) apply a "watermark" and select your link image. (I had to select opacity of 99 for it to work.)

Go to the manage display for your content type.
For your image field, select Shadowbox as the formatter. Then configure:
Image style: [your_image_style]
Link image to: [any_image_style]

View you page. Yay, it works! The "watermark" image perfectly covers the resized image and you have effectively created an image trigger of your choice to open the Shadowbox.

bharata’s picture

Status: Fixed » Active

Here's how I solved my issue:

Design the image you would like to use for your Shadowbox links. No transparency. It's simplest if you make it the dimensions you want for your links.

Install and enable Imagecache Actions module. Also enable the Imagecache Canvas Actions submodule.

Create an image style for your Shadowbox links. Call it whatever: [image_style_1].

Add the following two effects to you style:

1) resize the image to the same dimensions as you link image.

2) apply the watermark effect and choose the image you created for your links. I had to set opacity of 99 for it to work.

Go manage the display of your content. Select Shadowbox for the field formatter. Now configure:
Image style: [image_style_1]
Link image to: [any_image_style]

View your page.

Yay! It works!! You created an image and used it as a watermark that covers the link image and it functions perfectly to trigger the Shadowbox to display your content.

I only wish this didn't require another module. It seems like a Shadowbox setting (in the field formatter settings) should allow one to select an alternate image or some formatted text.