The Gamer's Quarter Forum Index The Gamer's Quarter
A quarterly publication
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how do i do that random image thing?

 
Post new topic   Reply to topic    The Gamer's Quarter Forum Index -> Quarterly Discussion
View previous topic :: View next topic  
Author Message
dessgeega
loves your favorite videogame
loves your favorite videogame


Joined: 16 Jun 2005
Posts: 6563
Location: bohan

PostPosted: Fri Dec 29, 2006 4:45 pm    Post subject: how do i do that random image thing? Reply with quote

how do i make a random image come up in my signature?

basically shaper's roll or pkd sigs on that other forum.

basically, the banner at the top of this page.

clue me up.
_________________
Back to top
View user's profile Send private message Visit poster's website
Redeye
.
.


Joined: 02 Oct 2006
Posts: 986
Location: filth

PostPosted: Fri Dec 29, 2006 11:50 pm    Post subject: Re: how do i do that random image thing? Reply with quote

dessgeega wrote:
how do i make a random image come up in my signature?

basically shaper's roll or pkd sigs on that other forum.

basically, the banner at the top of this page.

clue me up.


Try View Source or Copy Link Location.

[HTML]
document.writeln('(IMG SRC=''+xoxo[choice]+'' border=0 vspace=1)');
[/HTML]

edit: maybe not.

Here's the code from TGQ:

<script language="JavaScript" type="text/javascript">
<!--
// JavaScript to interpolate random images into a page.
var ic = 530; // Number of alternative images
var xoxo = new Array(ic); // Array to hold filenames

for (i=0;i<ic;i++)
{
xoxo[(i)] = "http://www.gamersquarter.com/banners/tgq"+ (i+1) +".jpg";
}

function pickRandom(range) {
if (Math.random)
return Math.round(Math.random() * (range-1));
else {
var now = new Date();
return (now.getTime() / 1000) % range;
}
}
// Write out an IMG tag, using a randomly-chosen image name.
var choice = pickRandom(ic);
// -->
</script>
_________________
I felt sheer anarchic joy when I ran over my first pedestrian.
Back to top
View user's profile Send private message
Nana Komatsu
weak sauce
weak sauce


Joined: 17 Jul 2006
Posts: 1293

PostPosted: Sat Dec 30, 2006 1:29 am    Post subject: Reply with quote

There's an easy way to do this using PHP. I can set something up for you.
Back to top
View user's profile Send private message
dessgeega
loves your favorite videogame
loves your favorite videogame


Joined: 16 Jun 2005
Posts: 6563
Location: bohan

PostPosted: Sat Dec 30, 2006 5:54 am    Post subject: Reply with quote

thanks nana!



wow, this totally doesn't work on a white background.
_________________
Back to top
View user's profile Send private message Visit poster's website
Nana Komatsu
weak sauce
weak sauce


Joined: 17 Jul 2006
Posts: 1293

PostPosted: Sat Dec 30, 2006 3:22 pm    Post subject: Reply with quote

Since I wrote something generic and other people might be interested, here's what I gave Dess: http://loverevolution21.com/images/random.txt
Back to top
View user's profile Send private message
Persona-sama
Weltbeherrschen Mangaka
Weltbeherrschen Mangaka


Joined: 14 Oct 2004
Posts: 709
Location: acrylic polymer dismutation

PostPosted: Wed Jan 03, 2007 12:10 am    Post subject: Reply with quote

I will use this too, if you don't mind!

For my site, rather.
_________________

Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Nana Komatsu
weak sauce
weak sauce


Joined: 17 Jul 2006
Posts: 1293

PostPosted: Wed Jan 03, 2007 12:26 am    Post subject: Reply with quote

That was the idea!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The Gamer's Quarter Forum Index -> Quarterly Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group