right click image download

Is it possible to allow users to download the full image when using the zpBootstrap theme and the image is presented from infinitescroll and clicking on the image (i.e. the full size image).

I want to allow right click on the image and download.

I have tried all combinations of the 2 Options > Images > Full image protection settings and don't notice any difference - nothing happens on right click on image

I can save any of the thumbnails

Thanks

Comments

  • fretzl Administrator, Developer
    edited February 25

    Correct me if I'm wrong but I believe your full images are displayed in the FancyBox lightbox.
    Well, it's a FancyBox setting.
    In inc_header.php add this at the end between the <script> tags, starting at line 100.

    $("[data-fancybox]").fancybox({
        protect: false, // Allows right-click
        clickContent: false // Disable zoom
    });
    
  • acrylian Administrator, Developer

    And to note this Fancybox usage is uniquely built into that theme.

  • Thanks - I added this at line 120 just before the closing but it made no difference.

    I cleared the cache on my browser - is there anything else I should do to see the difference?

    P.S. I am using zpBootstrap because I want a responsive webpage. I don't need the fancybox but I like the idea of a page of thumbnails and the ability to see any full size image and then from there to scroll all the full size images if desired.

    Is there another theme for me that is better supported (updated) that you suggest?

  • acrylian Administrator, Developer

    Zenphoto by default uses the image page to show a resized large image and not really the full sizes (which can be quite heavy).

    I think I already posted this link on one of the other topics that includes some of the third party themes:
    https://www.zenphoto.org/news/deprecated-themes-some-clarifications-and-recommendations/

    The best is always to create your own to cover all your requirements and wishes as a ready made one likely never will ;-)

    We know there are too few good and responsive themes for Zenphoto but if no one creates some more and alos maintains them that will not change…

  • fretzl Administrator, Developer

    My bad, try to put the code right after line 117.

  • Thank-you very much! That fixed it right up - sorry I am not a programmer or I should have known where to put the code :)

  • I just noticed that it doesn't quite give me the behavior I want.

    I can right click to download but now once I enter the fancybox it only scrolls images to the end of the page that the selected image was in and doesn't wrap.

    Without that option I am able to infinite scroll through all the images then click on any image and scroll through all the larger images (that have been scrolled on the album thumbnail page) and wrap around at the end back to the beginning and keep going, infinitely :)

    Do you know if this is an either or ?

  • fretzl Administrator, Developer
    edited February 26

    Just found that there is a specific FancyBox configuration file:
    <theme folder>/js/zpB_fancybox_config.js

    So, forget about adding code to inc-header.php.

    Instead, change line 13 in zpB_fancybox_config.js to
    protect : false,.

  • Thank-you for finding that.

    That did it - all good now!

Sign In or Register to comment.