• Resolved Steve Weigold

    (@sweigold)


    Nextgen Gallery 1.0.2

    Love the gallery Alex! Upgraded from 0.99. I had made a modification in that version from some information posted online. The modification made changes to nggfunctions and added a function and made some slight changes to the nggCreateGallery routine. The results allowed the user to use the previous and next links to move through all of the images in the gallery, not just those shown on a particular page. I have my number of images per page set to 4 because I don’t want my posts overloaded with thumbnails. Some of my galleries have hundreds of images.

    I hoped that the new version would have added this type of navigation as a feature, but it doesn’t. I’ve reviewed the new nggCreateGallery routine, and even tried to make some changes but it didn’t work, so I guess I’ll have to try harder.

    Has anyone else tried the modification on the newest version, or is there a feature in the new version to do this that I haven’t seen yet?

    Thanks!
    Steve

Viewing 15 replies - 31 through 45 (of 53 total)
  • Something odd …

    I’m using NGG but I’m using the nggtags shortcode for all image displaying on my site. This seems to be a very “ignored” function in terms of options. For instance, the sort order in the options doesn’t apply to an nggtags gallery as far as I can tell.

    That said, when I implement the code changes above, I got REALLY strange behavior because you’re pulling images from a over the place – thus their IDs don’t necessarily correspond to any gallery in particular – and thus they can quickly become out of the range of the $start and $maxElement variables.

    On a hunch, I added the following line above the foreach code in nggfunctions.php and it’s working well for me:

    $picturelist = array_reverse($picturelist);

    This benefits me in two ways:

    1) it gives me the ideal sort order (newest images are displayed at the beginning of the gallery)

    2) this seems to make the image IDs more “compatible” with the expected values of $start and $maxElement for any given page.

    I’d love to see the nggtags functionality built out to be more robust.

    Not working correctly for me ?? it only shows all images in one page.

    https://ba.iwaldorf.sk/siestacky-cirkus-062007

    Thread Starter Steve Weigold

    (@sweigold)

    @xmansk

    Go into the Gallery-options menu, and check the setting of “Number of images per page:” I think it defaults to 0 which will show all the images on one page. You need to set this to however many images you want per page.

    Steve

    Number of images per page: 9

    I make this modifications:
    #1 – In nggfunctions.php

    Find the lines that look like: ….

    Same problem as xmanSK. I’m using nextgen gallery version V1.2.1 – 22.03.2009.
    After modifiyng nggfunctions.php all images comes in one page and copies of them in second page, and so on, despite in gallery options “images per page” set to 20 and my album has 31 image. So, after modification page 1 shows 31 and page 2 shows same 31 images.

    oh, got it. i was using template=caption, so the sweigold changes of step 3, should be done in file “view/gallery-caption.php”, not in “gallery.php”. i’m glad i solved the problem. btw thanks sweigold for whole work

    This is a great little feature and something that really helped me! Thanks for posting it.

    The only suggestion I’d make is that for large galleries (like hundreds of photos or whatever), it’s going to place an img link to every single thumbnail in the set, even the ones not displayed on the current page. My browser downloads each one of these images and when there are hundreds it can slow load times down.

    My workaround was to add an if-case and only print out the img link if it’s one of the thumbnails to be displayed on the current page.

    So in step 3, in gallery.php, directly after sweigold’s changes, there is this code:

    <div class="ngg-gallery-thumbnail" >
    
       <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >
    
          <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> />
    
       </a>
    
    </div>

    and I changed it to this:

    <div class="ngg-gallery-thumbnail" >
    
       <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >
    
       <?php if ( $image->imageHidden == 0 ) { ?>
    
          <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> />
    
       <?php } ?>
    
       </a>
    
    </div>

    Hope that helps somebody.

    @sweigold
    Excellent modification – thanks very much for documenting it.

    @jwcalla
    Very nice mod to the mod, it helped me!

    Ben.

    Hi! I love this gallery, thank you Alex ?? and I find the mod of Steve very useful, you made a nice job! Does it work even with the last update of the plugin (1.3.3)?

    I tried but I couldn’t make it work… I’m totally noob so it’s probably up to me!

    Giacomo

    I noticed people are still making these changes to NextGen, and every time I upgrade I have to go through the same procedure again.

    @alex, will you be implementing some kind of upgrade that will allow all this to be done in one click please?

    Thread Starter Steve Weigold

    (@sweigold)

    I hope so! I haven’t upgraded for exactly this reason…

    Thread Starter Steve Weigold

    (@sweigold)

    Everyone, thanks for the kind words of thanks. It makes it worth spending time on.

    @jwcalla – thanks for that mod. I haven’t tried it yet, but I plan too. I noticed the thumbnail load issue on my sites as well as many have hundreds of images.

    Hi guys,

    This new implementation to view all the gallery images in a lightbox is awesome! I downloaded the code for the latest beta of NextGen gallery (1.4.0a) that contains it to see many pleasant surprises!

    I have one suggestion though that would really make this implementation more solid. I don’t know if here is the right place to post it and I’m a newbie who doesn’t know much of PHP, otherwise I would do it myself but here it goes:

    As a final result for the implementation, instead of getting a:
    <div class="ngg-gallery-thumbnail" style="display: none">

    We should be getting the "display:none" for the parent element, the div.ngg-gallery-thumbnail-box. It would look something like:
    <div id="ngg-image-x" class="ngg-gallery-thumbnail-box" style="width:x; display: none;">

    I’m suggesting this, because otherwise, all CSS from the parent div.ngg-gallery-thumbnail-box like margins, padding, etc still show up for the hidden images in a gallery though there are no thumbnails leaving the layout with weird unwanted blank spaces.

    Any thoughts? I don’t know how to implement this.
    Thanks everyone for the effort and hope this tip helps!

    Thanks for the note, I’ve updated the code : https://code.google.com/p/nextgen-gallery/source/detail?r=605

Viewing 15 replies - 31 through 45 (of 53 total)
  • The topic ‘[Plugin: NextGEN Gallery] Navigate through ALL images in gallery not just page’ is closed to new replies.