Jump to content

Is it possible?


Recommended Posts

You ever been to a website that had a "random picture" feature on it somewhere? And every time you go the page, or even refresh, the picture changes?

Well, I have 3 separate banners I'd like to feature in my sig, and would like to have it randomly cycle through the three. Is that at all possible to do in an EWR sig? If so, does anyone know a code?

Link to comment
Share on other sites

for those wanting to know its piss easy

1) go here http://sig.seiha.org/

2) enter a name and password in (if its avalible then that will be your account)

3) add in the images into the space provided

4) use the link they provide (which is basically http://sig.seiha.org/ with your username with .gif at the end) and put it in the place you want it

5) everytime that url is accessed it will send you ton ONE of those images each time their is no real sort its just random but as long as its listed it will pop up

i hope this cuts down on the PM's i get on this

Link to comment
Share on other sites

You can try the following;

<?php

$file_array = array

('http://www.kirupa.com/me/footer/footer_home.gif',

'http://www.kirupa.com/me/footer/footer_mit.gif',

'http://www.kirupa.com/me/footer/footer_music.gif',

'http://www.kirupa.com/me/footer/footer_music2.gif',

'http://www.kirupa.com/me/footer/footer_tv.gif',

'http://www.kirupa.com/me/footer/footer_orange.gif',

'http://www.kirupa.com/me/footer/footer_game.gif');

$total = count($file_array);

$random = (mt_rand()%$total);

$file = "$file_array[$random]";

print("<img src=$file></a>");

?>

Replace the links inside the ' ' with the address to your pictures. That should work, not 100% sure if it will since it's a .php script though.

Edited by Jorden Snow
Link to comment
Share on other sites

If that fails to work, you can try this javascript version of the "same" script.

---

<script language="JavaScript">

<!--

// ==============================================

// Copyright 2003 by jsCode.com

// Source: jsCode.com

// Author: etLux

// Free for all; but please leave in the header.

// ==============================================

// Set up the image files to be used.

var theImages = new Array() // do not change this

// To add more image files, continue with the

// pattern below, adding to the array. Rememeber

// to increment the theImages[x] index!

theImages[0] = '100.jpg'

theImages[1] = '200.jpg'

theImages[2] = '300.jpg'

theImages[3] = '400.jpg'

theImages[4] = '500.jpg'

// ======================================

// do not change anything below this line

// ======================================

var j = 0

var p = theImages.length;

var preBuffer = new Array()

for (i = 0; i < p; i++){

preBuffer = new Image()

preBuffer.src = theImages

}

var whichImage = Math.round(Math.random()*(p-1));

function showImage(){

document.write('<img src="'+theImages[whichImage]+'">');

}

//-->

</script>

Same idea as before with changing what's inside the " " area.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. To learn more, see our Privacy Policy