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.
I would like to force an image to automatically download when a user clicks the "Download Original" link in the lightbox. How can I make this happen? I have set-up a php file to force the downloads and have set-up an
Also, I have been weeding through the CSS files to determine where to change the font color for this text, and it appears to be located here: #imageData #lightbox2-node-link-text { But when I add a font color to this, it does not reflect that change. Is there somewhere else I should change it? Thanks for your help!
Comment | File | Size | Author |
---|---|---|---|
#3 | 7.x-1.x-Download-link-force-automatic-download-1394316-3.patch | 832 bytes | joseph.olstad |
Comments
Comment #1
joseph.olstadall that is needed is to add download='' to the anchor, javascript built into drupal handles the rest.
While in there, not needed but might as well, change to use the drupal link function (the l function aka l() )
see commit message
Comment #3
joseph.olstadFor 7.x-1.x users, you can use the attached patch
For 7.x-2.x users, upgrade to the latest version of 7.x-2.x , I will tag a new release for this. or if you are on 7.x-2.x and dont want to upgrade you can patch with this patch
Comment #5
joseph.olstadsee explanation by w3schools , the download attribute is part of html5
http://www.w3schools.com/tags/att_a_download.asp
Comment #6
joseph.olstadComment #10
joseph.olstadThis change might have caused a regression, looking into it now.