Hi,
First of all, thanks for a great module - it has been badly needed in Drupal for a while.
However, I would appreciate it if you could make the "imagefield gallery lightbox2" module dependant on the Lightbox2 module rather than including its code in your distribution. It means that you could take advantage of the new lightbox2 bug fixes and features without having to update your copy of my code. I would also have appreciated being asked beforehand - it's just polite. If you had needed any new features I would have done my best to add them to the lightbox2 module.
Cheers,
Stella
Comments
Comment #1
stella commentedThe lightbox.js file you've included is already out of date by the way. How would you feel about working together on this - I really think it would benefit both modules. Imagefield Gallery is a great module and you could benefit by not having to keep lighbox.js up to date. It also reduces the risk of conflicts between the 2 modules and reduces code duplication across drupal. In addition, it prevents confusion amongst users - I already had a support question on irc about why a new feature wasn't working. Anyway it's just an idea.
Cheers,
Stella
Comment #2
eclipsegc commentedStella,
My apologies, initially I had made it dependent upon lightbox2, but it was just this huge list of dependencies and I was feeling more and more annoyed by it as it required more and more of the user to even install it... that said, I do have some checks to see if lightbox2 is installed and if it is, it lets lightbox2 do all the work for the lightbox stuff. (I.E. I knew you'd definitely get further ahead of me w/o me updating, plus I don't want to duplicate what you're doing so much as just provide a system that makes use of it)
With all that said, I'd love to work together on this stuff. I'm still not particularly hot on the idea of making it a dependency on lightbox2, but I am negotiable on that. I think the biggest reason I chose not to make this dependency is that lightbox2 does some really GREAT things for thumbnail'd images (for example if I were using the image gallery module provided with image) and while that's fine, it's not what everyone wants, and so again, I chose to distance myself from how lightbox2 was working at the time since I had a situation in which lightbox2 was upsetting the balance of the website I developed imagefield_gallery for.
That said I'd be more than happy to offer some opinions on what specifically was upsetting me about lightbox2, and I'm in the process of releasing a new version of this module shortly, so if you have any input you'd like to give on changes to the module in general or imagefield_lightbox2_gallery, I'd be delighted to get them.
So, to summarize (sorry I'm really tired and semi-babbling):
If you can't tell by what I've said above, lightbox2 and imagefield gallery did both get used on the site imagefield_gallery was developed for, and so since they were installed together, they've been playing nice in the same sand box since its inception, but again, I've documented that rather badly (unless you read issues or read through the code). I would love to work together on this stuff, and I think there are a couple of changes that lightbox2 could make that would make me mostly happy to make it a dependency... it's been a long time since I've installed it so perhaps you've made some or all of those changes already, and again, I apologize for yoinking some or your code without mentioning it, my intent was only to create a very light install footprint, not to replace your module with my own. (as yours is quite nice :-D)
Hope that was clear, as I said, sleep has been hard to come by the last few days, and perhaps my babbling was less-"sensical" that I had hoped. Catch me in IRC if you want to chat in person, I should be there more permanently again starting tomorrow or later tonight.
Eclipse
Comment #3
stella commentedHi Eclipse,
I wasn't actually too annoyed that you re-used my code - it would have been nice if you'd let me know, but hey it is GPL after all :) I think I was just a bit frustrated after encountering an issue on irc that had me scratching my head as to why it wasn't working!
First off, I hadn't realised that your module only loads your version of the lightbox js file if the lightbox2 module isn't already enabled. That would eliminate any duplicate behaviour or conflicts like what already exists if both lightbox2 and jlightbox (or shadowbox) are enabled on the same site!
From reading your response, I feel as if there are two main reasons why you chose to implement your own version - please correct me if I'm wrong:
Automatic image handling stuff is enabled by default, but it is possible to disable it on admin/settings/lightbox2/automatic. You should really check out the latest release, it includes a number of new features, including slideshow and video support, but the configuration of the automatic handling stuff should also be clearer. It's not really necessary for it to be enabled by default, so if you do make your module a dependency on Lightbox2, I don't mind changing the automatic handling default for all image types to be disabled.
Currently you can decide to disable lightbox2 on certain pages. I don't think it would be too difficult to add the reverse of that - so by checking a box the user can decide whether lightbox2 should be enabled or disabled for the specified list of pages. It's just an idea that might be beneficial for your module, but could also be beneficial to the lightbox2 module in any case.
Finally, have you looked at the lightbox2 lite feature? It's an option on the admin/settings/lightbox2 page. It's just a basic lightbox with no slideshow, video or automatic image handling stuff. It also has a different look and feel. It rarely gets updated or modified and doesn't currently have image grouping support, but I could probably add that if it's something you think your module would use.
Oh and on a side note, have a read of Drupal "Lightbox" Type Module Comparsion. It's almost finished (just need to add more to the list of supported browsers) and I plan to post it on drupal.org as soon as I've heard back from the different module maintainers. However, you might find it a useful resource for other modules you might want to integrate with.
Cheers,
Stella
Comment #4
eclipsegc commentedPretty much nail on the head there Stella, however my last and probably greatest reason for not making it a dependency is that I felt like I had a whole bunch of dependencies already and the list just kept growing... in fact, I have this funny feeling that will be the downfall of my module, in that it could be dependent upon just about anything under the sun if someone so chose... but that's a bridge for later.
Your current changes and suggested changes are all things I would encourage from a usability standpoint, chances are you should go with the simpler defaults, and I REALLY like the idea of enable the js on the pages you want, not the pages you don't. (if you go that route let me know so that we can build into imagefield_gallery_lightbox2 a way to manually call the proper js from your module when it's installed so that people don't have to make it work for all nodes)
Anyway, again I'm certainly not trying to take "business" away from your module, just give it another outlet. I'm wanting to write up a whole slew of docs for the module, however I'm awaiting the next release since it will significantly change things. At that point I'll do my best to make the fact that you can (and probably should) use lightbox2 module REALLY obvious.
Sincerely,
Eclipse
Comment #5
Farreres commentedLet me add to this thread. It was me who asked stella on IRC about some problems I was having.
In fact, my interest was to take profit of the new imagecache2 view preset permissions, so that I could prevent anon users from viewing some images encouraging them to register in order to view them. Now that I have been inspecting the code of imagecache and lightbox, it seems I will have to program it through the theme. I have almost done it, but I have found some (what I would consider) bug in imagecache code that I am posting in his own queue.
In any case, when I first saw this imagefield module, I understood there had to be some coordination between both modules. In fact, we shouldn't be doing the same work twice, nor should we be repeating code here and there. There should be definitely a dependency from gallery lightbox2 to lightbox2. What reasons would anyone have for having a gallery in a frontend without installing this frontend.
Dependencies are not bad, on the contrary, it makes you conscious. Hiding a dependency is not going to help users, it's denying information to them. It is good that dependencies see the light. Just concentrate on developing the interconnection between imagefield and lightbox, and let the lightbox people know what we need to make it work properly, but don't repeat code, because it's repeating efforts.
And good luck for this much needed module, It has saved my sanity!
Comment #6
eclipsegc commentedFarreres,
I've been aware of this particular issue for some time now, I also believe I have some code that SHOULD take care of it, however testing it was difficult because I'm not yet using 5.2 on a regular basis and I need to be for all the imagecache 2.x work. (yeah I know, stupid) Anyway, I'm pretty much positive that imagefield_gallery_lightbox2.module will have to have its own solution to this problem since it's doing the theme work to output the "gallery". And while that could potentially be something lightbox2.module eventually handles, it would be sort of awkward, and yeah... I just think we're actually going to have to solve the problem in both places.
I'm not saying dependencies are bad, I'm just saying, the fewer of them I can legitimately have the better in my opinion.
Eclipse
Comment #7
Farreres commentedI pretty much found the place of the problem with image cache permissions, and well, they say it's not going to be corrected. I posted this here http://drupal.org/node/263126. I am posting this link be cause if it is not solved within imagecache, we can perhaps solve it through the gallery. In any case, the solution should come from imagecache. Hmm, this thread wasn't about a feature request, sorry, if you consider it a reasonable request, I would create one.
Comment #8
stella commentedEclipseGc: the latest dev version of the lightbox2 module does a couple of things you were looking for.
Cheers,
Stella
Comment #9
eclipsegc commentedThat sounds awesome, I'll check it out soon and we'll talk about dependencies some more.
Eclipse