I'm trying to make the download link in Lightbox2 available. I'm using Lightbox2 6.x 1.9, which has an option in the Layout settings that's called "Text for original image link". This is the text that will appear as the link to the original file underneath the image in the lightbox.
I want to enable this text so users can download the images displayed through Fastgallery by clicking the download link in Lightbox. Therefore I typed "Download file" in the option in lightbox, without any result. The link is not shown. I read all the documentation from bot Fastgallery and Lightbox but I can't find an answer. Can you help me to find a way to make downloads possible from the lightbox window?
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#14 | lightbox2_formatter.patch | 775 bytes | timaholt |
#14 | lightbox2_module.patch | 509 bytes | timaholt |
Comments
Comment #1
stella CreditAttribution: stella commentedHave you checked the user permissions? Users will need the 'download original image' permission in order for the link to appear.
Having said that, the download original link was intended for use with images uploaded using the 'image' module or the 'imagefield' module, and may not work with Fastgallery images. For those images, it is the fastgallery module that provides the integration iirc, so if correcting the permissions doesn't help, you may need to move this issue to the fastgallery module issue queue.
Cheers,
Stella
Comment #2
KoCo CreditAttribution: KoCo commentedMaybe, it's a bit of topic here.
I had the same problem even with permission set to downloadable.
It was in fact another permission which was also needed:
"Imagefield Module" -> "view imagefield uploads"
Maybe fastgallery also has such a permission to set?
Koen
Comment #3
kuakuak CreditAttribution: kuakuak commentedI have the same problem with imagefield. I'm using the last stable (when possible) versions of everything...
Permission to download original image is granted for all users but the link is only showing to administrator. So I guess some other permission is needed?
Comment #4
KoCo CreditAttribution: KoCo commentedThe problem has risen again.
My former adjustments (#2) worked just fine, until I updated to the latest version of filefield.
Then I discovered the access setting had changed too.
http://drupal.org/cvs?commit=200054
Imagefield switched over to using content_access module.
So installed that one, but no go.
Where and how does Lightbox set the rights to download the original?
line 706 module.inc : if (user_access('download original image') && user_access('view original images')) {
I searched my modules and database. This line is the only reference to the permission I could find.
I believe the old imagefield 'view uploads' or 'image' module use this permission.
But I don't have the image module installed.
Another possible wrong-do'er:
line 187 formatter.inc: if (!empty($download_link_text) && user_access('download original image') && user_access('view imagefield uploads')) {
This one is plain obvious 'view imagefield uploads' doesn't exist any more.
Shouldn't lightbox check permissions in a different way, or at least make sure a certain permission can exist/does exist?
I guess only two/three checks are needed:
_ permission to access the content
_ public files folder
_ download original image
Koen
Comment #5
keesje CreditAttribution: keesje commentedIssue confirmed, subscribing
Comment #6
dicreat CreditAttribution: dicreat commentedsubscribing
Comment #7
iaminawe CreditAttribution: iaminawe commentedIssue confirmed, "Download original image" appears only to administrator regardless of permissions settings
Comment #8
vordude CreditAttribution: vordude commentedHonestly untested, but Here's the way I see it...Line 706 of the dev version of the 6.x module.
The lightbox module isn't supplying the 'view original images' permission. So your users can't see the download link do it, because you can't assign the permission to a role, since it's not on your permissions listing at /admin/user/permissions. I think this must be a permission that comes from the image.module.
So requiring this permission for the download link essentially creates a dependency on the image.module for the download link to work...
The fix?
As I see it:
I'm happy to roll a patch, but need to test first, and was looking for some feedback.
Thanks!
Comment #9
stella CreditAttribution: stella commentedThe download original link is supported only for images provided by the image module and the imagefield module.
In order to see the download link for the image module, users need the 'download original image' permission (supplied by lightbox2 module) and the 'view original images' permission (supplied by image module).
To see the download link for the imagefield module, users just need the 'download original image' permission, since the 'view imagefield uploads' permission has now been removed from the "imagefield" module. I've updated the 6.x-1.x-dev version of the module to fix this.
In both cases, the text configured for the download link on admin/settings/lightbox2 needs to be set.
I've updated the help text on the admin/settings/lightbox2 form so this is made clearer.
Cheers,
Stella
Comment #11
OnlineWD™ CreditAttribution: OnlineWD™ commentedI have lightbox2 1.9, image module is disabled and I have filefield 6.X 3.1. The only option in permissions related to download original is "download original image" under lightbox2. Anonymous users cannot see the link even though they have permission. I as admin can see link though so it is supported but only for admin.
Comment #12
stella CreditAttribution: stella commentedPlease use the latest dev version, see #9 above.
Comment #14
timaholt CreditAttribution: timaholt commentedI've had the same issue and created 2 patches to simply remove the extra permissions checks and rely solely on the 'download original image' permission for this feature. These might be useful for people who don't want to use the dev version but need a fix for above.
Comment #15
stella CreditAttribution: stella commentedAs I said before, fixes have already been committed to the project and are available in the dev version. They will be included in the next official release.
Comment #17
Qandeel CreditAttribution: Qandeel commented@stella --- Download link is not working for imagefields, I am using your latest official release, this fix really got in to the latest release or its still in dev. if possible can you provide patch for it.
Thanks
Comment #20
joseph.olstadfixed in 7.x-2.0
if you want this fix then please upgrade to 7.x-2.0