WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
multiple galleries with multiple pages (9 posts)

  1. hosstito
    Member
    Posted 3 years ago #

    Hi,

    I'm using wordpress 3.0.1 with NextGEN Gallery 1.6.2 and jQuery Colorbox 3.6.

    Basically, I have a page with multple galleries on the same page, each one has multiple pages, and for each one I am only displaying 10 thumbnails. There is the page nav at the bottom of each gallery.

    My questions are:
    1) is there an easy way to make it so that when you click to the next page of one gallery, it doesn't also switch pages for the other galleries on the page? It adds &nggpage=X to the URL when you change pages, so I was thinking of trying to add in another one like &nggalleryid=X, but before I got down and dirty with the PHP, I figured I'd ask you guys first.

    2) semi un-related, when going into a jQuery slide show with one of the aforementioned galleries, it only scrolls through the 10 images who's thumbnails are displayed on the page at that time. So if you're on page 2, it'll show you images 11-20. I was trying to make the slideshow go through all the images in the entire gallery but haven't had any success thus far. Any suggestions for this?

    Thanks in advance for any advice! :)

  2. arbito
    Member
    Posted 3 years ago #

    I also have the problem with multiple galleries on a single page each with their own navigation. Choosing a gallery page affects all galleries. Frustrating. I'm hoping somebody has an answer.

  3. Meginoz
    Member
    Posted 3 years ago #

    1) I have the same problem. Really hope someone can come up with an answer to this soon.

    2)Go into Options>Gallery and tick the "Add hidden images" box.

  4. Augusto
    Member
    Posted 3 years ago #

    Same problem here...
    Any idea?

  5. Lynn
    Member
    Posted 3 years ago #

    That is one of the (numerous) annoying things about NextGen. What you do to one gallery on a page affects the other gallery or galleries on a page.

    My workaround was to create an Album and put my Galleries into it. That has its own annoying drawbacks, like you cannot sort the order in which Galleries are listed under the Album except by modifying the NextGen lib/ngg-db.php file to change the default sort order (by Gallery ID) to alphabetical, or to change ASC to DESC. Pretty limited because there is no way to drag and drop a sort order. But at least when you use an Album each Gallery in it then behaves independently.

    The names are just plain dumb, so to be clear an Album is the big container and the Galleries are the smaller ones, each of which contains your images. The naming should be the other way around.

    But at least by inserting an entire Album, I was able to get Galleries to behave independently of one another.

    The shortcode for putting an Album into a page is of the form:
    [album=2 template=extend]
    Where I have "2", enter the ID of the Album you created. The template choices are "extend" (a horizontal list that allows a description and shows a bigger thumbnail) and "compact" (a vertical display of smaller thumbnails).

    When you click on one of the Galleries listed on the page where you inserted the Album shortcode as above, you get a page with just that Gallery and its thumbnails or slideshow with whatever effects you have chosen. It behaves just like a page with a single Gallery on it. To make sure folks get back to the page where you inserted the Album, you can add a link at the top, above the [album] shortcode, e.g, "Back to Portfolio" linked to the page where you inserted the Album.

    Here's a nice little video on creating an Album and dragging Galleries into it:
    http://www.lenashore.com/2010/03/wordpress-tutorial-nextgen-albums-creating-and-publishing/

  6. labres
    Member
    Posted 3 years ago #

    artsmo, could you tell me in more detail how to change the default sort order to DSC in the ngg-db.php file. I am not sure just where in the file to make a change, and what to change. I am familiar with PHP but not familiar enough to know when I am changing the correct thing.

  7. Lynn
    Member
    Posted 3 years ago #

    You'll find the answer from Alex Rabe himself on this forum page:

    http://wordpress.org/support/topic/nextgen-gallery-album-sort-order
    He instructs on how to reverse the default sort order of galleries in an album so that the last one is dislayed first.

    In: ngg-db.php line 244

    $album->sortorder = serialize( $wpdb->get_col("SELECT gid FROM
    $wpdb->nggallery ORDER BY gid DESC") );

    Just look for that line; I think that the only thing changed is the ORDER BY value, which is changed to DESC from the default ASC I think.

    Someone else on that forum page describes a change to sorting by NAME:

    $album->sortorder = serialize( $wpdb->get_col("SELECT gid FROM
    $wpdb->nggallery ORDER BY name ASC") );

    I beleieve that the ngg-db.php file is in the lib folder.

    I should note that I researched this but I don't recall the steps I took in actually implementing it. I assume they matched what I found on the forum page in the link above.

    Best of luck.

  8. labres
    Member
    Posted 3 years ago #

    Thanks much. I found the line to change at line 333 in version 1.7.4. I added "ORDER BY title DESC" to line 333 to get this as the final line:

    $album->sortorder = serialize( $wpdb->get_col("SELECT gid FROM $wpdb->nggallery ORDER BY title DESC") );
    Then I added an incremented number in front of the gallery title each time I created a new gallery.

  9. Lynn
    Member
    Posted 3 years ago #

    "Then I added an incremented number in front of the gallery title each time I created a new gallery."

    That is a smart and simple way to control order. Thanks for the idea.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.