I have video module nodes on the front page that display a teaser image for the video with class="image image-thumbnail video_image_teaser". I don't have lightbox2 video support or acidfree video support enabled because I don't like how it renders the whole page in the lightframe, I just want it render the actual video (that's another issue).

So on this, I don't like how clicking on the video teaser brings up the lightbox for the teaser image. I'd be more than happy for lightbox to not automatically process this image but can't figure out a way to do it. I know that we can specify pages to disable lightbox (and I've don't that on pages that display collections of videos) but is there a way to do it by class?

Comments

bkat’s picture

I figured out an ugly work around for now. By overriding theme_image_display(), I'm removing the image-$size class from the classes for video teasers.

/*
 * kjh: remove the image-thumbnail class from video teasers so that they
 * lightbox2 doesn't process them.
 */
function womensfooty_image_display($node, $label, $url, $attributes) {
    if (isset($attributes['class'])
	&& preg_match('/ video_image_teaser/', $attributes['class'])) {
	$attributes['class'] = "image image-thumbnail-kjh-removed video_image_teaser";
    }

    return theme_image_display($node, $label, $url, $attributes);
}