![]() |
Random Logo in Header
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"> Code:
<a name="top"></a> Code:
<SCRIPT LANGUAGE="JavaScript"> 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 |
Daniel
Could this be incorperated into a vBadvanced module? |
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.
|
This is a mod for changing the Forum logo and not a banner mod right ?
|
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 |
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! |
@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. |
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... |
nice hack
|
@Sponge - No idea
@Attroll - I tried one test on it, didn't work too well. I'll work on it more over the weekend. |
OK thanks Daniel.
|
Danial
I found this that will work also for random pictures or banners. PHP Code:
PHP Code:
|
*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> |
wel if this is going to turn to installer it will be a hit.......nice work guys
|
10? 14? man, all of a sudden, I feel very old :/ lol :p
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 :p :D (ie: Nice work guys!! this will be very useful!) <<< /me awaits plugin/product. :) |
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. |
Daneil, I can't get this to align with a 3 paert fluid logo.
Here is the code Code:
<!-- new logo --> can you help me align the 3? They were aligned b4 i put in the script. |
Quote:
|
here is a simple one that I ended up using.
http://photomatt.net/scripts/randomimage |
Great one, installed here!
|
I LOVE THIS HACK!!! My only question is... how do I center the headers? As soon as I figure out how to center them the install button will be happily clicked! :)
|
This is a great hack Daniel. But the only problem I had with it was that you could not click on the banner and have it bring you to the web site that you were advertising. All it did was display a banner. Most people that user banners using them to advertise and they want users to go the advertisors web site. You can not do this unless you have the banner as a active link.
I created this little hack here that seems to do it all. This hack may have room for improvement but it is basic and the banners rotate and are active links. https://vborg.vbsupport.ru/showthread.php?t=106682 |
i can't seem to find the first bit..
im using element skin. Find: Code:
<a name="top"></a> And replace it with: Code:
<SCRIPT LANGUAGE="JavaScript"> |
anyhelp?
|
Quote:
Code:
<!-- Begin |
Quote:
|
I changed the line
document.write('<img src="'+theImages[whichImage]+'">'); to document.write('<center><img src="'+theImages[whichImage]+'"></center>'); I don't know if thats the cleanest way to do it but thats what I did. |
Quote:
|
One comment. I found that when you don't have javascript enabled it shows no image at all. So what I have done is found:
Code:
<SCRIPT LANGUAGE="JavaScript"> Code:
<no script> |
Nice idea, thanks for sharing. :)
And thanks tbaleno for helping out. |
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?
|
This using this code. You can add as many rotating banners that you want.
Code:
<!-- Begin rotating ad code --> |
anyone been able to make this clickable yet ?
. |
disregard... sorry
|
Worked out the Clickable ...
REPLACE: PHP Code:
PHP Code:
:) . |
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 |
rareclownfish;
You need to include the: border = "0" in your code to remove the link border.... Hope that helps. :) |
Quote:
|
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
|
thanks will try it now.
|
All times are GMT. The time now is 04:46 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|