Not signed in (Sign In)

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

    • CommentAuthorIke
    • CommentTimeJun 14th 2012
     
    Hi,

    I've just finished an upgrade and again needed to change the files to get an option I really like:
    On the pages with all the collections and albums a random thumb is displayed for every collection or album.

    As far as I can find this is not possible to set anywhere.

    What I did was this:

    in "plog-functions.php"

    "function plogger_get_collection_thumb()"
    change the line
    $thumb_query .= " `parent_album`='".$rv['id']."' ORDER BY 'date_submitted' DESC LIMIT 1";
    into
    $thumb_query .= " `parent_album`='".$rv['id']."' ORDER BY RAND() DESC LIMIT 1";


    "function plogger_get_album_thumb()"
    change the line
    $thumb_query .= " `parent_album`='".$rv['id']."' ORDER BY 'date_submitted' DESC LIMIT 1";
    into
    $thumb_query .= " `parent_album`='".$rv['id']."' ORDER BY RAND() DESC LIMIT 1";

    This is an easy change, but unfortunately it's a pain in the ass to think of how I did it every time I upgrade to a newer version (not often so I forget ;-) )
    Maybe in the manage album/collection screen you can add the random thumb to the list with auto and all pictures?

    Kind regards
    Ike
    • CommentAuthorIke
    • CommentTimeJun 14th 2012
     
    I also posted this message so I can find it easier next time I need it ;-)