Options

Random photo into forum...

tsporetspore Registered Users Posts: 25 Big grins
Here is a question.
I was thinking of adding a few random photos into my header:

173247395-M.jpg

I originally was thinking of just using a random image php script. But I began thinking, and I am leaning towards wondering if there are any PHP scripts which will work to grab a thumb at random.

Any suggestions?

Comments

  • Options
    AllenAllen Registered Users Posts: 10,012 Major grins
    edited July 15, 2007
    tspore wrote:
    Here is a question.
    I was thinking of adding a few random photos into my header:

    173247395-M.jpg

    I originally was thinking of just using a random image php script. But I began thinking, and I am leaning towards wondering if there are any PHP scripts which will work to grab a thumb at random.

    Any suggestions?
    This will pull a random photo from a gallery. Set your header html to pull five
    thumbs from different galleries.

    <img src="/photos/random.mg?AlbumID=xxxxxxx&Size=Th" />
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • Options
    tsporetspore Registered Users Posts: 25 Big grins
    edited July 15, 2007
    Allen wrote:
    This will pull a random photo from a gallery. Set your header html to pull five
    thumbs from different galleries.

    <img src="/photos/random.mg?AlbumID=xxxxxxx&Size=Th" />
    Thanks for the quick reply but I am missing something. It must be because its Sunday.
    Hum....
    For example I want to use this gallery:
    http://43photo.smugmug.com/gallery/2936955

    but when I plug it into the header I only get a ?
    I have a API for the home page -
    http://www.fourthirdsphoto.com
    So I am unsure what is up.
  • Options
    AllenAllen Registered Users Posts: 10,012 Major grins
    edited July 15, 2007
    tspore wrote:
    Thanks for the quick reply but I am missing something. It must be because its Sunday.
    Hum....
    For example I want to use this gallery:
    http://43photo.smugmug.com/gallery/2936955

    but when I plug it into the header I only get a ?
    I have a API for the home page -
    http://www.fourthirdsphoto.com
    So I am unsure what is up.
    Just for grins I just stuck this in at the top of your html and got five thumbs
    across. Every page refresh they change. Playing with Firefox WebDev.

    <div id="headerPics"><img src="/photos/random.mg?AlbumID=2936955&Size=100x100" /> <img src="/photos/random.mg?AlbumID=3082886&Size=100x100" /> <img src="/photos/random.mg?AlbumID=2857176&Size=100x100" /> <img src="/photos/random.mg?AlbumID=2769575&Size=100x100" /> <img src="/photos/random.mg?AlbumID=2653339&Size=100x100" /></div>


    Add to your CSS

    #headerPics {
    position:relative;
    margin: 0 auto;
    left: 290px;
    top: 35px;
    }

    #Table_01 {margin-top: -70px;}
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • Options
    AllenAllen Registered Users Posts: 10,012 Major grins
    edited July 15, 2007
    Screen shot.
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • Options
    tsporetspore Registered Users Posts: 25 Big grins
    edited July 15, 2007
    Allen wrote:
    Screen shot.
    Thanks I found my error.
  • Options
    brandofamilybrandofamily Registered Users Posts: 2,013 Major grins
    edited July 22, 2007
    Allen wrote:
    Screen shot.
    kewl kode Allen... I jst can not figure out a neat way to use it... yet...
  • Options
    dlscott56dlscott56 Registered Users Posts: 1,324 Major grins
    edited July 24, 2007
    Thanks Allen, that's really cool!
  • Options
    FormerLurkerFormerLurker Registered Users Posts: 82 Big grins
    edited August 20, 2007
    How "random" is random?
    When I use this link to pull five photos from the same gallery into a sample header, I get five of the same photos. This leads me to believe that the random number generator, or whatever drives the selector, runs once per page load. Is that right? Does that mean that to get five random images I can't pull five times from the same gallery but must instead pull from five different galleries? Thanks.
  • Options
    AllenAllen Registered Users Posts: 10,012 Major grins
    edited August 20, 2007
    When I use this link to pull five photos from the same gallery into a sample header, I get five of the same photos. This leads me to believe that the random number generator, or whatever drives the selector, runs once per page load. Is that right? Does that mean that to get five random images I can't pull five times from the same gallery but must instead pull from five different galleries? Thanks.
    Each page refresh gets another set of thumbs.

    Hehe, just like a one-armed bandit, right?:D
    Al - Just a volunteer here having fun
    My Website index | My Blog
Sign In or Register to comment.