The title pretty much says it: it's nice to be able to attach a little thumbnail screenshot to each link using image_attach, but I'm wondering if there's any way to make the image a link to the site? User-interface-wise, I think that's the behaviour most people would expect from it.

The default seems to be, instead, that (at least if you have Lightbox 2 installed on the site), it opens the screenshot full size in a lightbox, which is highly confusing to the user, who may then think they've opened the site and start trying to click on links.

With some fiddling with the theme_image_attach_teaser() function (specifically, removing the l() function that was wrapped around the image_display() near the end), I was able to remove the link entirely, which at least got rid of the lightbox problem, but it's not really an ideal solution, since I'm sure people will keep trying to click on the thumbnails.

The challenge, I guess is twofold: first, is there a way to pass the weblink site URL to that image_attach function in a form that it can use, and second, is there a way to add a custom class to the image tag or something, so that hopefully I can stop Lightbox 2 from messing with it? I did try adding "div.image-attach-teaser .image-thumbnail" to the custom class list in Lightbox 2's automatic image handling settings, and setting it to disabled for the custom classes, but it didn't work. I'm guessing maybe it just wants one class name, not a class within a class...

This is less pressing than the other issue I posted earlier tonight (#695552), but it would still be nice to find a solution.

Comments

nancydru’s picture

Status: Active » Postponed

I understand your frustration because I would like it too. The problem is that the WL module doesn't know that Image Attach even exists. That's part of letting standard Drupal functions take over. With Image going into core (and I assume, IA) in D7, I'm not sure what we can do to "future-proof" any kind of solution, but I will try to look into it.