Greetings:
I am trying to integrate the asset module with lightbox (my ultimate goal is actually to manage slideshow as a regular asset).
From what I see from the code, you are using the prototype/scriptaculous implementation of lightbox. Is there any reason to choose this one over the several other available directly from Drupal ? For example, lightbox2 or thickbox ? Both of them use jQuery (lightbox2 need jquery_update). jQuery as the advantage to be in Drupal so you don't need to load 2 more js files in order to use only the lightbox functionality.
Also I can see that the path to the lightbox libraries are hard-coded to a subdirectory of the theme (lightbox). I think that it has more to see with a function and should go in a module. Using one of the thickbox-like modules would also solved this issue.
damien
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | imagecache_asset_view.JPG | 79.15 KB | true-pal |
| #8 | imagecache_asset_gridview_s.jpg | 74.66 KB | true-pal |
| #8 | imagecache_asset_gridview_lightbox2_s.jpg | 91.5 KB | true-pal |
| #4 | asset_IC_Views.patch | 3.8 KB | true-pal |
| #2 | asset_a2.tgz | 313.59 KB | true-pal |
Comments
Comment #1
danielnolde commented+1
I also think that the lightbox/thickbox/dhtml-popup-handling should be
a) theme-able, hence go into a theme_ function
b) should by default also respect and use an existing thickbox.module installation (for the aforementioned reasons)
Comment #2
true-pal commented!!! I'm NO official author nor maintainer of the asset module !!!!
I have added the above mentioned feature:
Support of Lightbox2 & Imagecache in the Views for the cck asset-field.
Configuration:
1) Provide an Imagecache namespace/ preset (see other manuals)
2) In the Views Module add the asset field.
3) In the option popup menu select the imagecache namespace of your choice
4) try it and comment feedback in this thread (or to my contact )
(so, this feature does NOT use the asset configuration for imagecache)
This modifications are based on asset 5.x-1.x-dev from 2008-Feb-06, 302.59 KB
Modifications:
For this I have modified the asset.module and the asset_content.inc (see comments in source)
This is the first alpha release of this feature, do not commit bugs to the modules issue, instead
send me an e-mail.
Comment #3
wmostrey commentedtrue-pal, it would be great if you could create a patch on these modifications so other users can review them. This way the modifications could make it into the main branch which is highly advisable.
Comment #4
true-pal commentedhere comes the patch version.
This modifications are based on asset 5.x-1.x-dev from 2008-Feb-06, 302.59 KB
since this is my first patch, following informations for this:
Used tool: GnuWin32 diffutils (no CVS diff)
I have patched two directories for this I have changed the
directory names to "asset_ori" and "asset_jk"
Don't hesitate to contact me if something is wrong with this patch.
Comment #5
wessex commentedAm I right in thinking that Asset can already use the jQuery lightbox effect 'out of the box' as it where?
If so, how does one use it? Would it be a case up uploading the two differently sized images, or does Asset resize for you and do the linking magic?
Thanks!
Tom
Comment #6
wmostrey commentedThanks for the patch true-pal, I'll be sure to test it.
Wessex, if you have the lightbox script as a directory in your current theme (so
sites/all/themes/mytheme/lightbox) it will automatically be used, you don't need to change anything. There is currently a bug where this doesn't always apply for CCK fields but that is being worked on.Comment #7
wessex commentedwmostrey - thanks for that. I've a few more questions to ask, so I'll start a new thread as it's slightly tangential (and support related really)!
Comment #8
true-pal commentedhello wim,
so let us talk about integration of the patch.
For better understandig I have attached example screenshots
of what the patch is doing.
- Configure Asset View (selecting imagecache for asset field in Grid View)
- the Grid View for asset content type
- Lightbox after clicking the image
Comment #9
true-pal commentedsee #8
Comment #10
wmostrey commentedHey Juergen, could you take a look at http://drupal.org/node/238544 and see how that relates and affects this patch?
Comment #11
wmostrey commentedMarking as duplicate (and fixed) of http://drupal.org/node/238544.