More than 1 random image from gallery?

photobanksphotobanks Registered Users Posts: 182 Major grins
edited March 24, 2009 in SmugMug Support
Hi all,

Is it possible to have more than 1 random image being pulled from a single gallery so that the same image is not displayed in all the boxes? I have tried to pull 4 random images from 1 gallery at once but they all come out as the same image.

Thanks,

Michael
Michael Banks

www.banksy.me.uk - main website
http://galleries.banksy.me.uk - smugmug site

Comments

  • denisegoldbergdenisegoldberg Administrators Posts: 14,409 moderator
    edited March 23, 2009
    photobanks wrote:
    Is it possible to have more than 1 random image being pulled from a single gallery so that the same image is not displayed in all the boxes? I have tried to pull 4 random images from 1 gallery at once but they all come out as the same image.
    You can add the &rand parameter to the random photo request. I haven't been able to come up with a set of &rand values that will guarantee different images though. I use this technique to show 4 photos on my homepage. Sometimes 2 of the 4 photos are the same. Sometimes all 4 are unique. Here's an example of the <img src statement with the addition of the &rand parameter:
    <img src="/photos/random.mg?AlbumID=7462239&AlbumKey=K4D5R&rand=23&Size=550x550">
    
    You can see an example of how I am using it on my homepage.

    --- Denise
  • photobanksphotobanks Registered Users Posts: 182 Major grins
    edited March 23, 2009
    You can add the &rand parameter to the random photo request. I haven't been able to come up with a set of &rand values that will guarantee different images though. I use this technique to show 4 photos on my homepage. Sometimes 2 of the 4 photos are the same. Sometimes all 4 are unique. Here's an example of the <img src statement with the addition of the &rand parameter:
    <img src="/photos/random.mg?AlbumID=7462239&AlbumKey=K4D5R&rand=23&Size=550x550">
    
    You can see an example of how I am using it on my homepage.

    --- Denise

    Denise,

    Thanks, works a treat.

    Michael<img src="https://us.v-cdn.net/6029383/emoji/clap.gif&quot; border="0" alt="" ><img src="https://us.v-cdn.net/6029383/emoji/wings.gif&quot; border="0" alt="" >ivar
    Michael Banks

    www.banksy.me.uk - main website
    http://galleries.banksy.me.uk - smugmug site
  • SpeedieSpeedie Registered Users Posts: 173 Major grins
    edited March 24, 2009
    You can add the &rand parameter to the random photo request. I haven't been able to come up with a set of &rand values that will guarantee different images though. I use this technique to show 4 photos on my homepage. Sometimes 2 of the 4 photos are the same. Sometimes all 4 are unique. Here's an example of the <img src statement with the addition of the &rand parameter:
    <img src="/photos/random.mg?AlbumID=7462239&AlbumKey=K4D5R&rand=23&Size=550x550">
    
    You can see an example of how I am using it on my homepage.

    --- Denise
    Looks like you're getting the same problem as me at the moment with sporadic photo not found errors.
  • denisegoldbergdenisegoldberg Administrators Posts: 14,409 moderator
    edited March 24, 2009
    Speedie wrote:
    Looks like you're getting the same problem as me at the moment with sporadic photo not found errors.
    Unfortunately, yes. I reported the problem in this thread.

    --- Denise
Sign In or Register to comment.