Signature Rotation Code

Status
Not open for further replies.

Peter.Cort

TF's First Dry Ice User!
Messages
5,018
Location
Boston, MA
Hey, on some other forums for gaming (dead now :( ) people had lots of sigs and had a rotation going. I have no idea how to do it but it'd be html and if anybody can help me out that'd be great :)

Basically it was just like if i had 3 sigs i'd put in the code for all 3 and then every time you refreshed the page where I posted it would show a different sig.
 
Code:
function randInt(min,max)
{
     var div = (max - min) + 1
     var randNum = Math.random()
     for (var i = 0; i <= div - 1; i++)
     {
          if (randNum >= i / div && randNum < (i+1) / div)
          {return i + min}
     }
}


var abc = randInt(1,5);

if (abc == 1) {

     document.write("<\"Your 1. HTML-Banner-Code\">");

}

if (abc == 2) {

     document.write("<\"Your 2. HTML-Banner-Code\">");

}

if (abc == 3) {

     document.write("<\"Your 3. HTML-Banner-Code\">");

}

if (abc == 4) {

     document.write("<\"Your 4. HTML-Banner-Code\">");

}

if (abc == 5) {

     document.write("<\"Your 5. HTML-Banner-Code\">");

}

Simple JavaScript I had kicking, you get the general idea ;)

Not sure what's allowed here at T.F though and which way you wanted to do it but that's it in its bare state...

Tkey
 
looking @ that sig, and looking at this pic....
head_1.jpg

head_2.jpg

head_3.jpg

Nosboost coulda modeled for Newegg/Corsair :p
 
he's commenting that the guy in that ad looks a lot like the pic of Nos i have in my sig.

and ok, so i take the code, i know basically nothing about coding, and where it says HTML banner code, put in my image link?

and i then just want it to randomly draw upon one of the links to display a sig image.
 
Yeah the script will do that for you.
You need to find a way of getting the JavaScript code into your sig though, i'm not sure what is and what isnt allowed.

Tkey
 
Yeah I'm not sure if you can do that on here. You could just take three signatures and turn them into a gif.
 
yeah but that would make it move every like 5 seconds. I just want it to change on a refresh or a new page.
 
If you're allowed IFrames you could do it through that...

Or have a play with GD :)

Tkey
 
Status
Not open for further replies.
Back
Top Bottom