Forums

[resolved] NextGEN Gallery: Album sort order (12 posts)

  1. Ricky
    Member
    Posted 2 years ago #

    On this page: http://www.sojournvisualarts.com/projects/

    We have [album=all,compact] to display the albums.

    I want to reverse the sort order, so that new albums are on top. How to?

  2. Alex Rabe
    Member
    Posted 2 years ago #

    ngg-db.php line 244

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

  3. Ricky
    Member
    Posted 2 years ago #

    AWESOME THANKS!

  4. MotorChris
    Member
    Posted 2 years ago #

    Sorry to dig up an old thread, but I don't have a ngg-db.php to edit in the newest version. I've tried determining the gallery order in the admin tool, but it doesn't change anything (ascending or descending). I'd really like to have my newest gallery on the top if possible. Can anyone lend a hand?

    I'm using [album id=x] btw, and I'm really happy with the layout, I just want the order reversed.

    http://www.motorfanatic.net/pics/

    Thanks!

  5. bee dudler
    Member
    Posted 2 years ago #

    Hi,
    i dont know if that fits your needs and this only applies to compact albums: http://nextgen.boelinger.com/albumtags/

    best regards
    bee

  6. MotorChris
    Member
    Posted 2 years ago #

    Thanks for the link, and I wish it did fit my needs, but I really don't want to use compact albums and all I would like is the most recent galleries on top. I feel silly because it probably isn't that hard?

    Can anyone else lend a hand?

    Thanks!

  7. bee dudler
    Member
    Posted 2 years ago #

    Hi,
    the ngg-db.php resides now in the "lib" directory an the line to change should be 244.

    best regards
    bee

  8. wpma
    Member
    Posted 2 years ago #

    Hi.
    Anyone know how to do it in 1.3.3?

  9. seattlesubsonic
    Member
    Posted 2 years ago #

    In version 1.3.6 the answer is the same,

    ngg-db.php still resides now in the "lib" directory an the line to change should be 293.

  10. marac-gadgething
    Member
    Posted 2 years ago #

    Hello,

    I did the same but I've sorted it by title ASC.

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

    It works very well also.

  11. tedsikkink
    Member
    Posted 2 years ago #

    hello,

    am looking to modify the sorting order of a number of galletries inside a specific category: example site with xyz categories and inside each several galleries so x1,x2,x3 etc
    how can I move x2 to x1 position?
    hope this is clear
    thx
    reg
    ted

  12. tedsikkink
    Member
    Posted 2 years ago #

    thx fore the rapid feedback! will look into this but looks like something I will have to ask my webmaster to take care of..
    reg
    ted

Topic Closed

This topic has been closed to new replies.

About this Topic