Random Logo in Header
This modification is in the archives.
What This Does
This will make a random logo which you select appear on the top of your board. You must have JavaScript enabled. Now let's get started, shall we? Go to your admincp and open up the "header" template. At the very begining of your header template, add: Code:
<SCRIPT LANGUAGE="JavaScript"> <!-- Begin Random Logo In Header Script var theImages = new Array() // do not change this <!-- Edit the url images to match yours theImages[0] = 'http://www.yoursite.com/forum/images/banner1.gif' theImages[1] = 'http://www.yoursite.com/forum/images/banner2.gif' var j = 0 var p = theImages.length; var preBuffer = new Array() for (i = 0; i < p; i++){ preBuffer[i] = new Image() preBuffer[i].src = theImages[i] } var whichImage = Math.round(Math.random()*(p-1)); function showImage(){ document.write('<div align="center"><a href="index.php"><img src="'+theImages[whichImage]+'" border="0" alt="$vboptions[bbtitle]" /></a></div>'); } // End --> </script> Code:
<a name="top"></a> <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center"> <tr> <td align="$stylevar[left]" class="logobg"><a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td> </tr> </table> Code:
<SCRIPT LANGUAGE="JavaScript"> <!-- Begin showImage(); // End --></script> To add more images, go back to: Code:
theImages[1] = 'http://www.yoursite.com/forum/images/banner2.gif' Code:
theImages[2] = 'http://www.yoursite.com/forum/images/banner3.gif' I know this can be done with a plugin or some sort of installer, but since I have no idea on how to do that, I suppose there won't be one unless someone creates one, or until I figure out how. If you would like to recieve updates on this modification, please click the 'Install' button. Daniel http://www.mmoccforum.com Download No files for download. |
Similar Mods
Major Additions vBFlash Header (Lite) - Alternative to default vBulletin logo/header | vBulletin 3.6 Add-ons |
Random Logo in Header | vBulletin 3.6 Template Modifications |