The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Changing the Banner Image on Reload

4 posters

Go down

Solved Changing the Banner Image on Reload

Post by AmX15 April 9th 2009, 12:20 am

We have the script ready, but how would be change the banner on the forum pages to change images on every reload? Where would we insert that script?


Last edited by AmX15 on April 10th 2009, 2:59 am; edited 2 times in total
avatar
AmX15
Forumember

Posts : 30
Reputation : 0
Language : English

Back to top Go down

Solved Re: Changing the Banner Image on Reload

Post by DUM4S5 April 9th 2009, 1:22 pm

here's the file we want as the banner:

http://www.webfile.ws/d/9231/903eced7de8471f4fb308ed7fafd0747/banner2.html

everytime the page is refreshed the image changes =]

i've tried to use it in an iframe in the site description but that doesn't really work plus the rest of the site disappears.

any help?
avatar
DUM4S5
New Member

Posts : 5
Reputation : 0
Language : English

http://www.haloramics.com

Back to top Go down

Solved Re: Changing the Banner Image on Reload

Post by AmX15 April 9th 2009, 6:29 pm

Is there something you add into the CSS for the different images to load on refreshes?
avatar
AmX15
Forumember

Posts : 30
Reputation : 0
Language : English

Back to top Go down

Solved Re: Changing the Banner Image on Reload

Post by AmX15 April 10th 2009, 2:48 am

I figured it out.

I went to the modules section of the admin tools and I clicked on the HTML page management.

I created a new page and added this script.

<script language="JavaScript"><!--

//Javascript Created by Computerhope http://www.computerhope.com

//store the quotations in arrays

images = new Array(4);

images[0] = "<a href = 'http://www.computerhope.com/index.htm'><img src='http://www.computerhope.com/banners/banner.gif' alt='Visit Computer Hope'></a>";

images[1] = "<a href = 'http://www.computerhope.com/history/index.htm'><img src='http://www.computerhope.com/banners/banner2.gif' alt='Computer History'></a>";

images[2] = "<a href = 'http://www.computerhope.com/index.htm'><img src='http://www.computerhope.com/banners/banner3.gif' alt='Visit Computer Hope'></a>";

images[3] = "<a href = 'http://www.computerhope.com/newslet.htm'><img src='http://www.computerhope.com/banners/banner4.gif' alt='Computer Hope Newsletter'></a>";

index = Math.floor(Math.random() * images.length);

document.write(images[index]);

//done

// --></script><br>

I replaced the images and links with what I wanted. I then went to the forum configuration under the general tab.

Under the site description, I added an iframe tag leading to the HTML page I just created.

The outcome is like this.

http://www.haloramics.com/
avatar
AmX15
Forumember

Posts : 30
Reputation : 0
Language : English

Back to top Go down

Solved Re: Changing the Banner Image on Reload

Post by Dr Blue Socks April 10th 2009, 2:58 am

This is deeply cool, cheers.
Dr Blue Socks
Dr Blue Socks
Forumember

Posts : 77
Reputation : 0
Language : english

http://enemyinfantry.forumotion.com/

Back to top Go down

Solved Re: Changing the Banner Image on Reload

Post by MrMario April 10th 2009, 6:09 am

Topic is Solved

->Locked
MrMario
MrMario
Helper
Helper

Male Posts : 22186
Reputation : 1839
Language : test

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum