Добавочка-переделочка к скрипту самого запуска фейерверков и салютов....
Расположение условий исполнения через js в самих HTML файлах не есть айс... Один хороший мозг посоветовал вот такую переделочку:
Сам код скрипта
Код: Выделить всё
var r=20+parseInt(Math.random()*16);
for(var i=r; i--;){
setTimeout(function(){
var radius = parseInt(Math.random()*45) + 5;
var particles = parseInt(Math.random()*100) + radius;
var circles = parseInt(Math.random()*7) + 1;
var type = parseInt(Math.random()*6) + 1;
createFirework(radius, particles, circles, type, null, null, null, null, Math.random()>0.5, true);},
(i+1)*(1+parseInt(Math.random()*1000))
);
}
return falsefunction firework_start, и добавляем вот такую картинку
Код: Выделить всё
<script type="text/javascript">
function firework_start () {
var r=20+parseInt(Math.random()*16);
for(var i=r; i--;){
setTimeout(function(){
var radius = parseInt(Math.random()*45) + 5;
var particles = parseInt(Math.random()*100) + radius;
var circles = parseInt(Math.random()*7) + 1;
var type = parseInt(Math.random()*6) + 1;
createFirework(radius, particles, circles, type, null, null, null, null, Math.random()>0.5, true);},
(i+1)*(1+parseInt(Math.random()*1000))
);
}
return false;
}
</script>overall_header.html, к тому, что выше
Код: Выделить всё
<body id="phpbb" class="section-{SCRIPT_NAME} и что-то там еще у кого как...Код: Выделить всё
<script type="text/javascript">
function firework_start () {
var r=20+parseInt(Math.random()*16);
for(var i=r; i--;){
setTimeout(function(){
var radius = parseInt(Math.random()*45) + 5;
var particles = parseInt(Math.random()*100) + radius;
var circles = parseInt(Math.random()*7) + 1;
var type = parseInt(Math.random()*6) + 1;
createFirework(radius, particles, circles, type, null, null, null, null, Math.random()>0.5, true);},
(i+1)*(1+parseInt(Math.random()*1000))
);
}
return false;
}
</script>
<link href="{ROOT_PATH}style/fireworks.css" rel="stylesheet" type="text/css" />
<script src="{ROOT_PATH}script/soundmanager.js"></script>
<script src="{ROOT_PATH}script/fireworks.js"></script>Код: Выделить всё
onclick="firework_start();"styles/prosilver/template/viewtopic_body.html в коде кнопок или нажатия на спасибки найти
Код: Выделить всё
<li id="thanks_button{postrow.POST_ID}" class="{postrow.THANKS_IMG}" >Код: Выделить всё
<li id="thanks_button{postrow.POST_ID}" class="{postrow.THANKS_IMG}" onclick="firework_start();" >Код: Выделить всё
<li id="thanks_button{postrow.POST_ID}" class="{postrow.THANKS_IMG}" <!-- IF S_SCL_ENABLED and S_SCL_UCP_ENABLED -->onclick="firework_start();"<!-- ENDIF -->>Чистим в админке кеши стилей и тем... И вуаля.... Запускаем фейерверки нажимая на кнопки СПАСИБОК... или смотрим как работает мотня, тыкая по ней мыхой и слушая перезвоны от шариков... или запускаем салюты любым нажатием на любую кнопку, к которой вы прилепили клики на исполнение.
Тестовый форум - ТЕСТОВЫЙ ФОРУМ ПЧЕЛКИНА
Ник -
Код: Выделить всё
Test_test_testКод: Выделить всё
Test_test_test
