We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
  • Pages:
  • 1
  • 2
Random Image Code
Topic Started: Jun 25 2005, 03:21 AM (985 Views)
solinent
Member
[ *  *  * ]
Hmm, I have no idea what you mean :S
Offline Profile Quote Post Goto Top
 
Luke6006
Member
[ *  *  *  *  *  *  * ]
How would I make the forum reconise an image rotator using javascript, I mean you can't put
Code:
 
[img]http://mydomain.com/rotator.js[/img]
can you?
Offline Profile Quote Post Goto Top
 
Jory
Member Avatar
Member
[ *  *  *  *  *  * ]
Like I said in some post above: some nice JS img randomers here

Here is the one most easy to use.
Stefan
 
<script type='text/javascript'>
n = 0;
rndImages =[];
rndImages[n++] = 'http://host.com/image1.jpg';
rndImages[n++] = 'http://host.com/image2.jpg';
rndImages[n++] = 'http://host.com/image3.jpg';
rndImages[n++] = 'http://host.com/image4.jpg';

document.write('<img src="'+rndImages[Math.floor(Math.random() * n)]+ '" alt="" />');
</script>

Offline Profile Quote Post Goto Top
 
solinent
Member
[ *  *  * ]
Oh.

No you cannot do that.

Here, pm me and i'll help you out with what you want: solinent77@hotmail.com (msn)

If you don't have msn then just pm me on forums, but msn is alot better.

And it's immposible to do with javascript. You have to have an apache server(or access to the IIS server)

Basicly, what you'll have to do is:

  • Make it so that If thinks that an a file with ".gif" is actually a php script( i'll show you )
  • Use the php random image code and store that in a variable
  • Use php gd's functions to make it display the image.
  • (don't forget to add headers so that it's content is an image)
Offline Profile Quote Post Goto Top
 
ssj4rohan
Mr. Xile's the Best!
[ *  *  * ]
Ya, I need the PHP Script for forums
Offline Profile Quote Post Goto Top
 
Jory
Member Avatar
Member
[ *  *  *  *  *  * ]
The eight post in this topic has one.
Could you please read a topic before posting a question.
Come on, this topic is just little over one page.
There are some that are over 10 pages, and even those, you should totally read before posting (well, not if its ban the person above you or something, but the upgrade topic in example).

Offline Profile Quote Post Goto Top
 
ssj4rohan
Mr. Xile's the Best!
[ *  *  * ]
You're getting me wrong, I want a Random Image PHP Script which can be used in a forum. Like - http://home.ripway.com/2005-6/330703/random.php
I know IF doesn't support, but Vb IPB do
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Technology Chat · Next Topic »
Add Reply
  • Pages:
  • 1
  • 2