• Hello!

    First let me say thanks for a great plugin. I am running a nightlife photography website at https://www.atlantabarstarz.com and it’s growing rather quickly. My question is on the admin side of things. When managing the galleries and albums, they default to an ascending sort and I can find no way to change this. As I approach 100 galleries this makes for a lot of scrolling when it comes to managing, even with a portrait monitor. Is there an option I missing somewhere or a code change I can make that would put the newest galleries and albums on top?

    Thanks in Advance!
    AtlantaBarStarz.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,
    i don’t know of any option to choose the sort order of galleries and albums in the admin part. Maybe Alex will be so nice to enable this in future releases it seems useful to me.

    For now you can try the following:
    For the sorting newest (highest id) galleries first open
    nextgen-allery/admin/manage.php Attention if you have wordpress 2.5 you have to open the same file in nextgen-allery/admin/wp25 instead.

    In this file there will be only one instance (line 290) of ASC change this to DESC and you’re done

    For the album again choose the file according to your wp version this time its album.php Again there’s only one time ASC (line 130) change to DESC.

    I’ve tried it but not really tested so i can only say it should work, not it will thats what you have see for yourself.

    best regards
    bee

    Thread Starter atlantabarstarz

    (@atlantabarstarz)

    Hey, thanks for the help! I need a little more though. The first edit to manage.php did exactly what I wanted. The second change to album.php only changed the sort order in the dropdown menu of the albums.

    The sort order seems to be defined in the section beginning on line 20 where it talks about sorting the gallery container., I just don’t know what to change it to to reverse the sort.

    Thanks again for the first edit, that helps alot, Now I just need to figure out the second one.

    https://www.AtlantaBarStarz.com

    Hi,
    seems i got you wrong regarding the album part.. you meant the show all toggle of the galleries i dont work with albums that often, now you may try this (assuming you’re in wp25 folder)
    album.php there line 170:
    $gallerylist = $wpdb->get_results("SELECT gid FROM $wpdb->nggallery");

    replace with:

    $gallerylist = $wpdb->get_results("SELECT gid FROM $wpdb->nggallery ORDER BY gid DESC");

    without any testing for unwanted side effects just simple brutal hack again..

    best regards
    bee

    Thread Starter atlantabarstarz

    (@atlantabarstarz)

    You sir, are awesome!

    The show all galleries is now reverse sorted exactly as I wanted, the gallery management is also reversed, and as an added bonus I was able to change the album selector dropdown to be alphabetically sorted, something that I wasn’t really looking for but am very happy to have.

    Maybe Alex will make these selectable options in the next release, that would be awesome.

    Thanks again!
    https://www.atlantabarstarz.com

    Hi,
    You’re welcome! I support this to become a feature some day.

    best reagrds
    bee

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: NextGEN Gallery] Reverse the Sort Order or Galleries and Albums in Admin?’ is closed to new replies.