Not signed in (Sign In)

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

    • CommentAuthoramihere
    • CommentTimeJul 6th 2008
     
    Helo, after some time I'm comming with another question.

    Is it possible to sort elements in a dropdown menu by filename, not by thumbnail ID? I guess this menu is sorted by the thumbnail ID, I found some code in plog-admin-functions.php in functions plog_edit_collection_form and plog_edit_album_form, something about sql queries and maybe javascript, but changing seems too difficult for me.

    May anybody help me solve this problem?
    •  
      CommentAuthor_Eric_
    • CommentTimeJul 7th 2008
     
    Which dropdown menu do you mean exactly? You can sort images by filename by using the dropdown menu in the bottom right corner when viewing an album.
    • CommentAuthoramihere
    • CommentTimeJul 7th 2008 edited
     
    I mean the menu in the Admin mode, while editing collection/album preferences like name, description and thumbnail - right this menu. I apologize, I didn't specify this before...
    •  
      CommentAuthor_Eric_
    • CommentTimeJul 8th 2008 edited
     
    You found the right SQL.

    Change the last line of the query in plog_edit_collection_form() to:
    <blockquote>ORDER BY a.name,p.path";</blockquote>
    Change the line in plog_edit_album_form() to:
    <blockquote>$sql = "SELECT id,caption,path FROM ".TABLE_PREFIX."pictures p WHERE p.parent_album = '" . $album_id . "' ORDER BY p.path";</blockquote>
    •  
      CommentAuthorsidtheduck
    • CommentTimeJul 8th 2008
     
    amihere,

    I added a trac ticket before on this same idea (see here -> http://dev.plogger.org/ticket/161), but it has not yet been included in the codebase. It will be at some point though.
    • CommentAuthoramihere
    • CommentTimeJul 8th 2008
     
    _Eric_,

    thank you, it does work!
    And now, everything is as sorted as I like, without chaos :-)

    Plogger is really good gallery, but I like it for "the first class" community support. Thanks again!