Page 1 of 1

{Solved}Rotating banner pictures

PostPosted: Fri Feb 22, 2008 7:24 am
Author: Watcher
Im useing the EQ2 theme it has 2 banner images 1 on left and 1 on right, is there a .script that i can use to rotate between differant images each time the page is changed randomly. the main pictures are
main pictures are left.png and right.png
i have the others listed as 1, 2, 3ect.

link to my site
http://www.worldofarkania.net/ReakNCrew/portal.php

im no good at .scripting so any help would be helpful
Thanks

Re: Rotating banner pictures

PostPosted: Fri Feb 22, 2008 10:14 am
Author: tattee
1) Insert this .script in the <HEAD> section of the page.

Code: Select all
<script></Banner> 3) banners=1;     loadbanners();     document.banner1.src = image;     window.setTimeout('cycle();',7000);   }function loadbanners() {    if (banners==1)       {       image="http]

2) Insert the following .script also in the <HEAD> section.
NOTE: if you want to cycle images without links attached to them, use the first .script above only.

[code]<script><var></script>[/code]

3) Insert the onLoad event handler inside the <BODY> tag as follows]<body onLoad="window.setTimeout('cycle();',7000);(loadbanners());(urlswitch());",


followed by other tags such as bgcolor, etc..

Code: Select all
onLoad="window.setTimeout('cycle();',7000);(loadbanners());(urlswitch());"


4) Insert the following HTML code in the <BODY> section where you want the rotating banners to appear in the page.

[code]<a href="http]

5) Define the number of banners, the images and their path in this section of the first .script

[code]function cycle() {if (++banners > 3) banners=1; // define the number of banners here (3 in this example)loadbanners();document.banner1.src = image;window.setTimeout('cycle();',7000);}function loadbanners() {if (banners==1){image="images/banner1.gif";}if (banners==2){image="images/banner2.gif";}if (banners==3){image="images/banner3.gif";  And in this section of the HTML code]

6) Define the URL links for each banner in this section of the second .script

[code]var link = "http]

7) Choose how fast you want your images to cycle in this section of the .script

[code]window.setTimeout('cycle();',7000); // the default is a new image every 7 seconds  And is this section of the onLoad tag]

<img> If you want to include a second banner rotation on the page add this line of code in this section of the first .script

[code]function cycle() {if (++banners > 3) banners=1;loadbanners();document.banner1.src = image;document.banner2.src = image;  And change the name for the second banner in the HTML code]

Re: Rotating banner pictures

PostPosted: Fri Feb 22, 2008 11:57 am
Author: Watcher
[flash=,:2y25kv2h]http://worldofarkania.net/Downloads/export%20smilies/11.gif[/flash:2y25kv2h]Please dont take this the wrong way. the pictures i need to change are not banner pictures, also i dont know where to place those .scripts, or change them to match the pictures im useing. like i said i dont know that much about .scripting.
this is the link to the picture that is on the right of the header

http://www.worldofarkania.net/ReakNCrew ... /right.png

this is the other side

http://www.worldofarkania.net/ReakNCrew ... s/left.png

there not banners there just pictures on ether side of the center banner space

here you can see the 2 on the ends

http://www.worldofarkania.net/ReakNCrew/portal.php

thats is the pictures i wont to rotate i have 5 of each one of them listed as left, left1, left2, left3, ect.. and right, right1, right2, right3, ect...

if you can make the .script and tell me where to place the .scripts i can do that but i have to know the page to add them to.

oh and im using the EQ2 template

Re: Rotating banner pictures

PostPosted: Fri Feb 22, 2008 1:44 pm
Author: Helter
in your overall_header
Find

Code: Select all
         <td><a><img></a></td><Start>         <td>           <div>{BANNER_0_IMG}</div></td><End>         <td>           <div><img></div></td>


replace with

Code: Select all
         <td><a><img></a></td><Start>         <td>           <div>{BANNER_0_IMG}</div></td><End>         <td>           <div><img src="templates/EQ2/images/logos/right/index.php"" width="200" height="200" border="0"></div></td>



upload the included folder to templates/EQ2/images/

add your left images to templates/EQ2/images/logos/left/
and your right images to templates/EQ2/images/logos/right/

Re: Rotating banner pictures

PostPosted: Fri Feb 22, 2008 4:28 pm
Author: Watcher
oh man i could kiss you, but i wont, i dont go that way, hehe that worked like a charm, Thank You.......[flash=,:2ig8aap7]http://worldofarkania.net/Downloads/other_smiles/yourock.gif[/flash:2ig8aap7]
[flash=,:2ig8aap7]http://www.smilegods.com/imgupload/users/peukie/hoera.gif[/flash:2ig8aap7][flash=,:2ig8aap7]http://www.smilegods.com/imgupload/users/peukie/hoera.gif[/flash:2ig8aap7][flash=,:2ig8aap7]http://www.smilegods.com/imgupload/users/peukie/hoera.gif[/flash:2ig8aap7]

Re: {Solved}Rotating banner pictures

PostPosted: Fri Mar 21, 2008 8:45 am
Author: Watcher
Helter i was wonting to add this to your download file section but i don't have access, thought someone might wont to use it, heres the rar of this .script and pictures, i made to use for someone to use, to make a World of Warcraft forum with the EQ2 theme

heres the file

[code]http]

to preview it working go here

http://www.worldofarkania.net/ReakNCrew/portal.php

P.S. above the left logo there seems to be this {-----------------} can you tell me where i can find it to remove it?

Re: {Solved}Rotating banner pictures

PostPosted: Fri Mar 21, 2008 3:11 pm
Author: Helter
it appears to be text. look in overall_header.tpl for
Code: Select all
------------------------------------

Re: {Solved}Rotating banner pictures

PostPosted: Fri Mar 21, 2008 9:50 pm
Author: Watcher
Thank you very much could not figure out where it would be[flash=,:1uc5o6j9]http://worldofarkania.net/Downloads/smiles_icons/genie.gif[/flash:1uc5o6j9]