when opening a file with lightbox, the link to download the original file is missing. it appears in other lightbox presets such as on cck image fields.
Idan
when opening a file with lightbox, the link to download the original file is missing. it appears in other lightbox presets such as on cck image fields.
Idan
Comments
Comment #1
iva2k commentedI doubt I will be rolling individual presets, but I will think of providing a way to define custom presets (would be a better feature to have). Meanwhile, you may want to look into two functions that define existing presets, and try inserting your own in there:
Comment #2
arbel commentedHi,
can I access the url of the image from here?
_itweak_upload_get_link_options()
Idan
Comment #3
iva2k commentedGood question. The answer is no in the current code. I expect your next question is how would you get what the file is in order to build a link options properly. Current code arrangement builds options once for the whole node, and each file gets those options. It prevents from doing what you need to do to format the links.
To resolve that I did some refactoring and checked into -dev CVS. Now there is a file object passed to _itweak_upload_get_link_options().
All you have to do in the new code is find this line (in lightbox2grouped):
and add after it:
I verified - it puts a link to the original file in the lightbox.
I'm still on the fence in regards to putting this last change into CVS. At a minimum, I would like to have a theme call there, so the links can be formatted differently by other modules or themes. Any thoughts on that?
Comment #4
iva2k commentedI've committed the above code to 6.x-2.x-dev CVS. Please reopen if this still does not work for Lightbox.