Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorShawn
    • CommentTimeMar 31st 2006
     
    I am having a problem with the album order. I have searched the forums and found similar issues but not a fix or a work around for this.

    I have created the albums in order (i.e.) gallery name 1, gallery name 2, ect... and imported the images into these albums in order but when I view the gallery everything is all out of whack...

    Take a look: http://www.jeffgordonrules.com/gallery/index.php?level=collection&id=2

    I found what I thought was a fix in another thread saying to replace the original code with:

    $sql = "SELECT * FROM `".$TABLE_PREFIX."collections` WHERE id IN ($imlist) ORDER by `name` LIMIT ".$from.",".$config["thumb_num"];

    but this did not work. Is there any way to order the albums? I have even went as far as creating new albums in reverse order, using a number in front of the album name, ect... but nothing seems to be working...

    This is an awesome script but this one small ??bug? is driving me nuts I can read code to a point and figure some stuff out but to try and find this myself is pointless


    PLEASE HELP!!!
    •  
      CommentAuthormike
    • CommentTimeMar 31st 2006 edited
     
    What order to you want the albums to appear in? Alphabetical A-Z?
    • CommentAuthorShawn
    • CommentTimeApr 1st 2006 edited
     
    Either alphabetical or in the order I created the albums. I have even went as far as to try and just change the album name to a number and that did not work either.

    I have 30 albums of funny cars and something along the lines of 20 albums of NASCAR images and thats just the start of the photo gallery..

    I'd like to have them order Funny Cars - 1 , Funny Cars ?? 2 , Funny Cars ?? 3 , ect...
    and when I get them uploaded Nascar - 1 , Nascar -2 , Nascar - 3 , ect...

    Thanks
    •  
      CommentAuthormike
    • CommentTimeApr 1st 2006 edited
     
    Line ~582 of gallery.php

    $sql = "SELECT * FROM `".$TABLE_PREFIX."collections` WHERE id IN ($imlist) LIMIT ".$from.",".$config["thumb_num"];

    Change to:

    $sql = "SELECT * FROM `".$TABLE_PREFIX."collections` WHERE id IN ($imlist) ORDER BY `name` DESC LIMIT ".$from.",".$config["thumb_num"];

    I know this is the code you tried, but you need to try again because this is the only line of code which controls the order in which albums are outputted to the gallery.
  1.  
    LOL I see he changed to Singapore (I'm considering moving away from it :P)

    Running Version Beta 2.1 on September 1st 2006, that line is found in gallery.php at line: 566

    Adding the suggested ORDER BY 'name' DESC doesn't work.

    The following solution works (though it is line 478 now, not 493):
    http://www.plogger.org/forum/comments.php?DiscussionID=168&page=1#Item_0

    :)