View Full Version : Random Logo in Header
Daniel
06-07-2006, 10:00 PM
What it does...
Exactly what the title says. It's very similar to my 3.5 edit.
In the header template....
PLACE THIS AT THE VERY TOP OF THE HEADER TEMPLATE
<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] = 'images/statusicon/forum_old.gif'
theImages[1] = 'images/statusicon/forum_new.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('<td align="$stylevar[left]"><a href="index.php"><img src="'+theImages[whichImage]+'" border="0" alt="$vboptions" /></a></div>');
}
// End -->
</script>
Remember to edit the image paths under "<!-- Edit the url images to match yours"
Find:
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
Replace with:
<SCRIPT LANGUAGE="JavaScript">
showImage();
</script>
[b]Like it? Use it?
Click Install (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=117983)
:)
Barakat
06-08-2006, 03:22 AM
i will install it when i upgrade my forum sooon .
** installed**
Daniel
06-08-2006, 03:24 AM
i will install it when i upgrade my forum sooon .
** installed**
I think you missed the button. :P
Merjawy
06-08-2006, 12:09 PM
keep this one here.. I'll be baaaaaaaaaaack for it :)
thanks
ggiersdorf
07-14-2006, 06:33 PM
How can I set the location for the images to be displayed on the site? It jumps around I want them in a fixed location next to the right of my Logo. Right now its overlapping
see www.gentendo.com for example
GreysAnatomy
08-11-2006, 05:49 AM
Thank you. Very easy to do! :)
sudn3sc3d
08-16-2006, 09:14 PM
awsome installed :D
midirtrider
08-24-2006, 09:04 PM
Is there a way to get this mod to work to the right of my header image?
www.MIdirtriders.com
at the top of the page on the left I have my header MIdirtriders logo.. I would like to ad a random banner to the right of this.. any ideas with this and your hack?
Snake
08-30-2006, 04:19 PM
Thanks for the hack! I'll install it right away... :)
midirtrider
10-04-2006, 04:36 PM
Is there a way to get this mod to work to the right of my header image?
www.MIdirtriders.com
at the top of the page on the left I have my header MIdirtriders logo.. I would like to ad a random banner to the right of this.. any ideas with this and your hack?
I guess not :D
josiespencer
10-04-2006, 06:02 PM
Ok, here is a variation. Can you tie this to userID or better yet, usergroup? Some get the random logo and some don't? Some people like change and some people don't?
zan3y
10-25-2006, 10:53 PM
I know this is probably a dumb post but this works for 3.6.2 too (and I have vBadvanced installed).
chiaa
11-02-2006, 08:37 AM
Installed and followed the directions. I am only getting the image urls to show up on my index page (vbadvanced). Images are random there...
The rest of my site they do not show up. My site thekimchipot.com
Header currently has:
<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] = 'forums/images/Users_logos/palacelogo.jpg'
theImages[1] = 'forums/images/Users_logos/newspaperlogo.png'
theImages[2] = 'forums/images/Users_logos/girlslogo.jpg'
theImages[3] = 'forums/images/Users_logos/chiaalogo.jpg'
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('<td align="$stylevar[left]"><a href="index.php"><img src="'+theImages[whichImage]+'" border="0" alt="$vboptions[bbtitle]" /></a></div>');
}
// End -->
</script>
<!-- logo -->
<a name="top"></a>
<table border="0" width=200 HEIGHT=30 cellpadding="0" cellspacing="0" align="center">
<tr>
<SCRIPT LANGUAGE="JavaScript">
showImage();
</script>
<td align="$stylevar[right]">
</td>
</tr>
</table>
<!-- /logo -->
<!-- content table -->
$spacer_open
$_phpinclude_output
Any help is appreciated.
HeRmAn'S
11-02-2006, 02:03 PM
The rest of my site they do not show up. My site thekimchipot.comvisit yours sites in ...follow - up screen caps :):) ...web browser refresh ...ta taaaa :D ......good days:D
chiaa
11-03-2006, 05:58 AM
Acutally it was always working where you took those screen shots (see my original post about it working on my vbadnaced page).
But.....
You actually in a subtle way led me to fix it. I had to put a copy of the banners in /forums/forums/images......
visit yours sites in ...follow - up screen caps :):) ...web browser refresh ...ta taaaa :D ......good days:D
phonexpo
03-22-2007, 12:02 AM
Installed and working 100% on 3.6.5 :)
Thanks :)
2 FN LOW
03-22-2007, 12:35 AM
i cant get this code to work for some reason...i did everything it says to do too...My header template was originally modded before so i replaced the code to original to start fresh...I made a folder (banner/images) and put my banner images in there and then i did what the instructions say....My images do not show up, i just get a link to my main forum page
<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] = 'banner/images/banner1.gif'
theImages[1] = 'banner/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('<td align="$stylevar[left]"><a href="index.php"><img src="'+theImages[whichImage]+'" border="0" alt="$vboptions[bbtitle]" /></a></div>');
}
// End -->
</script>
<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<SCRIPT LANGUAGE="JavaScript">
showImage();
</script>
<td align="$stylevar[right]">
</td>
</tr>
</table>
<!-- /logo -->
<!-- content table -->
$spacer_open
$_phpinclude_output
any help here?
WebmasterSimds
04-12-2007, 03:48 AM
Thisis a wonderful addition to my site. makes it more fresh looking, Thanks for the mod
Slyfox1
05-16-2007, 01:14 AM
Works fine as long as you specify the complete URL to the images.
'images/xxx.jpg' will work fine for one area but not another;
'http://yoursite.com/path/to/your/images.jpg' works.
asasi
05-24-2007, 03:35 PM
Is there any hack that change logo in special dates. for example admin can set "chrismas_logo.gif" for chrismas day. and can set "valentine_logo.gif" for valentine day. It will be very cool:cool:
m6747
06-05-2007, 01:59 AM
I edited the header... and just put it right on top. This is my code. What am I doing wrong?
Thanks,
M
<!-- logo -->
<a name="top"></a>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="1" width="100%" align="center" style="border-bottom-width:0px">
<td class="alt2" align="center">
<SCRIPT LANGUAGE="Javascript"><!--
function banner() {
};
banner = new banner();
number = 0;
// bannerArray
banner[number++] = "<a href='http://www.spinzone.net/forums' target='_blank'><img src='http:www.spinzone.net/forums/aquateen/misc/spin_visions.png' border='1'></a>"
banner[number++] = "<a href='http://www.spinzone.net/forums' target='_blank'><img src='http:www.spinzone.net/forums/aquateen/misc/szinfusion.gif' border='1'></a>"
increment = Math.floor(Math.random() * number);
document.write(banner[increment]);
//--></SCRIPT>
</td></table>
<!-- /logo -->
stonner
09-21-2007, 08:02 AM
thank you very much.
I need something like to show random banners.
but the problem is that the banner's dont have a picture path, it's code like this:
<script language="javascript" type="text/javascript" src="http://banners.webmasterplan.com/view.asp?ref=422493&site=4894&type=html&hnb=6&js=1"></script>
<noscript><a href="http://partners.webmasterplan.com/click.asp?ref=422493&site=4894&type=b1&bnb=1" target="_blank">
<img src="http://banners.webmasterplan.com/view.asp?ref=422493&site=4894&b=1" border="0"/></a><br></noscript>
<!-- END PARTNER PROGRAM -->
is there a way to modify your mod like this?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.