Would you care to merge this module with Lightbox V2? Would be confusing to users to have two modules doing almost the same thing, plus it would yield much greater results with a group of people working on it.

See, the email I have sent via your contact form too.

Comments

frjo’s picture

Assigned: Unassigned » frjo

Definitely interesting, why didn't I think of suggesting this in the first place :-). Lets talk more via e-mail how this can be done.

kleingeist’s picture

well i dont know what you are imagine exactly, but nevertheless i would like to throw some ideas of my own in the ring.

Lightbox is missing support for anything else than Images, so ThickBox would seem to be the better solution when it comes to backward compatibilty.
But Lightbox (Plus) has the nicer effects and functions coming to the resize big pictures and the prev/next grouping funcionality.
Both of them currently lack the support for internal drupal translation. Maybe close/next/previous are widely know around the world, but it would just be more "preffesional" if you could change them using the localization module.
Many people are using the image.module in some ways, so i'd like to build some routines helping them to automate the lightbox functionality. It would be nice to show all thumbnailed links to images as light/thickbox but still preserve the accessibilty to the actual node behind (think of comments and extended descriptions in the node->body), in form of a link inside the box.
With Drupal 5 jquery will be the default javascript framework and it could become a little tricky to include Prototype/Scriptaculous. So it might be wiser to rely on jquery.
Both (Java-) Scripts are using an variable, with defines an absolute path to show some sort of loading image etc. It currently needs the manual modification of the .js files. You could easily solve this by using an empty

and css backgrounds (those are relative to the path of the .css file, so subdirectorys would be no longer any matter) or alternatively by providing the path trough the php part of the module.

I don't know if all of this is worth the work it would need, or if it blows up a little module too much, but at least the localization seems important to me. At this time both of the modules are using nearly unmodified versions of the original scripts. This comes in handy, when it is about maintaining, testing and critical updates, but on the other site it would be possible to fit the script much better to drupal, by hacking those files. All the things mentioned above could be implemented in javascript by modifying some smaller or bigger parts of the original js-code.

So long text after all for a simple proposal:
How about building a drupal specific lightbox on the base of either light- or thickbox?

frjo’s picture

Thanks for the CSS tips for the "loading_animation.gif". It seems to work well on my test site.

I'm a bit concerned with the translation issue. But I'm also hesitant to start hacking away at "thickbox.js". First, I don't know JavaScript so well and second, I want it to be easy to upgrade to new version of thickbox.js.

Are there any other major differences between Lightbox and Thickbox than the ones you mentioned? You would think it would be more with all those KB of js files :-).

MySchizoBuddy’s picture

With drupal 5 having built in jquery, it would make no sense to merge it with lightbox.
why add prototype and scriptaculous and make the library more complicated. when u have an efficient jquery library

kleingeist’s picture

You asked about differences, and i will try to give a short overview. There are not that many, which isn't that surprising because both are build to do the same task: showing a lightbox.
But beware the following list is maybe a little subjective, because i like the jQuery approach much more than the Prototype one.

Lightbox v2 (http://www.huddletogether.com/projects/lightbox2/)
pro:

  • Nice effects using Scriptaculous
  • Seems to be a little more widespread than thickbox and therefore there are possibly more testers on different systems (mac ie, konqueror, galeon etc)

contra:

Lightbox v1 (http://www.huddletogether.com/projects/lightbox/)
pro:

  • lightweight, because its a standalone script, which has no library dependencies
  • i guess well tested

contra:

  • no grouping
  • no effects
  • images only

Thickbox (http://jquery.com/demo/thickbox/)
pro

  • less code than Lightbox v2 (on drupal 5 even less than Lightbox v1 because jquery will be integrated in the core system)
  • works on images
  • works on every other content using ajax
  • possibilty to show another website in an iframe box
  • jQuery is build into Drupal 5, so it will be just one javascript library contributors have to learn

contra

  • currently shows less effects than lightbox v2 (altough this could be tweaked a bit, jQuery brings some buildin effects. They are currently disabled in thickbox due to some problems on safari, afaik)

I think ThickBox is far better than the first version of lightbox. For pages only serving images within a *box* i think i would prefer lightbox v2 - its just "smooth". But this is no option on Drupal 5 because lightbox won't work with the jQuery library and using Prototype would break most of the core Drupal functions.

Following MySchizoBuddy, im totally against merging the thickbox INTO lightbox module. But i think the other way around, merging Lightbox into Thickbox, using functions which are adding an Thickbox to links with rel="lightbox" would be an option.

I'm a bit concerned with the translation issue. But I'm also hesitant to start hacking away at "thickbox.js". First, I don't know JavaScript so well and second, I want it to be easy to upgrade to new version of thickbox.js.
Do you mean upgrading the thickbox.module or manual upgrades by drupal users directly downloading new versions from http://jquery.com/demo/thickbox/ ?
The second would be a little problematic, but still could be solved looking at backward compatibility and maybe a little fallback function.
If it is the module update you are thinking about, i think there could be a solution by extending the thickbox team. I would really like helping to maintain this module, and maybe bugz_nz is willing to join, too?

frjo’s picture

Thanks for the information StIllE!

If Lightbox/Prototype will not work in Drupal 5 I to see no reason to merge the projects.

About the ability to upgrade to newer version of thickbox.js I mean both end user and module development upgrades. It the function we can gain is really compelling it can be worth the trouble of-cource.

Making Thickbox module add the thickbox function to links with rel="lightbox" is a very good suggestion, it would make it easy for people to switch.

bugz_nz’s picture

Status: Active » Closed (won't fix)

It seems the consensus is against a joining of the modules, thus I am closing the thread.