The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Random Logo in Header Details »» | |||||||||||||||||||||||||
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 www.mmoccforum.com Show Your Support
|
Comments |
#32
|
|||
|
|||
Once I get to theImages[10], it doesn't seem to display anything higher than a value of 9. Am I missing something? I just added my 10th image for rotation, and sat there and hit reload for like 10 minutes...and never saw 10 or 11 appear...but it rotated fine thru 1-9. Any ideas?
|
#33
|
||||
|
||||
This using this code. You can add as many rotating banners that you want.
Code:
<!-- Begin rotating ad code -->
<script language="Javascript"><!--
function image() {
};
image = new image();
number = 0;
// imageArray
image[number++] = "<a href='http://www.yoursite.net/forum/payments.php'><img src='http://www.yoursite.net/forum/sponsors/donatebanner.gif' border='0'></a>"
image[number++] = "<a href='http://www.hikersupply.com'><img src='http://www.yoursite.net/forum/sponsors/hikersupply.gif' border='0'></a>"
image[number++] = "<a href='http://www.modelt.net'><img src='http://www.yoursite.net/forum/sponsors/modeltbanner.gif' border='0'></a>"
image[number++] = "<a href='http://appalachiantrailservices.com/'><img src='http://www.yoursite.net/forum/sponsors/atservicesbanner.gif' border='0'></a>"
image[number++] = "<a href='http://www.thepacka.com/'><img src='http://www.yoursite.net/forum/sponsors/cedartreebanner.gif' border='0'></a>"
// Carry on adding images - as many as you want
increment = Math.floor(Math.random() * number);
document.write(image[increment]);
//-->
</script>
<!-- End rotating ad code -->
|
#34
|
|||
|
|||
anyone been able to make this clickable yet ?
. |
#35
|
|||
|
|||
disregard... sorry
|
#36
|
|||
|
|||
Worked out the Clickable ...
REPLACE: PHP Code:
PHP Code:
. |
#37
|
|||
|
|||
installed, but having some issues. How can i take out the boxline around the image.
picture here.....http://www.rareclownfish.com/forums/index.php I want it to look like this http://www.rareclownfish.com/modules.php?name=Jig |
#38
|
||||
|
||||
rareclownfish;
You need to include the: border = "0" in your code to remove the link border.... Hope that helps. |
#39
|
|||
|
|||
Quote:
|
#40
|
||||
|
||||
I updated the code, it should be fine now. It now links to index.php and has a border. Sorry, sort of forgot about this thing or would have done it sooner :P
|
#41
|
|||
|
|||
thanks will try it now.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|