Is Brilliant Gallery - Lightbox2 capable of allowing user to download original image

icesurfer - September 9, 2009 - 23:30
Project:Brilliant Gallery
Version:6.x-3.4
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

When I click on the thumbnail to view an image using Lightbox2, I can see the file name of the original image, however, I see no link that will allow the user to download the original image. I thought I configured LightBox2 to allow that capability. Is this possible with this pair of modules (I'm using the 'recommended' release for 6x of both modules)

#1

druchris1 - September 10, 2009 - 02:24

You have to change the code of BG. Try this:

brilliant_gallery.module:
line 448 original:
$displayimage .= ' rel="lightbox['. $setname .']"';

new:
$displayimage .= ' rel="lightbox[' . $setname . '][<a href="' . $fullimgpath . '">' . $caption . '</a>]"';

Should give you a link to the image with the caption as the text.

#2

druchris1 - September 10, 2009 - 02:25
Assigned to:Anonymous» druchris1
Status:active» needs review

#3

icesurfer - September 10, 2009 - 02:30
Assigned to:druchris1» Anonymous
Status:needs review» active

Thanks. I'm new to drupal so I'm wary of hacking the modules at this time.

I found a way to get the high resolution image without modifying the module (although it requires the user to do a right-click). I set the maximum image width to 5000. When the thumbnail is clicked, I get a medium resolution image, if I expand that using the 4-outward-pointing-arrows icon the high resolution image is shown in a new window. The user can then right click and save the image. This should work for my tech-savy users until I have the courage to hack the module code.

(Nice to get such fast response to a question!)

#4

icesurfer - September 11, 2009 - 04:53

I made the change but there is still no link in the lightbox. I cleared the cache... do I need to do something else to see the change occur?

#5

druchris1 - September 12, 2009 - 02:09

SOrry didn't notice some other things:

you need to insert this at line 745 (before the switch ($overbrowser) { line):

if ($showcaption <> '' && $showcaption <> 'filename') {
     $caption = $showcaption;
}

#6

icesurfer - October 6, 2009 - 23:14
Title:Is Brillian Image - Lightbox2 capable of allowing user to download original image» Is Brilliant Gallery - Lightbox2 capable of allowing user to download original image

I have made both changes on both my public and test website. I still don't have an option to download the original image. Could I be missing a security setting? (I have tested as user 0 as well as authenticated and anonymous users with the same results)

#7

druchris1 - October 6, 2009 - 23:56

Is there a URL you can give out so we can look at what you've got?

#8

icesurfer - November 30, 2009 - 03:03

Sorry for the slow reply, other projects have taken priority this month. Now I'm back to working on my drupal site again. Please see Brilliant Image in use here: http://www.dasselambassadors.com/node/7

(I have the 6.x-3.6 release running on my localhost testbed, and I don't get a link to the original photo using the 3.6 release either)

#9

druchris1 - December 1, 2009 - 01:23

No link because it's not showing up in your code. Maybe attach your brilliant_gallery.module file here so we can take a look?

#10

icesurfer - December 7, 2009 - 03:23

I have attached my current brilliant_gallery.module. It is the same as the 6.x-3.6 module (square thumbnails) with the exception of line 448. I had to add a .txt extension so I could upload it to this site.

AttachmentSize
brilliant_gallery.module.txt 50.42 KB
 
 

Drupal is a registered trademark of Dries Buytaert.