Download & Extend

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

Project:Brilliant Gallery
Version:6.x-3.4
Component:User interface
Category:support request
Priority:normal
Assigned:druchris1
Status:reviewed & tested by the community

Issue Summary

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)

Comments

#1

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

Assigned to:Anonymous» druchris1
Status:active» needs review

#3

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

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

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

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

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

#8

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

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

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

#11

Sorry - I gave the wrong line numbers the first time. I've attached a corrected file. The difference is that the change needs to be in the render_brilliant_gallery() function (approx line 860), not in the render_brilliant_gallery_manage() function.

AttachmentSize
brilliant_gallery.module_2.txt 50.49 KB

#12

Assigned to:Anonymous» druchris1

#13

Status:active» reviewed & tested by the community

It works! Thanks.

Will this be included in new releases, or will I need to make the patch with each new release?

In the past 4 days I installed Eclipse-PDT with the Zend debugger so I could single step through the code. Before I started stepping through the code, I thought I'd check the forum once more for an update. I was very pleased to see the solution posted.

nobody click here