Jump to:
| Project: | Lightbox2 |
| Version: | 6.x-1.9 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | CCK, CSS, imagecache, Imagefield, lightbox |
Issue Summary
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
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.
| Attachment | Size |
|---|---|
| you-upset-me-lightbox.jpg | 355.99 KB |
Comments
#1
Any love?
#2
Setting to critical.
#3
Still struggling...
#4
any solutions...?
#5
tomsm: are you experiencing the same issue? Figured it was something I did weird.
#6
no, the issue is fixed. thanks for asking.
#7
Tomsm: do you recall what resolved the issue for you?
#8
I applied the css to the img tag instead of the imagecache class.
#9
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.
#10
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.
#11
Right, but since lightbox is stripping the classes from the img tags, I can't do that.
#13
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
#14
awesome. Thanks Stella
#15
Automatically closed -- issue fixed for 2 weeks with no activity.