Other image handlers than lightbox ?

evilc

Joined: 2004-08-01
Posts: 47
Posted: Fri, 2008-10-17 20:44

Hi, I am using G2IC with Joomla and I must say, it's the glue that holds the whole site together from a usability point of view, top marks!

However, I am moving away from lightbox, as I have discovered HighSlide, and being a non-profit, it's free for us :)

I have managed to hack HS into G2IC but I don't think it's a very clean job, I have just replaced the "Thumbnail with lightbox link to fullsized image" code for now and changed the language string, then hacked g2image.php to generate a slightly different style of tag, as per the install page of the highslide site:

<a href="images/full-image.jpg" class="highslide"
        onclick="return hs.expand(this)">
    <img src="images/thumbnail.jpg" alt="Highslide JS"
        title="Click to enlarge" height="120" width="107" /></a>

so I had to hack out that rel stuff. I think Highslide can maybe be used with a rel tag, and the G2IC code seemed to maybe have something different between the rel [] braces, so maybe it could be configured as an option, I don't know. Highslide is very powerful, and the documentation goes a bit over my head, so I am not sure.

Surely, in general, it would be possible to have some form of config file to specify different image handlers? Then the "How to insert box" could just remain the same (Just change the text string of the lightbox entry to to "Thumbnail with image handler link to fullsized image") and add a new drop-down that selects the image handler (eg lightbox / highslide).

If I were going that far, I would probably venture another slight change too. Not sure about the div mode where it adds a div around each image. Surely better to have a checkbox in the insertion options area to select if you want a surrounding div or not.
Also, I have hacked my version to only open a div on the first image and only close it on the last loop - I get one div around all the images - an option for this should be easy, probably best to turn it into a 3 way radio or dropdown - no div / div around each / div around all.

So, anyone with any info that could help an armchair coder work out a clean solution to add in alternative image handlers to G2IC that would be great. I would rather have something neat and done properly that can potentially be folded into the G2IC code so that everyone can benefit (And so that I don't have to worry about hacking it back in to each new version of G2IC... ) rather than the bodge it is now.

Oh, and you can see our work in progress here: http://g2.evilc.com - check the Exhibitions section for examples of G2IC + Highslide in action.

 
juergen_s

Joined: 2008-10-29
Posts: 5
Posted: Fri, 2008-10-31 18:19

Hu - I just dropped here while searching for a lightbox plugin. But this is a great alternative, thanks for sharing.
And hey - great pics on your site ;)

Juergen
bavaria360.com