jsymonkj / pwi

Automatically exported from code.google.com/p/pwi
0 stars 0 forks source link

showPhotoDownload: true #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set showPhotoDownload to true
2. View page - nothing changes.
3.

What is the expected output? What do you see instead?

I'm trying to get it so that there is a link for users to download the image.

What version of the product are you using? On what browser and version and 
operating system?

1.3

Please provide any additional information below.

I've upgraded a version from 1.3. First I tried using the slimbox setting for 
this but it failed 
(http://code.google.com/p/slimbox/wiki/FAQ#Is_there_a_way_for_the_visitors_of_my
_website_to_save_the_images). I then visited the pwi site and discovered how 
out of date it was and that the new version had a setting for it but I can't 
get it to show.  

Original issue reported on code.google.com by NigelCro...@gmail.com on 2 Dec 2010 at 5:01

GoogleCodeExporter commented 9 years ago
I have the same problem, no download link shows despite showPhotoDownload set 
to true.

Is there a solution please?

Original comment by adwo...@sensibleweb.co.uk on 7 Feb 2011 at 11:49

GoogleCodeExporter commented 9 years ago
I have found a temporary solution.
For some reason part of the code in jquery.pwi.js has been commented out.

I changed it from this:
//if(settings.showPhotoDownload){$c += "download";}

to:
if(settings.showPhotoDownload){$c += "<br /> Right click here to download";}
 and it works.
However browsers have to right click the link and 'Save Target as', so it is a 
bit clumsy really.
I also gave the bottom margin extra space to allow for a caption line and the 
download link line:

thumbCss: {'margin': '5px 5px 30px 5px'}

I hope the programmer will fix it to downlaod properly in one left click.

Original comment by adwo...@sensibleweb.co.uk on 7 Feb 2011 at 1:46

GoogleCodeExporter commented 9 years ago
Well done but this isn't ideal for me... 

It's just a new link to open the gallery. Ideally I would like a download link 
directly to the file under the large image when it's displayed in full. The 
same way that slimbox does when you turn the setting in that on without pwi. 
That would be fine even if it just opens it in a new window or tab for them to 
save it from. Obliviously the ideal would be for it to actually give you a save 
but but I know thats hard work.

Original comment by NigelCro...@gmail.com on 7 Feb 2011 at 2:53

GoogleCodeExporter commented 9 years ago
Ok after looking at what was done above I've managed to insert my own link. 
This is not perfect and does not use the showPhotoDownload option but its 
better than nothing or the option above.

In the line above 
//if(settings.showPhotoDownload){$c += "download";}

I've inserted a link into the target. I'm sure there are much better ways 
though. Possibly making it work with the one built into slimbox.

I've changed line 87 from

        $html.append("<a href='" + $img_base + "?imgmax=" + settings.photoSize + "' rel='lb-" + settings.username + "' title='" + $d + "'><img src='" + $img_base + "?imgmax=" + settings.thumbSize + "&crop=" + settings.thumbCrop + "'/></a>");

to

            $html.append("<a href='" + $img_base + "?imgmax=" + settings.photoSize + "' rel='lb-" + settings.username + "' title='" + $d + "<a href=" + $img_base + " target=_blank>Download image</a>'><img src='" + $img_base + "?imgmax=" + settings.thumbSize + "&crop=" + settings.thumbCrop + "'/></a>");

Original comment by NigelCro...@gmail.com on 7 Feb 2011 at 3:01

GoogleCodeExporter commented 9 years ago
Photo download has been added to the latest version in SVN. It adds a link to 
the title in FancyBox and SlimBox to let the user download the picture. It uses 
the download link provided by Picasa, so you get the "Save" dialog instead of 
opening the iame in another window.

Original comment by borkh...@gmail.com on 30 Jul 2011 at 10:08