Not signed in (Sign In)

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

    • CommentAuthorHennu
    • CommentTimeMar 11th 2009
     
    Hey, i noticed that when i manage my picutres / albums i can choose automatic thumbnail for the gallery / collection.
    But is it possible to make so, that every time it chooses automaticly new picture for the collection, not only once?

    sorry for bad english, thanks ...
    • CommentAuthorchewbears
    • CommentTimeMar 12th 2009
     
    http://www.plogger.org/forum/discussion/1690/

    Check out that thread. I think it may help you out.
    • CommentAuthorHennu
    • CommentTimeMar 12th 2009
     
    Thank you for the link, but i am just too stupid to get it...
    I am a web designer but dont know php enough to get the point ..

    I know it is a lot to ask, but could someone post the code here, that i need to change, please ?
    Thanks ..
    •  
      CommentAuthorsidtheduck
    • CommentTimeMar 12th 2009 edited
     
    <-- wrong thread response -->
    • CommentAuthorHennu
    • CommentTimeMar 13th 2009
     
    I changed that code, but it seems not to work, maybe you misunderstood me
    What i had in mind, was that every time I refesh the page, then collections thumbnails would automatically change

    At the moment it takes the last picture, that i have uploaded, but that is not what i want ..
    •  
      CommentAuthorsidtheduck
    • CommentTimeMar 13th 2009
     
    oops! I responded to the wrong thread. Sorry about that.

    To grab a random image by default, open 'plog-functions.php' and look for the following code under the plogger_get_collection_thumb() function (should be around line 2086):
    $thumb_query .= " `parent_collection`='".$rv["id"]."' ORDER BY `id` DESC LIMIT 1";
    and change it to read:
    $thumb_query .= " `parent_collection`='".$rv["id"]."' ORDER BY RAND() DESC LIMIT 1";

    That should do it for you.
    Thankful People: Hennu
    • CommentAuthorHennu
    • CommentTimeMar 13th 2009
     
    Nice, it worked like a charm ! Thanks you very much !

    But there is 1 little ( i hope it is little ) thing i forgot to mention before...
    Is there a way, when every time i refesh the page, then collection thumbnails would automatically change AND it would pic a thumbnail from album thumbnails, not any other picture, only from the ones that are choosen to be album thumbnails?

    Now i am not sure if i made my self clear, but i hope you guys understand ...
    •  
      CommentAuthorsidtheduck
    • CommentTimeMar 13th 2009
     
    Okay, so just to make sure I have it right, you want it to select a random collection thumbnail from images that have been selected as album thumbnails (so a manually selected album thumbnail or the default "newest" thumbnail within an album if no manual thumbnail has been selected). Correct? If so, I can look into it and let you know the code. It may be slightly slower as it will have to run another sql query to grab the album thumbnails from within that collection, but I think we can get it done.
    Thankful People: Hennu
    • CommentAuthorHennu
    • CommentTimeMar 13th 2009 edited
     
    Yes, I want it to select a random collection thumbnail from images that I have selected manually as album thumbnails :)
    It would be just perfect, if you could help me out, i have changed lucid theme soo much, and this would just make it complete...

    Thank you for you help !