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 |
#2
|
||||
|
||||
Daniel
Could this be incorperated into a vBadvanced module? |
#3
|
||||
|
||||
I figured out how to get it working in vBadvanced. Now my question is, how can you get it to hyperlink the graphic you have. What I mean is I want the users to be able to click on the banner that pops up and have it take them to the sponsors web site.
|
#4
|
|||
|
|||
This is a mod for changing the Forum logo and not a banner mod right ?
|
#5
|
|||
|
|||
I could probably make a plugin of it, but that would involve rewriting it.
I am also probably younger then anyone would think (10 years old) I will work on it later if you want |
#6
|
|||
|
|||
Sounds like a great mod to allow various business ads and notices to appear in the header, which is a great idea. I've been wanting to provide something like this for any of my members who made a donation to help keep my site up.
I'll be watching for this to become a plugin. Thanks! |
#7
|
||||
|
||||
@attroll - I have some sort of idea on how to do that, but I'm at school right now so I won't be able to test it out. Once I get home I will.
@AndyA - The modification is for the logo, but I suppose it could be used for a banner aswell. @Sponge - Thank you, if you have any updates on it, feel free to post here or PM me. And if you're 10, good on you! I didn't even know how to use the bold tag when I was 10 :P I turned 14 about a month ago. |
#8
|
|||
|
|||
Ok, could you get on AIM as soon as you can?
And, I decided not to make a plugin but an installer because you would need to specify your images, so you would have to edit something for a plugin to work. I am almost done, I just have to work out one small bug K, can someone tell me why after it auto-edits template (DB) I have to go to template manager, goto the header template, and click OK for it to work? Because this is really weird... |
#9
|
|||
|
|||
nice hack
|
#10
|
||||
|
||||
@Sponge - No idea
@Attroll - I tried one test on it, didn't work too well. I'll work on it more over the weekend. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|