I'm trying to integrate lightbox into the image browser so that it will add rel="lightbox" to the anchor tag and perhaps have an optional set name in brackets too. I can probobly work out the coding if I can figure out where in this huge project the image browser's source is located. Can anyone point me to the file I'm looking for? I've spent the last hour trying to find it and my brain's about shot.
http://www.huddletogether.com/projects/lightbox2/
Fri, 05/05/2006 - 15:58
#1
RE: Lightbox?
Re: Lightbox?
The user will simply upload the small image in the main image dialog box, and will then upload the large image that is going to be displayed in the lightbox in the link dialogue - here they will be able to set it as a lightbox link - either a standalone lightbox, or part of a group, and will be able to set a caption.
The two files concerned are: fckeditor/editor/dialog/fck_image.html, which displays the image dialogue box, and fckeditor/editor/dialog/fck_image/fck_image.js, which processes it.
The following (x)html will create a drop down selection box and text box for captions (i.e. set by the 'title' value in the link)
It goes straight after the div for creating the 'target options' (which I, in fact, removed - I don't want my users to have that option) at line 178 in the html file:
This only does English - you would need an fcklang property for every element and an equivalent value in every language.js file (i.e. en.js) to make this multilingual.
You then need to allow the .js file to process it - both to collect the data to populate the form with the existing details when it loads, and to update the editor with your chosen details when you submit the form.
First, underneath the 'GetE('cmbLnkTarget').value = oLink.target ;' line at line 189 we need:
then, after the equivalent property setting line at line 263 we need to add:
I then also added the line:
to force a class of 'imageLink' to any link that was around an image, so that no-one has to think about setting a class for the link.
The javascript is very easy to read and amend - it would be easy (I am thinking of doing this) to create a similar dropdown box to set some basic image classes for your .css to reference (float left, right, dropshadow etc...). Also possible to amend the link pop up dialogue in the same way - if you wanted to reference the lightbox from a text link and not just from a thumbnail image.
Re: Lightbox?
It's works !!!
Many compliments!!!
Re: Lightbox?
Thanks a lot richardmorgan, this is exactly what I was looking for and of course, it's working like a charm (I added localization also easily).
Re: Lightbox?
I did another integration (similar to this one). Have a look here http://www.ludrao.net/home/node/8.