Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter mbrum

    (@mbrum)

    I have no idea. I would think if you don’t have access to editing the file, then you wouldn’t have file permissions even if you find a plugin that lets you edit files in the plugin directory.

    I just ssh’ed into my host and edited it in place.

    If you don’t have SSH access, then you can try downloading the plugin, unzipping it, making the changes locally, then FTP’ing the file to your server.

    If you’re able to do even that, then you might want to ask your site admin if they can help.

    A-yup.

    This is likely due to the database’s auto increment column type. Even though you might delete everything in the column, it’s going to continue with the next value after that. In effect, it keeps state regardless of what you delete.

    If you identify the table in question that stores this data (I don’t have time to go digging right now), you can reset the auto increment value to be 1 plus the largest value in the table:

    ALTER TABLE tablename AUTO_INCREMENT = 1

    Beyond that, if it works the way I’m assuming, you’re SOL.

    If you’ve made local code changes in the plugin files themselves, those will get overwritten.

    If you’re talking about changes that you’ve made in configuration in the WP admin, then that stuff doesn’t get overwritten when you upgrade.

    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.

    Thread Starter mbrum

    (@mbrum)

    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.

Viewing 6 replies - 1 through 6 (of 6 total)