Back to vBulletin 3.5 Template Modifications

Random Logo in Header
Mod Version: 1.00, by Daniel

This modification is in the archives.
vB Version: 3.5.8 Rating: (3 votes - 5.00 average) Installs: 45
Released: 27 Oct 2005 Last Update: Never Downloads: 3
Not Supported Template Edits  

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>
Find:
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>
And replace it with:
Code:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
showImage();
// End --></script>
And you're done

To add more images, go back to:
Code:
theImages[1] = 'http://www.yoursite.com/forum/images/banner2.gif'
And after, you can add:
Code:
theImages[2] = 'http://www.yoursite.com/forum/images/banner3.gif'
And so on.

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

vblts.ru supports vBulletin®, 2022-2024