Fancybox with touch/swipe support (Photoswipe)

Everything to do with Popus for Admiror Gallery.
Message
Author
catsix
Posts: 6
Joined: Wed Jan 16, 2013 9:58 pm

Re: Fancybox with touch/swipe support (Photoswipe)

#11 Post by catsix »

Sweet, thanks for your time and anwsome gallery!

Admiror Gallery 5 - Fundraising Campaign

x10dd
Posts: 4
Joined: Sun Aug 25, 2013 2:25 am

Re: Fancybox with touch/swipe support (Photoswipe)

#12 Post by x10dd »

Hi everybody, I've successfully installed the Photoswipe popup but it works only on the first instance of the Admiror Gallery.

In fact I have an article with such content:

Title 1
{AG}images/2013/08{/AG}

Title2
{AG}images/2013/07{/AG}

Title3
{AG}images/2013/06{/AG}


etc.

and the photoswipe is only working on the first instance of AG (images/2013/08), while on the others if I click on a picture it opens normally in a new window instead of using photoswipe!

Can you please help on that?

Many thanks,
MR

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Fancybox with touch/swipe support (Photoswipe)

#13 Post by Vasiljevski »

Well there is one part missing.

In index.php:

Code: Select all

// Insert JavaScript code needed to be loaded after gallery is formed
$this->popupEngine->endCode = '	
<script type="text/javascript">
    (function(window, PhotoSwipe){		
        document.addEventListener(\'DOMContentLoaded\', function(){
            var options = { enableMouseWheel: false , enableKeyboard: false },
            instance = PhotoSwipe.attach( window.document.querySelectorAll(\'#AG_01 a\'), options );
        }, false);
    }
    (window, window.Code.PhotoSwipe));
</script>		
';
As you can see we search only for AG_01 and this is wrong.
Here is the code with fix applied:

Code: Select all

// Insert JavaScript code needed to be loaded after gallery is formed
$this->popupEngine->endCode = '	
<script type="text/javascript">
    (function(window, PhotoSwipe){		
        document.addEventListener(\'DOMContentLoaded\', function(){
            var options = { enableMouseWheel: false , enableKeyboard: false },
            instance = PhotoSwipe.attach( window.document.querySelectorAll(\'#AG_' . $this->getGalleryID() . ' a\'), options );
        }, false);
    }
    (window, window.Code.PhotoSwipe));
</script>		
';
Now it should work OK.
Help Admiror Gallery become even better,
give us a review on JED

x10dd
Posts: 4
Joined: Sun Aug 25, 2013 2:25 am

Re: Fancybox with touch/swipe support (Photoswipe)

#14 Post by x10dd »

Now it works perfectly! Thanks a lot!

Good night

MR

demfilz
Posts: 2
Joined: Mon Mar 17, 2014 5:08 am

Re: Fancybox with touch/swipe support (Photoswipe)

#15 Post by demfilz »

any chance this will work with the new version 5 and joomla 3 ?
I've copied to the popups folder and selected in config, it just display opens image in a new tab

Admiror Gallery 5 - Fundraising Campaign

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Fancybox with touch/swipe support (Photoswipe)

#16 Post by Vasiljevski »

I don't know, never tested, but it should work the same as here. Maybe some changes should be made, not sure.

It is possible that some JS script on your site breaks the photo-swipe in some way. Can you check that there is no javaScript error on you page?
Help Admiror Gallery become even better,
give us a review on JED

demfilz
Posts: 2
Joined: Mon Mar 17, 2014 5:08 am

Re: Fancybox with touch/swipe support (Photoswipe)

#17 Post by demfilz »

no errors that I can see, I have display php errors on, and checked sites error_log files

x10dd
Posts: 4
Joined: Sun Aug 25, 2013 2:25 am

Re: Fancybox with touch/swipe support (Photoswipe)

#18 Post by x10dd »

Hi everybody,
I've installed photoswipe as popup in my Admiror Gallery but when I click on a Album - often happens using tablet or smartphone browser - it stucks in a black page; only if I try to go back and forward it loads correctly the album's pictures and then here I can view them in fullscreen with swipe feature.

This issue is quite annoying. Can you please look at my site to this URL: http://www.marcorenzi.it/gallery.html. Please use a mobile device and try to look into an album.

I hope you can find a solution to that since photoswipe is fitting very well the mobile devices visualization using Admiror Gallery.

Thanks MR

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Fancybox with touch/swipe support (Photoswipe)

#19 Post by Vasiljevski »

Sorry for a late replay.
I checked your website, and I don't see any issues, did you solved the problem?

Anyway, good website, and even better integration of AdmirorGallery :)
In case I ever make a list of top integrator, I would like to add your page if you don't mind.
Help Admiror Gallery become even better,
give us a review on JED

Admiror Gallery 5 - Fundraising Campaign

x10dd
Posts: 4
Joined: Sun Aug 25, 2013 2:25 am

Re: Fancybox with touch/swipe support (Photoswipe)

#20 Post by x10dd »

Hi Vasiljevski,
the problem is not solved (the photoswipe plugin popup was not enabled at the time of your visit).

Now I've enabled again the photoswipe plugin popup. Can you please have a look using smartphone and pc browser? on both the behavior is not the one as expected (using the smartphone I got a lot of problems... :| )

Thanks a lot

PS: I'll be glad to be added in your top integrators! :-)

Post Reply