Hi. I'm using ImageCache, ImageField (cck), and Lightbox. Life was good, until I realized that any CCK ImageField I set Lightbox to manage (via Manage Fields), no longer had the "ImageCache" class attached to it.

In other words, Lightbox is stripping any CSS classes I'm trying to attach to my CCK ImageField img tags.

So...

Before I enable Lightbox on an ImageField, the output looks like this...

<a class="imagecache imagecache-articles imagecache-imagelink imagecache-articles_imagelink" href="http://westernwearandgear.com/sites/default/files/rodeo3.jpg">
<img class="imagecache imagecache-articles" height="134" width="200" title="Cowboys" alt="American Cowboy Picture" src="http://westernwearandgear.com/sites/default/files/imagecache/articles/rodeo3.jpg"/>
</a>

Note the img classes "imagecache". I need this imagecache class so I can tweak the style of images managed by imagecache.

Now, once I enable LightBox...

<a class="lightbox-processed" rel="lightbox[field_image][Rodeo Pic Testing CCK and Placement]" href="http://westernwearandgear.com/sites/default/files/rodeo1-big.jpg">
<img height="154" width="200" title="imagecache testing" alt="testing testing" src="http://westernwearandgear.com/sites/default/files/imagecache/articles/rodeo1-big.jpg"/>
</a>

The Only local images are allowed. classes totally disappear? I reallllly need an image class on these divs so I can assign them a max-width and auto height to make images liquid/scalable (otherwise, my otherwise liquid site, looks like crud at < 1024x768.

Any ideas? See attachment if my description wasn't clear. Thanks.

CommentFileSizeAuthor
you-upset-me-lightbox.jpg355.99 KBNickWebman
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NickWebman’s picture

Category: support » bug

Any love?

NickWebman’s picture

Priority: Normal » Critical

Setting to critical.

NickWebman’s picture

Still struggling...

tomsm’s picture

any solutions...?

NickWebman’s picture

tomsm: are you experiencing the same issue? Figured it was something I did weird.

tomsm’s picture

no, the issue is fixed. thanks for asking.

NickWebman’s picture

Tomsm: do you recall what resolved the issue for you?

tomsm’s picture

I applied the css to the img tag instead of the imagecache class.

NickWebman’s picture

But doesn't that assign whatever css you give to img to ALL images on the site? That won't fly for what I'm trying to do.

tomsm’s picture

no, you can combine a class with an img tag in a css rule, so that only the img tags in that class are affected.

NickWebman’s picture

Right, but since lightbox is stripping the classes from the img tags, I can't do that.

stella’s picture

Priority: Critical » Normal
Status: Active » Fixed

It's not that the class names are being stripped out, but rather it is a completely separate cck formatter, and none were specified. So I've added in a bunch of css classes now. Available in next dev and official releases.

cheers,
Stella

NickWebman’s picture

awesome. Thanks Stella

Status: Fixed » Closed (fixed)
Issue tags: -CSS, -imagecache, -CCK, -lightbox, -Imagefield

Automatically closed -- issue fixed for 2 weeks with no activity.