1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Responsive - image slider for attachments

Discussion in 'XenForo Suggestions' started by Kintaro, Jul 5, 2015.

  1. Kintaro

    Kintaro Well-Known Member

    In responsive view When an attached image is tapped a new tab is open. How about a slider so the user don't have to close tabs but simply slide left/right to see the prev/next image?
     
    kralseyit66 and rafass like this.
  2. Rob

    Rob Well-Known Member

    I think the default xenforo image viewer supports device swipes, i might be wrong..... so this should be implementable.
    I'm fairly sure the image viewer is invoked on my mobile though already?
     
  3. Kintaro

    Kintaro Well-Known Member

    In my iOS chrome and safari is not working.
     
  4. Martok

    Martok Well-Known Member

    For attached images, if you click on the thumbnail of the attachment, it opens in the default image viewer (overlay). If you click in the URL for the attached image, it opens in a new tab (as you are viewing the image on its own). This applies on all devices.

    When using the image overlay, there are left and right arrows to click on to move you to previous and next images.
     
  5. Martok

    Martok Well-Known Member

    I've just tested this with Chrome and Safari on iOS 8.3 and the image overlay works as expected.
     
    Rob likes this.
  6. Rob

    Rob Well-Known Member

    Is it touch enabled @Martok? ie... can you swipe between images? From memory, I think it is....
     
  7. Martok

    Martok Well-Known Member

    Obviously it's touch-enabled if you can use it on a mobile device. ;) It isn't swipe-enabled though, I tried that. You have to tap on the arrows or the mini-thumbnails at the bottom of the overlay.
     
  8. Rob

    Rob Well-Known Member

    Yeah, i meant swipe enabled. :) I've seen some image viewers that support swipe so I'd expect the xenforo one will get that in 2.0 :)
     
  9. Kintaro

    Kintaro Well-Known Member

  10. Martok

    Martok Well-Known Member

    I tested on an iPad and the image lightbox always showed. I also tested on an Xperia Z1 Compact phone and an Xperia Z3 tablet and they were fine.

    Does the lightbox show if you use your device in landscape?

    Interestingly I've just been having issues with this using Chrome on Mac OS X Yosemite. When I open the browser and go to that thread, the images display in the lightbox. If I then maximise the browser (so it displays on its own desktop) and test, the images still open in the lightbox. If I then unmaximise it again, the images open in a lightbox. However if I then refresh the page, the images open in a new tab no matter the size of the browser window unless I maximise it again, after which the lightbox works (but only when maximised).

    I wonder if this is a bug?
     
  11. Mike

    Mike XenForo Developer Staff Member

    The lightbox isn't used for devices with a height of less than 500px. This is mostly because of the navigation, which would make it fairly unusable. I'll assume this suggestion is still valid then, though perhaps not using the standard lightbox.

    I can't reproduce your specific issue and I can't say I really see any reason for it.
     
  12. Martok

    Martok Well-Known Member

    I've just been testing this and you are right, it was down to the browser height. Chrome just so happened to be less than 500px when un-maximised and Safari was more than 500px. Once I started playing with the heights I noticed this was the case.

    I wasn't sure if it was a bug or not when I saw this, because if you resize the browser height to less than 500px when lightbox is open, it resizes the lightbox to fit (though it doesn't appear once you refresh the browser). However I understand why this is the case now.
     
    Mike likes this.
  13. Kintaro

    Kintaro Well-Known Member

    is it possibile to change it in ACP or I need a core hack to test it at 480px (or 460px for iPhone4s for example)?

    thank you
     
  14. Mike

    Mike XenForo Developer Staff Member

    You would need to modify the JS directly.
     
  15. Kintaro

    Kintaro Well-Known Member

    done, I can see it working well on a iphone4s, but I had to lower from 500px to 370px to activate it.

    I think is really handy, Mike, can I ask why you found it fairly unusable?
     
  16. Kintaro

    Kintaro Well-Known Member

    Glockie and rafass like this.

Share This Page