MyBB Community Forums

Full Version: Header Javascript, where does you go?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm looking to have this JS as my logo, what do I have to do to get this to work?

<script language="JavaScript"> 
 
function random_imglink(){
  var myimages=new Array()
  //specify random images below. You can have as many as you wish
  myimages[1]="images/logos/logo_zmi.jpg"
  myimages[2]="images/logos/logo_pp.jpg"
  myimages[3]="images/logos/logo_agility.jpg"
  myimages[4]="images/logos/logo_barrows.jpg"
  myimages[5]="images/logos/logo_temple.jpg"
 
  var ry=Math.floor(Math.random()*myimages.length)
 
  if (ry==0)
     ry=1
     document.write('<center><img src="'+myimages[ry]+'" border=0></center>')
}
 
  random_imglink()
 
</script> 
Another Thread Wrote:Open up the header template in your ACP and add the following code wherever in that template. The header template is shown on all pages. You can add this code to the showthread template or wherever - basically where you want it to be included.

Code:
<script type="text/javascript" src="bumbbox.js"></script>

Note that if you have the script file in a different directory than the one showthread.php is in, you will have to reference it.

Instead, open up the header template and replace the board logo with your script. You can use javascript basically anywhere on your page (you don't HAVE to put it in the <head> part)
I would recommend you to just put it in the Header Template.
* AussieJay said that.