Page 1 of 1

Mobile version - download an image

Posted: 02 Aug 2012, 16:13
by Patrick_D1985
Hi all :)

Been a while and just got to testing 2.8.1 (yeah I know 2.8.2) just arrived but for the time being I have one issue.
Is there anyway to offer visitors a download on the mobile version?

Have been trying to hack slash my way into it but ... well was wondering if there is an easy way.

Thanks in advance for your replies :)

Re: Mobile version - download an image

Posted: 03 Aug 2012, 02:03
by mjau-mjau
Patrick_D1985 wrote:Been a while and just got to testing 2.8.1 (yeah I know 2.8.2) just arrived but for the time being I have one issue.
Is there anyway to offer visitors a download on the mobile version?
In the Photoswipe interface, with all the javascripts going on, it gets complicated. The easy solution, is to change the "Images" for folder view mode, which would allow download by simply tapping the images.
Image
https://www.photo.gallery/documentation/mobile-guide/
(*See Folder View Mode)

Re: Mobile version - download an image

Posted: 03 Aug 2012, 11:25
by Patrick_D1985
Karl thanks for the feedback!
But as my galleries contain sometimes hundreds of pics that was sadly not a good option for me

I was able to create a nice way to do so with some hack and slashing ... and searching.
Now after spending some hours finding the correct places it is done :)

At first I tried working with the touch event but it was not that reliable (sometimes you needed to double tap, triple tap or single tap to get the actual image)
As it was to unreliable ... well I started looking in a different direction.

In short im abusing the say hi example which you can find in the Photoview examples with a change of:
Code
alert('hi!');
becomes:
Code
var currentImage = instance.getCurrentImage();
window.open(currentImage.metaData.relatedUrl);
Offcourse I needed to make that relatedUrl variable available for the images so I had to edit /iv-includes/templates/mobile/index.html.phtml

Result being:
http://pfsquad.nu/Pictures/?mobile=1#/2 ... +BROADWAY/
(offcourse looks better on mobile devices (iPad/iPhone have been tested)

What did I do:
- Add the slideshow option back (we love that kind of feature)
- As we dont use captions I have disabled the caption toolbar
- Added a line to show the current folder you are in with mention of the photoid
- Added a link (which also works on mobile devices) which you can click to open a new tab with the actual image so you can save it or link to it.

Took me some time to get it working but a nice custom addition :)

If someone could give me feedback on other mobile devices it would be great :D

Re: Mobile version - download an image

Posted: 04 Aug 2012, 03:37
by mjau-mjau
Yup. Seems to work. We will take a closer look ...