Recent Topics

Members
Stats
  • Total Posts: 10,749
  • Total Topics: 1,374
  • Online today: 495
  • Online ever: 879
  • (Jan 21, 20, 05:49:15 PM)
Users Online
Users: 0
Guests: 155
Total: 155

I am wanting to add this in the header

Started by KT, Dec 27, 10, 05:05:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

KT

Hi

I am wanting to add this code in the header , in the center to the right of my logo.

what extra code do i need for this to work ?
and how do i edit it into header?
I am using FlagrantRC4 theme.

<center><script type="text/javascript">

/*
Rotating Ads per Page Load

*/

//Define the ads' URL and Image below

var ad = []
ad[0]=["http:///index.cgi?" , "http://"]
ad[1]=["http:///index.cgi?" , "http://"]
ad[2]=["http:///index.cgi?" , "http://"]
ad[3]=["http:///index.cgi?" , "http://"]
ad[4]=["http:///index.cgi?" , "http://"]
ad[5]=["http:///index.cgi?" , "http://"]
ad[6]=["http:///index.cgi?" , "http://"]
ad[7]=["http://s/index.cgi?" , "http://"]
ad[8]=["http:///index.cgi?" , "http://"]
ad[9]=["http://s/index.cgi?" , "http://"]
ad[10]=["http:///index.cgi?" , "http://"]

//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] + "' border='0'/>")
document.write("</a>")
document.write("</center>")

</script></center>

Maxx

KT<

I would not add this to the header if I were you, Instead you can visit the SMF main site and search for global headers and footer mod, or something like that, this way you may add the rotating Java code right above the first Category and after the last on all pages, and this way you will not need to mess with the theme code! and have better control!

regards,
Maxx

Duncan

I agree with Maxx, I LOVE the Global header/footer mod.  It can pretty much do everything you need and you don't have to mess with theme files. :)

Here's the link to the mod: http://custom.simplemachines.org/mods/index.php?mod=351