Back to vBulletin 3.8 Add-ons

Random logo!
Mod Version: 1.00, by MarkFoster

vB Version: 3.8.2 Rating: (1 vote - 5.00 average) Installs: 13
Released: 06 Apr 2009 Last Update: Never Downloads: 3
Not Supported Template Edits Code Changes Re-usable Code Translations  

This mod I created with a friend for a small project on my site, it's a remake of This mod but we created it ourselves.
It works with vBulletin 3.5 up to 3.8.2 from what I know, it probably works with older versions as well.
This allows you to have random logo's anywhere on your site.

First you place this code anywhere in your header (Top is a good place):
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] = 'url'
theImages[1] = 'url'
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"><img src="'+theImages[whichImage]+'" border="0" alt="$vboptions[bbtitle]" /></a></div>');
}
// End -->
</script>
You edit the urls to what images you want.
Now if you have large images (The reason we created this mod) then use this code:
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
<!-- Edit the url images to match yours
theImages[0] = 'URL'
theImages[1] = 'URL'
theImages[2] = 'URL'
theImages[3] = 'URL'
theImages[4] = 'URL'
theImages[5] = 'URL'
theImages[6] = 'URL'
theImages[7] = 'URL'
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-5));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'" border="0" alt="$vboptions[bbtitle]" /></a><img src="'+theImages[whichImage+4]+'" border="0" alt="$vboptions[bbtitle]" /></a></div>');
}
// End -->
</script>
In the url part 0-3 is for the image that will go on the left side and 4-7 is for the image that will go right, they will both be centered thought.

Then wherever you want the images to display add this:
Code:
<SCRIPT LANGUAGE="JavaScript">
showImage();
</script>
Then you can additionally add new links to the codes by adding a new line with the same information, you only have to change the number name.

Download

No files for download.

Similar Mods

Random Logo in Header vBulletin 3.5 Template Modifications

vblts.ru supports vBulletin®, 2022-2025