• I have a dir full of picture thumbs and .html files containing the full view of the image and some description of that image. Now I would like 4 random images to be displayed whenever the website is loaded.

    /pictures
    beach_thumb.jpg
    beach.jpg
    beach.html
    dog_thumb.jpg
    dog.jpg
    dog.html
    etc..

    Only on the website I would like the thumb to be displayed, and when the thumb is clicked I want the browser to redirect to beach.html.

    Hope that makes sense. Any idea how would I go about doing that?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Not sure what this has to do with WordPress, it is a simple PHP random images script you need. There are thousands of them. You might find one to your liking at one of the many PHP script sites and hack it for your particular needs.

    Even if you searched for “random images” on this forum, you’d find a few scripts and maybe a plugin or two.

    Thread Starter amoralpsycho

    (@amoralpsycho)

    The reason I asked it here is because this is the only place that I know where users might have some understand of PHP.

    I did search; and there is a big problem with most of the scripts out there. They randomize only one image at a time, can not come across anything that would randomize all 4 and allow me to link from them at that.

    People have been using flickr do display random thumbnails – at least I have noticed alot recently.

    Keep searching as I recall a couple of threads about a randomizer that has multiple images. Though you’d have to edit the code to link to html pages, I suspect.

    There is also a script around called “rotator” (I think Matt wrote it) which will call as many images as you place image tags.

    Edit: Nope, not called “rotator” and also not what you are looking for – but kinda nice anyhoo…
    http://photomatt.net/scripts/

    Er, excuse me? Do you have a wp blog? I don’t see anything but a black page with your header/title.

    This is a forum for help with wordpress blogs. If you could provide a link to your wp blog, I’m sure someone could help further.

    Thread Starter amoralpsycho

    (@amoralpsycho)

    I just setup the hosting account on Monday, I am still configuring everything. The random image thing is one of the last things left for me. πŸ™‚

    Thread Starter amoralpsycho

    (@amoralpsycho)

    Thanks Beel but again that is not what I am looking for, I found a number of different scripts that would display a random image. I am not looking for something as simple as that.

    I need a script that would display 4, not 1, images at the same time. Not only that I want the images to be clickable links.

    Might this be what you are looking for, http://no.oneslistening.com/?p=160

    It gives images and related links.

    Did you even look at the script? It is a very simple script that, in fact, doesn’t load a random image but a random line from a text file. As such:

    1. There is no reason why you can’t use it to load 4 images. Just call it four times.
    2. There is no reason you couldn’t set the appropriate html in the txt files so that a clickable image is displayed.

    Thread Starter amoralpsycho

    (@amoralpsycho)

    Beetle I have, and I am actually using it on the website right now. Doing exactly that, calling it four times; the reason I did not want to do that originally is because at times it can display the same image side by side. Not a big deal but it still kind of bothers me but it will do for now.

    I feel like I am done with the basic stuff and the blog itself is now live. πŸ™‚

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Four Random Images’ is closed to new replies.