Forums

[resolved] [Plugin: NextGEN Gallery] Navigate through ALL images in gallery not just page (54 posts)

  1. BCBomb47
    Member
    Posted 3 years ago #

    Loving this modification to NextGEN Gallery. Are there any plans to implement this officially in the plugin options? Thanks!

  2. mbrum
    Member
    Posted 3 years ago #

    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.

  3. xmanSK
    Member
    Posted 3 years ago #

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

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

  4. sweigold
    Member
    Posted 3 years ago #

    @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

  5. xmanSK
    Member
    Posted 3 years ago #

    Number of images per page: 9

  6. xmanSK
    Member
    Posted 3 years ago #

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

    Find the lines that look like: ....

  7. ohydro
    Member
    Posted 3 years ago #

    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.

  8. ohydro
    Member
    Posted 3 years ago #

    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

  9. jwcalla
    Member
    Posted 3 years ago #

    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.

  10. benlye
    Member
    Posted 2 years ago #

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

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

    Ben.

  11. vis9
    Member
    Posted 2 years ago #

    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

  12. demonboy
    Member
    Posted 2 years ago #

    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?

  13. sweigold
    Member
    Posted 2 years ago #

    I hope so! I haven't upgraded for exactly this reason...

  14. sweigold
    Member
    Posted 2 years ago #

    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.

  15. theorib
    Member
    Posted 2 years ago #

    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!

  16. Alex Rabe
    Member
    Posted 2 years ago #

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

  17. demonboy
    Member
    Posted 2 years ago #

    Alex, does this update address the issue originally outlined in this thread, or was your response only regarding theorib's post?

  18. dracula385
    Member
    Posted 2 years ago #

    i also experience this problem with blank spaces (nextgen 1.3.6)...alex the link you've gave on google code, i can't manage to figure what exacly to change to prevent blank spaces to build.. So please can u post here what should exaclty to be modified. I use default nextgen gallery.php template. Tnx alex again for making our gallery's powerfull.

  19. dracula385
    Member
    Posted 2 years ago #

    is there enybody that resolved that issue with blank spaces

  20. AceDenghar
    Member
    Posted 2 years ago #

    Hi,

    I really thought this functionality would be available with 1.4.

    As i've already said it with commentaries, it’s very disturbing for visitors who only visit the first page thinking they have seen all the gallery because they arrived at the end of the pic list.... of the first page.

    Will we have a way to have this possibility without modifying code by ourselves ?

    Thanks for all, and all my apologizes for my english,

    Best regards.

  21. sweigold
    Member
    Posted 2 years ago #

    @AceDenghar the functionality appears to be in 1.4, but you have to look for it. I've downloaded and checked RC2, and the option is there. Having said that, it doesn't work for me, but the option is there.

    Go under Options>Gallery and select [More Settings]. Then check add hidden images.

    As I said, it isn't working for me. I haven't had a chance to troubleshoot it and Alex hasn't responded to a comment on his website about it.

  22. AceDenghar
    Member
    Posted 2 years ago #

    Oh Thank you Sweigold !

    I haven't seen this option, and it's working well :)

    But... I'm sorry by the fact it doesn't work for you :(

    I hope you'll get an answer to solve this :(

    Best regards.

  23. Alex Rabe
    Member
    Posted 2 years ago #

    @all I've added this to V1.4.

    As Sweigold mentioned you need to activate it in the options, if there are any problems please open a issue at my google code project

    Thanks

  24. AceDenghar
    Member
    Posted 2 years ago #

    Hi,

    Thanks for all Alex.

    I have noticed that this option isn't available while using IE.

    With Safari, for example, the option is accessible.

    Regards.

Topic Closed

This topic has been closed to new replies.

About this Topic