Forums

[resolved] [Plugin: NextGEN Gallery] nggtags "next page" links broken (2 posts)

  1. mbrum
    Member
    Posted 3 years ago #

    I wrote a really simple PHP gallery organizer to help display and keep track of my various galleries that are powered by NextGEN Gallery (which I really like).

    Here: http://mikebrum.com/photo-galleries/

    When you go into a gallery that has more than one page (such as the "macro" gallery, the next page links at the bottom point to some bogus destination and I have no idea what's wrong or where it's pulling that information from.

    If it's pertinent, the galleries themselves are being generated with the [nggtags gallery="gallery"].

    Anyone have any idea what I can either do or what might be broken that's preventing the pagination from working??

  2. mbrum
    Member
    Posted 3 years ago #

    Finally figured out my problem.

    I thought the issue was that the link that was being generated was all confused. This wasn't the case. Even though my permalinks are /%postname%/, the link that's being created by NGG is still valid (which I didn't know until now).

    The only issue was that the query string wasn't being passed through to the final page to pull the pertinent gallery info.

    I added the following lines of code to lib/rewrite.php right after section "5" before $url gets returned :

    // 6. If There's A Query String, Pass That Too
     if (isset($_SERVER['QUERY_STRING'])) {
       $url .= "?".$_SERVER['QUERY_STRING'];
     }

    Everything appears to be working now.

Topic Closed

This topic has been closed to new replies.

About this Topic