Using the Lightbox2 module is pretty much a must on fixed width sites. Since I want the thumbnails in my nodes to open to the full image, I must have the ability to set the rel of <a> to "lightbox". I went looking for a way to do this with Img_assist and found it was probably possible to use the HTML code insert method, but not the most ideal.

I would love to see the ability to set the "rel" of <a> on the same screen where you can set the title, class, etc. However, since Lightbox2 is a pretty popular module and having to type "lightbox" in the "rel" field every time would get tedious, I think it would also be nice to see a "Lightbox V2" option in the "Link" drop down. The option could only show up when Lightbox2 is installed and active, making it really easy to have a thumbnail open to the full image using a lightbox (imperative for sites with non-technical contributors).

If nothing else, the ability to manually set the "rel" field would be much appreciated in this great module.

Nick

Comments

darren oh’s picture

If you would like to submit a patch I would be happy to commit it. You could also sponsor someone to create a patch.

darren oh’s picture

If you would like to submit a patch I would be happy to commit it. You could also sponsor someone to create a patch.

davemybes’s picture

Status: Active » Needs review
StatusFileSize
new1.1 KB

I am also very interested in having the rel attribute available for editing - one of my current projects would work nicely with Lightbox, but the end users are not HTML-savvy. So, I took Darren Oh's suggestion to heart and set about modifying the code myself. After a couple of hours, I have made a good start (I think). I am attaching the patches for your testing. These patches are against the latest release of img_assist (14 Dec 2006). There are some limitations at the moment, and hopefully someone can help with them.

1. you cannot add a gallery name to the lightbox attribute - it breaks something, somewhere - for now just use lightbox. This is where I need help.
2. I have set it up to only work with "link to image node" - I didn't feel that the other options needed a rel link.

I haven't tried it with any other text other than lightbox - its late and I'm pretty tired so maybe tomorrow I'll do that. There are two patches, one for img_assist.module and one for img_assist_textarea.js. I haven't bothered with the tinymce file as TinyMCE and Lightbox don't play nice together on my installation.

Comments, suggestions, corrections welcome.

Dave

davemybes’s picture

StatusFileSize
new818 bytes

Second patch file.

davemybes’s picture

Status: Needs review » Active

Looks like I did something wrong here, as it now doesn't appear to work properly. I had tested it with the 21 Oct 206 version with no problems, did the patches on the Dec version and thought it worked OK. However, now it doesn't insert the Filter Tag, just the HTML. So please disregard the above patches - pity I can't delete those messages. I'll do some more testing and see what I can come up with.

Another thing, now I am seeing that Lightbox is automatically adding rel=lightbox[node_thumbnails] to thumbnail images inserted with img_assist. I'm fairly certain this wasn't happening before, but maybe I'm just a bit blind sometimes. So anyway, it looks like the original poster's feature has already been implemented.

sun’s picture

Status: Active » Fixed

You might use jQuery Lightbox now to integrate Lightbox with inline images of Img_Assist.

Anonymous’s picture

Status: Fixed » Closed (fixed)