How do you set up changing banners?

Go down

How do you set up changing banners?

Post by NotoriousMcFleury on Thu Jul 19 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?

NotoriousMcFleury
New Member

Posts : 4
Reputation : 1
Language : English

Back to top Go down

Re: How do you set up changing banners?

Post by Shian on Thu Jul 19 2012, 01:07

Hello.

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

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

http://overflowforum.com

Back to top Go down

Re: How do you set up changing banners?

Post by NotoriousMcFleury on Thu Jul 19 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 = []"

NotoriousMcFleury
New Member

Posts : 4
Reputation : 1
Language : English

Back to top Go down

Re: How do you set up changing banners?

Post by Shian on Thu Jul 19 2012, 01:28

Is it posted under Java Script Management?
avatar
Shian
Forumember

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

http://overflowforum.com

Back to top Go down

Re: How do you set up changing banners?

Post by NotoriousMcFleury on Thu Jul 19 2012, 01:30

No it's pasted in overall_headers in Templates

NotoriousMcFleury
New Member

Posts : 4
Reputation : 1
Language : English

Back to top Go down

Re: How do you set up changing banners?

Post by Shian on Thu Jul 19 2012, 02:07

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

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

http://overflowforum.com

Back to top Go down

Re: How do you set up changing banners?

Post by NotoriousMcFleury on Thu Jul 19 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?

NotoriousMcFleury
New Member

Posts : 4
Reputation : 1
Language : English

Back to top Go down

Re: How do you set up changing banners?

Post by nathanadhitya on Sun Jul 22 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://illiweb.com/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>

nathanadhitya
Forumember

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

http://tr-teamwork.mydiscussionboard.com

Back to top Go down

Back to top


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