Hier ein Ansatz mit BBcode:
Adminbereich -> Beiträge -> BBcode
große Flocken:
BBCode-Benutzung
- Code: Alles auswählen
[snowflakes_b][/snowflakes_b]
HTML-Ersetzung
- Code: Alles auswählen
<script language="JavaScript" type="text/javascript">
<!--
var numImages = 1;
var numFlakes = 20;
var ns = (document.layers)?1:0;
var ns6 = (document.getElementById&&!document.all)?1:0;
var opera5 = (navigator.userAgent.indexOf("Opera") > -1 && document.getElementById) ? 1:0;
var winWidth = (ns||ns6||opera5)?window.innerWidth-70:window.document.body.clientWidth;
var winHeight = (ns||ns6||opera5)?window.innerHeight:window.document.body.clientHeight;
var flakeX = new Array();
var flakeY = new Array();
var flakeSpeed = new Array();
var flakeStep = new Array();
var flakeStep2 = new Array();
for (i=0; i<numImages; i++)
{
eval('imgFlake' + i + '=new Image();');
eval('imgFlake' + i + '.src="http://www.iphpbb.com/board/images/snowbig.gif";');
}
if (ns)
{
for (i=0; i<numFlakes; i++)
{
eval('var picSource=imgFlake' + Math.floor(Math.random()*numImages) + '.src;');
document.write('<LAYER name="layerFlake' + i + '" left="0" top="0"><IMG src="' + picSource + '"></LAYER>');
}
} else {
document.write('<DIV style="position:absolute;top:0px;left:0px"><DIV style="position:relative">');
for (i=0; i<numFlakes; i++)
{
eval('var picSource=imgFlake' + Math.floor(Math.random()*numImages) + '.src;');
document.write('<IMG id="layerFlake' + i + '" src="' + picSource + '" style="position:absolute;top:0px;left:0px">');
}
document.write('</DIV></DIV>');
}
for (i=0; i<numFlakes; i++)
{
flakeX[i] = Math.round(Math.random()*winWidth);
flakeY[i] = Math.round(Math.random()*winHeight);
flakeSpeed[i] = Math.random()*3+3;
flakeStep[i] = Math.random()*0.1+0.05;
flakeStep2[i] = 0;
}
function fLetItSnow()
{
var winWidth = (ns||ns6||opera5)?window.innerWidth-70:window.document.body.clientWidth;
var winHeight = (ns||ns6||opera5)?window.innerHeight:window.document.body.clientHeight;
var wscrll = (ns||ns6||opera5)?window.pageXOffset:document.body.scrollLeft;
var hscrll = (ns||ns6||opera5)?window.pageYOffset:document.body.scrollTop;
for (i=0; i<numFlakes; i++){
speedX = flakeSpeed[i]*Math.cos(flakeStep2[i])/2;
speedY = flakeSpeed[i]*Math.sin(90*Math.PI/180);
flakeX[i] += speedX;
flakeY[i] += speedY;
if (flakeY[i]>winHeight)
{
flakeX[i]=Math.round(Math.random()*winWidth);
flakeY[i]=-100;
flakeSpeed[i]=Math.random()*3+3;
}
if (ns)
{
document.layers['layerFlake' + i].left = flakeX[i];
document.layers['layerFlake' + i].top = flakeY[i] + hscrll;
} else if (ns6||opera5) {
document.getElementById("layerFlake" + i).style.left = Math.min(winWidth,flakeX[i]);
document.getElementById("layerFlake" + i).style.top = flakeY[i] + hscrll;
} else {
eval("document.all.layerFlake" + i).style.left = flakeX[i];
eval("document.all.layerFlake" + i).style.top = flakeY[i] + hscrll;
}
flakeStep2[i]+=flakeStep[i];
}
setTimeout('fLetItSnow()', 20);
}
// -->
</script>
<script language="JavaScript">
<!--
fLetItSnow();
//-->
</script>
kleine Flocken:
BBCode-Benutzung
- Code: Alles auswählen
[snowflakes_s][/snowflakes_s]
HTML-Ersetzung
- Code: Alles auswählen
<script language="JavaScript" type="text/javascript">
<!--
var numImages = 1;
var numFlakes = 20;
var ns = (document.layers)?1:0;
var ns6 = (document.getElementById&&!document.all)?1:0;
var opera5 = (navigator.userAgent.indexOf("Opera") > -1 && document.getElementById) ? 1:0;
var winWidth = (ns||ns6||opera5)?window.innerWidth-70:window.document.body.clientWidth;
var winHeight = (ns||ns6||opera5)?window.innerHeight:window.document.body.clientHeight;
var flakeX = new Array();
var flakeY = new Array();
var flakeSpeed = new Array();
var flakeStep = new Array();
var flakeStep2 = new Array();
for (i=0; i<numImages; i++)
{
eval('imgFlake' + i + '=new Image();');
eval('imgFlake' + i + '.src="http://www.iphpbb.com/board/images/snowsmall.gif";');
}
if (ns)
{
for (i=0; i<numFlakes; i++)
{
eval('var picSource=imgFlake' + Math.floor(Math.random()*numImages) + '.src;');
document.write('<LAYER name="layerFlake' + i + '" left="0" top="0"><IMG src="' + picSource + '"></LAYER>');
}
} else {
document.write('<DIV style="position:absolute;top:0px;left:0px"><DIV style="position:relative">');
for (i=0; i<numFlakes; i++)
{
eval('var picSource=imgFlake' + Math.floor(Math.random()*numImages) + '.src;');
document.write('<IMG id="layerFlake' + i + '" src="' + picSource + '" style="position:absolute;top:0px;left:0px">');
}
document.write('</DIV></DIV>');
}
for (i=0; i<numFlakes; i++)
{
flakeX[i] = Math.round(Math.random()*winWidth);
flakeY[i] = Math.round(Math.random()*winHeight);
flakeSpeed[i] = Math.random()*3+3;
flakeStep[i] = Math.random()*0.1+0.05;
flakeStep2[i] = 0;
}
function fLetItSnow()
{
var winWidth = (ns||ns6||opera5)?window.innerWidth-70:window.document.body.clientWidth;
var winHeight = (ns||ns6||opera5)?window.innerHeight:window.document.body.clientHeight;
var wscrll = (ns||ns6||opera5)?window.pageXOffset:document.body.scrollLeft;
var hscrll = (ns||ns6||opera5)?window.pageYOffset:document.body.scrollTop;
for (i=0; i<numFlakes; i++){
speedX = flakeSpeed[i]*Math.cos(flakeStep2[i])/2;
speedY = flakeSpeed[i]*Math.sin(90*Math.PI/180);
flakeX[i] += speedX;
flakeY[i] += speedY;
if (flakeY[i]>winHeight)
{
flakeX[i]=Math.round(Math.random()*winWidth);
flakeY[i]=-100;
flakeSpeed[i]=Math.random()*3+3;
}
if (ns)
{
document.layers['layerFlake' + i].left = flakeX[i];
document.layers['layerFlake' + i].top = flakeY[i] + hscrll;
} else if (ns6||opera5) {
document.getElementById("layerFlake" + i).style.left = Math.min(winWidth,flakeX[i]);
document.getElementById("layerFlake" + i).style.top = flakeY[i] + hscrll;
} else {
eval("document.all.layerFlake" + i).style.left = flakeX[i];
eval("document.all.layerFlake" + i).style.top = flakeY[i] + hscrll;
}
flakeStep2[i]+=flakeStep[i];
}
setTimeout('fLetItSnow()', 20);
}
// -->
</script>
<script language="JavaScript">
<!--
fLetItSnow();
//-->
</script>
[snowflakes_b][/snowflakes_b] oder [snowflakes_s][/snowflakes_s]
kopiert ihr dann in eine Forenbeschreibung.
Also Adminbereich -> Foren -> Foren verwalten -> Forum (keine Kategorie!) bearbeiten und dort ins Beschreibungsfeld einfügen.
Die Schneeflocken erscheinen dann auf der Startseite im Forum, alles andere wäre eh nervig
funktioniert nur in subsilver2
Neue Codes für FF und IE
iphpbb3com-phpbb3-f27/schneeflocken-t5798-s130.html#p51942
Portal
Den Code am besten in einen eigenen Block einfügen
NEU
für alle die das ganze nicht selbst einbauen und konfigurieren wollen, hab ich schnell einen kleinen "cheat" verbaut.
geht in den adminbereich -> board-einstellungen und schreibt ins Feld "Board deaktivieren:"
ichwillschneeklein
oder
ichwillschneegross