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.

How do you set up changing banners?

3 posters

Go down

How do you set up changing banners? Empty How do you set up changing banners?

Post by NotoriousMcFleury July 19th 2012, 00:59

I need help setting up the ability for users when they refresh the page they see a different banner. We found codes for phpBB2 but we don't know if we put them in the CSS sheet or if it's a java script code.

Can someone help?
avatar
NotoriousMcFleury
New Member

Posts : 4
Reputation : 1
Language : English

Back to top Go down

How do you set up changing banners? Empty Re: How do you set up changing banners?

Post by Shian July 19th 2012, 01:07

Hello.

Could you please post the code so I can see?
Shian
Shian
Forumember

Male Posts : 240
Reputation : 15
Language : English, French

http://overflowforum.com

Back to top Go down

How do you set up changing banners? Empty Re: How do you set up changing banners?

Post by NotoriousMcFleury July 19th 2012, 01:26

Well I figured out where the codes are supposed to go, but when I paste them in "overall_headers" it doesn't work.

Code:
<a href="FORUMURL">
                   
<center><div style="width: 900px;"><script type="text/javascript">
/*
Rotating Ads per Page Load
by iFusion - http://forum.ifcode.com
*/
//Define the ads' URL and Image below
var ad = []
ad[0]=["FORUMURL" , "BANNERURL"]
ad[1]=["FORUMURL" , "BANNERURL"]
ad[2]=["FORUMURL" , "BANNERURL"]
ad[3]=["FORUMURL" , "BANNERURL"]
//Do not edit anything below this line
x = Math.floor(Math.random()*ad.length)
document.write("<center>")
document.write("<a href='" + ad[x][0] + "'>")
document.write("<img src='" + ad[x][1] + "' />")
document.write("</a>")
document.write("</center>")
</script></div> </center></a>
              </tr>     

That is the code I am using, I didn't edit anything below, are the images not showing up because I'm hosting them on imgur? I also didn't put anything in "var ad = []"
avatar
NotoriousMcFleury
New Member

Posts : 4
Reputation : 1
Language : English

Back to top Go down

How do you set up changing banners? Empty Re: How do you set up changing banners?

Post by Shian July 19th 2012, 01:28

Is it posted under Java Script Management?
Shian
Shian
Forumember

Male Posts : 240
Reputation : 15
Language : English, French

http://overflowforum.com

Back to top Go down

How do you set up changing banners? Empty Re: How do you set up changing banners?

Post by NotoriousMcFleury July 19th 2012, 01:30

No it's pasted in overall_headers in Templates
avatar
NotoriousMcFleury
New Member

Posts : 4
Reputation : 1
Language : English

Back to top Go down

How do you set up changing banners? Empty Re: How do you set up changing banners?

Post by Shian July 19th 2012, 02:07

Well, just like Rideem said, Javascript goes in JavaScript Codes Management, so try posting it there.
Shian
Shian
Forumember

Male Posts : 240
Reputation : 15
Language : English, French

http://overflowforum.com

Back to top Go down

How do you set up changing banners? Empty Re: How do you set up changing banners?

Post by NotoriousMcFleury July 19th 2012, 21:03

I put it in Javascript Managment and still nothing, I put it in overall_headers and still nothing.

Does anyone have an alternative code or something that is known to work?
avatar
NotoriousMcFleury
New Member

Posts : 4
Reputation : 1
Language : English

Back to top Go down

How do you set up changing banners? Empty Re: How do you set up changing banners?

Post by nathanadhitya July 22nd 2012, 05:06

can you please provide your forum link please Hello
and your code it's a basic html the picture will auto shuffle and change so you only need to change the FORUMURL To Your forum url
then change the BANNERURL To be the direct image link
then if you wanna see the demo you can see by putting this code to html
Code:
<center><div style="width: 900px;"><script type="text/javascript">
/*
Rotating Ads per Page Load
by iFusion - http://forum.ifcode.com
*/
//Define the ads' URL and Image below
var ad = []
ad[0]=["FORUMURL1" , "http://i48.servimg.com/u/f48/17/48/49/15/clear10.gif"]
ad[1]=["FORUMURL2" , "http://www.programminglanguageforums.freehostingcloud.com/styles/prosilverbrownversion/imageset/site_logo.gif"]
ad[2]=["FORUMURL3" , "http://i48.servimg.com/u/f48/17/48/49/15/defaul11.png"]
ad[3]=["FORUMURL4" , "http://2img.net/i/fa/fdf_en3/repond12.png"]
//Do not edit anything below this line
x = Math.floor(Math.random()*ad.length)
document.write("<center>")
document.write("<a href='" + ad[x][0] + "'>")
document.write("<img src='" + ad[x][1] + "' />")
document.write("</a>")
document.write("</center>")
</script></div> </center></a>
              </tr>
avatar
nathanadhitya
Forumember

Male Posts : 98
Reputation : 2
Language : English And Indonesia

http://tr-teamwork.mydiscussionboard.com

Back to top Go down

Back to top

- Similar topics

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