Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is there currently any way to make a link, or other means, for a user to easily download an image from a gallery?
Thanks!
Comments
Comment #1
gcstarr CreditAttribution: gcstarr commentedOK, I changed the module for my own needs, obviously a new brilliant gallery setting would need to be added to turn this on or off / configure it for general consumption.
In render_brilliant_gallery(), I altered a line in the lightbox case for the overbrowser switch from:
$result .= ' rel="lightbox[' . $setname . ']"';
to:
$result .= ' rel="lightbox[' . $setname . '][<a href="' . $fullimgpath . '">' . $retval[$poct-1] . '</a>]"';
which displays the filename as a link to the actual file for the caption. I realize this sort of breaks the existing caption functionality. If I find time I'll try to integrate it so that's not the case.
Comment #2
GaryA CreditAttribution: GaryA commentedAnother idea is that you can use the code above but with a slight modification to shave off the file extension and make the caption look proper.
This way you get a nice download link and a pretty caption too.
Comment #3
gcstarr CreditAttribution: gcstarr commentedAh, great idea! I've implemented it in my installation.
Comment #4
kretzer CreditAttribution: kretzer commentedI tried to edit this too, but it doesn't work. The download link never appears on any image. Can someone help me with this or send me the edited file?
Comment #5
firepug CreditAttribution: firepug commentedCan you post the version you are using and a copy of the section you have edited?