Kod: Tümünü seç
Açıklama : Eklenti sayesinde forum logosu olarak kullandığınız image dosyası sabit olmaz, 3-5 kaç tane isterseniz sayfa yenilemelerinde değişe değişe çıkarlar.
- forum_dizini/images klasörüne kaç tane farklı logo kullanacaksanız upload edin ve isimleri de banner1.gif , banner2.gif , banner3.gif ... şeklinde olsun.
- header templatesinde en üste alttaki kodları ekleyin ve düzenleyin; alttaki kodlara göre iki farklı banner kullanılabilir
Kod:
******** LANGUAGE="JavaScript">
[i]<!-- 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.siteniz.com/forum/images/banner1.gif'
theImages[1] = 'http://www.siteniz.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
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}
// End -->
</script>
- 2'den fazla banner kullanacaksanız alttaki şekilde kodları çoğaltın;
Kod:
theImages[0] = 'http://www.siteniz.com/forum/images/banner1.gif'
theImages[1] = 'http://www.siteniz.com/forum/images/banner2.gif'
theImages[2] = 'http://www.siteniz.com/forum/images/banner3.gif'
theImages[3] = 'http://www.siteniz.com/forum/images/banner4.gif'
..........
Şununla değiştirin;
Kod:
******** LANGUAGE="JavaScript"> <!-- Begin showImage(); // End --></script>
__________________