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

gcstarr’s picture

OK, 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.

GaryA’s picture

Another 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.

 $friendlycaption = substr($retval[$poct-1],0,-4);
 $result .= ' rel="lightbox[' . $setname . '][<a href="' . $fullimgpath . '">' . $friendlycaption . '</a>]"';

This way you get a nice download link and a pretty caption too.

gcstarr’s picture

Ah, great idea! I've implemented it in my installation.

kretzer’s picture

Version: 5.x-4.1 » 6.x-3.6

I 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?

firepug’s picture

Version: 6.x-3.6 » 6.x-4.x-dev

Can you post the version you are using and a copy of the section you have edited?