nanostudio-org / nano_photos_provider2

PHP photos provider for nanogallery2
https://nanophotosprovider2.nanostudio.org/
47 stars 12 forks source link

Albums show all even set as 'moreButton'. #37

Closed jinlaohu closed 3 years ago

jinlaohu commented 4 years ago

I've used nano photos provider2 for a couple months, best in its class, however I have a few problems with nano photos provider2 and can not correct it.

  1. It shows all albums at once, I'd tried to set to another kind but none of it worked for me. Never show pagination whatever i set galleryDisplayMode to any value.
  2. No breadcrumb is showing.

Examples, the way I using nano_photos_provider2 :

head: <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" type="text/javascript"> </script> <link href="https://cdn.jsdelivr.net/npm/nanogallery2@2.4.2/dist/css/nanogallery2.min.css" rel="stylesheet" type="text/css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/nanogallery2/2.4.2/jquery.nanogallery2.min.js" type="text/javascript"></script> ...

body: <span id="pass_var" style="display: none;">gallery_name</span> <div id="gallery_name"></div>

...

and below is script that i wrote as show_album.js


jQuery(document).ready(function() {
   var a;
   a = document.getElementById('pass_var').innerHTML;

jQuery('#' + a).nanogallery2({
    kind: 'nano_photos_provider2',
    dataProvider: '/src/nano_photos_provider2/nano_photos_provider2.php',
    album: a,

    // General
    galleryTheme: {
        thumbnail: {
            background: '#c4a1a6',
            borderColor: '#c4a1a6'
        }
    },
    viewerTheme: 'border',
    thumbnailHeight: 'auto',
    thumbnailWidth: 285,
    thumbnailAlignment: 'center',
    thumbnailGutterWidth: 10,
    thumbnailGutterHeight: 10,
    locationHash: false,

    // Breadcrumb
    breadcrumbHideIcons: false,

    // Effect
    thumbnailDisplayTransition: 'slideUp2',
    thumbnailDisplayTransitionDuration: 500,
    thumbnailDisplayInterval: 100,
    thumbnailHoverEffect2: 'image_scale_1.00_1.20',
    touchAutoOpenDelay: 200,    // tab once 
    thumbnailAlbumDisplayImage: true,   // tab album to show pictures all
    thumbnailDisplayOutsideScreen: false,  

    // Pagination
    galleryDisplayMode: 'moreButton',
    galleryDisplayMoreStep: 2,

    // Gallery transition
    galleryDisplayTransition: 'rotateX',
    galleryDisplayTransitionDuration: 500,

    // Viewer
    viewerDisplayLogo : false
});

});


Thanks for your help.

Kris-B commented 4 years ago

Can you please create a Codepen to reproduce your issue ?

Kris-B commented 4 years ago

You defined a cascading layout, which has no row. Not possible with this layout.