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 |
#12
|
||||
|
||||
OK thanks Daniel.
|
#13
|
||||
|
||||
Danial
I found this that will work also for random pictures or banners. PHP Code:
PHP Code:
|
#14
|
|||
|
|||
*Sighs*, why cannot anyone write there own scripts (not vB hacks (leave that to coders who are expericend with vB), but JS is pretty simple)
Random Image Scripts with links or with out are really simple. This will work for links (put this in top of headinclude) Code:
<script type='text/javascript'> function randImage() { images = new array(); links = new array(); images[0] = 'http://mysite.com/mybanner.gif'; links[0] = 'http://mysite.com/service/'; images[1] = 'http://mysite.com/cool.gif'; links[1] = 'http://mysite.com/cool.html'; var randIndex = Math.round(Math.random()*(images.length-1)); document.write("<a href='" + links[randIndex] + "'><img src='" + links[randIndex] + "'></a>"); return true; } </script> Code:
<script type='text/javascript'> randImage(); </script> |
#15
|
||||
|
||||
wel if this is going to turn to installer it will be a hit.......nice work guys
|
#16
|
||||
|
||||
10? 14? man, all of a sudden, I feel very old :/ lol
When I was ten... "tag" meant making a 'touch' when playing 'Tag' (as in, "TAG! you're it!!"). Making a "Bold tag" would be doing so aggresively and using a fancy word like "bold". as in, "Wow! that was a bold tag! nice one! I guess I'm it!. RUN!" lol (ie: Nice work guys!! this will be very useful!) <<< /me awaits plugin/product. |
#17
|
|||
|
|||
Thank you!
I look forward to a plugin for this too, but with the template changes it works nicely. Ten and fourteen, wow. I'm very impressed. |
#18
|
|||
|
|||
Daneil, I can't get this to align with a 3 paert fluid logo.
Here is the code Code:
<!-- new logo --> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" align="center"> <tr> <td width="390"> <img border="0" src="http://www.cardraft.com/themes/original/tunerleft.jpg" width="390" height="70"></td> <td width="100%" height="70" background="http://www.cardraft.com/themes/original/tunercenter.jpg"> </td> <td width="390" border="0"> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin showImage(); // End --></script> </td> </tr> </table> <!-- end new logo --> can you help me align the 3? They were aligned b4 i put in the script. |
#19
|
||||
|
||||
Quote:
|
#20
|
|||
|
|||
here is a simple one that I ended up using.
http://photomatt.net/scripts/randomimage |
#21
|
|||
|
|||
Great one, installed here!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|