NeRilkA
14/04/2006, 18h32
Description
Ce hack permet d'afficher un logo au hasard (si vous en avez plusieurs ;)) dans la bandeau du haut. Vous devez avoir activé le Javascript
Remerciements et support / Thanks and support
Ce Hack a été traduit en français pour vBulletin-Ressources avec l'autorisation explicite de son auteur. / This Hack was translated into French for vBulletin-Ressources with the explicit authorization of its author.
vBulletin-Ressources et son équipe offrira du support vis à vis des hacks traduits, bien sûr, dans la mesure du possible de chacun, autant en terme de temps que de connaissances/ vBulletin-Ressources and its team will offer support for the translated hacks, of course, as far as possible for everyone, as much in term of time that knowledge.
vBulletin-Ressources remercie l'auteur du hack pour avoir fourni son autorisation. / vBulletin-Ressources thanks the author for the hack to have provided its authorization.Conception
Auteur du Hack / Author Of Hack : Daniel
Source / Link of Thread: http://www.vbulletin.org/forum/showthread.php?t=99402
Version vBulletin Requise / Version vBulletin Required : vB 3.5.4
Testé / Tested: non
Traducteur / Translator: NeRilkA
Copyright © 2006 vBulletin-Ressources.com - Tous droits réservés / Copyright © 2006 vBulletin-Ressources.com - All Rights ReservedModification
Allez dans votre admincp et ouvrez le template Header
Au tout début du template ajoutez:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin Random Logo In Header Script
var theImages = new Array() // ne pas changer ceci
<!-- Editez les urls des images pour correspondre aux vôtres
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>
Trouvez:
<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>
Et remplacez par:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
showImage();
// End --></script>
C'est fini
Pour ajouter plus d'images, retournez à:
theImages[1] = 'http://www.yoursite.com/forum/images/banner2.gif'
Et après vous pouvez ajouter:
theImages[2] = 'http://www.yoursite.com/forum/images/banner3.gif'
Et ainsi de suite.
Ce hack permet d'afficher un logo au hasard (si vous en avez plusieurs ;)) dans la bandeau du haut. Vous devez avoir activé le Javascript
Remerciements et support / Thanks and support
Ce Hack a été traduit en français pour vBulletin-Ressources avec l'autorisation explicite de son auteur. / This Hack was translated into French for vBulletin-Ressources with the explicit authorization of its author.
vBulletin-Ressources et son équipe offrira du support vis à vis des hacks traduits, bien sûr, dans la mesure du possible de chacun, autant en terme de temps que de connaissances/ vBulletin-Ressources and its team will offer support for the translated hacks, of course, as far as possible for everyone, as much in term of time that knowledge.
vBulletin-Ressources remercie l'auteur du hack pour avoir fourni son autorisation. / vBulletin-Ressources thanks the author for the hack to have provided its authorization.Conception
Auteur du Hack / Author Of Hack : Daniel
Source / Link of Thread: http://www.vbulletin.org/forum/showthread.php?t=99402
Version vBulletin Requise / Version vBulletin Required : vB 3.5.4
Testé / Tested: non
Traducteur / Translator: NeRilkA
Copyright © 2006 vBulletin-Ressources.com - Tous droits réservés / Copyright © 2006 vBulletin-Ressources.com - All Rights ReservedModification
Allez dans votre admincp et ouvrez le template Header
Au tout début du template ajoutez:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin Random Logo In Header Script
var theImages = new Array() // ne pas changer ceci
<!-- Editez les urls des images pour correspondre aux vôtres
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>
Trouvez:
<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>
Et remplacez par:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
showImage();
// End --></script>
C'est fini
Pour ajouter plus d'images, retournez à:
theImages[1] = 'http://www.yoursite.com/forum/images/banner2.gif'
Et après vous pouvez ajouter:
theImages[2] = 'http://www.yoursite.com/forum/images/banner3.gif'
Et ainsi de suite.