PDA

View Full Version : Forum Home Enhancements - Fireworks Display


TheInsaneManiac
07-03-2009, 10:00 PM
Want to put on a show for your members on the 4th of July or any other holiday? Then this modification is for you! It will display a fireworks show on the FORUMHOME.

This is a port of my 3.7 modification.


How to change explosion size:
https://vborg.vbsupport.ru/showpost.php?p=1843015&postcount=16

Medtech
07-04-2009, 03:43 AM
Thanks, nice holiday touch!

JointRolla420
07-04-2009, 04:31 AM
screenshot, demo?

TheInsaneManiac
07-04-2009, 05:23 AM
screenshot, demo?
It does what it says. I'm not posting a screenshot, but someone else is more than welcome to. I feel no screenshot is necessary for this modification though. It's just little particles exploding in a circular pattern.

Reycer
07-04-2009, 12:49 PM
hmm...I've got it going on www.lacledeforum.com/forums but it's barely visible.

DobieGillis?
07-04-2009, 01:12 PM
awesome! Installed with the 2 setting.

Reycer
07-04-2009, 01:43 PM
awesome! Installed with the 2 setting.

the 2 setting?? What's that?

DobieGillis?
07-04-2009, 02:16 PM
the 2 setting?? What's that?

as per a few posts prior, I changed the 1 to a 2 for a bigger effect. I actually burned myself using 3.

Reycer
07-04-2009, 03:05 PM
I've changed the settings, it's still really small though, and almost looks like something's tricking your eyes. Not really fireworks.

captkirk685
07-04-2009, 03:07 PM
as per a few posts prior, I changed the 1 to a 2 for a bigger effect. I actually burned myself using 3.

only thing that can be done is upload file to the clientscript directory and then import file,I see no option to change any numbers.

DobieGillis?
07-04-2009, 04:03 PM
I've changed the settings, it's still really small though, and almost looks like something's tricking your eyes. Not really fireworks.

I like it cause it's unassuming, very subtle and doesn't disturb the flow of the forum.

saadessa
07-04-2009, 05:42 PM
very nice i have go now to test i look for it from long time thank you

VonDoom
07-04-2009, 07:06 PM
Good stuff, i agree the effects are just right, Dont wanna blow our forums up ;) Installed

Reycer
07-04-2009, 09:55 PM
I like it cause it's unassuming, very subtle and doesn't disturb the flow of the forum.

I guess what I was looking for was something flashy that I could put on my CMPS homepage. But I really wanted it to stand out.

Chimpie
07-04-2009, 10:34 PM
Uninstalled, only cause it looks so much better on a darker theme.

Great mod. Wish I could have used it.

TheInsaneManiac
07-05-2009, 03:16 AM
I guess what I was looking for was something flashy that I could put on my CMPS homepage. But I really wanted it to stand out.

You can change the size, just open vbulletin_fireworks.js and replace the red number (pretty much all of the number 1s) in the following code with how big you would like it. Keep in mind that the bigger it is, the more they become squares. They are pixels after all and pixels are squares.

if ((document.getElementById) &&
window.addEventListener || window.attachEvent){

(function(){

var showerCol = new Array('#000000','#ff0000','#000000','#00ff00','#ff 00ff','#ffffff','#ffa500','#000000','#fff000');
var launchCol = new Array('#ffa500','#00ff00','#ffaaff','#fff000','#ff ffff');
var launchColour = "#00ff00";
var rs = 30;
var y = 200;
var x = 200;
var h;
var w;
var xs = 190;
var t = null;
var ss = 1;
var e = 360/14;
var f = new Array();
var c1 = -1;
var c2 = 5;
var r;

var pix = "px";

var strictmod = ((document.compatMode) &&
document.compatMode.indexOf("CSS") != -1);

var o;
var domWw = (typeof window.innerWidth == "number");
var domSy = (typeof window.pageYOffset == "number");
var n = 14;
var idx = 1;


for (i = 0; i < n; i++){
if ( document.getElementById(idx+i) ){
idx = (idx+=(n));
}
}


for (i = 0; i < n; i++){
document.write('<div id='+(idx+i)+' style="position:absolute;top:0px;left:0px;'
+'height:1px;width:1px;font-size:1px;background-color:'+launchColour+'"><\/div>');
}


if (domWw) r = window;
else{
if (document.documentElement &&
typeof document.documentElement.clientWidth == "number" &&
document.documentElement.clientWidth != 0)
r = document.documentElement;
else{
if (document.body &&
typeof document.body.clientWidth == "number")
r = document.body;
}
}


function scrl(yx){
var y,x;
if (domSy){
y = r.pageYOffset;
x = r.pageXOffset;
}
else{
y = r.scrollTop;
x = r.scrollLeft;
}
return (yx == 0)?y:x;
}


function wndwsz(){
if (domWw){
h = r.innerHeight;
w = r.innerWidth;
}
else{
h = r.clientHeight;
w = r.clientWidth;
}
o = (w >= h)?h:w;
}


function rst(){
c1 = 0;
launchColour = launchCol[Math.floor(Math.random() * launchCol.length)];
xs = Math.round(100+Math.random() * (o/4));
y = xs + Math.round(Math.random() * (h-(xs*2.2))) + scrl(0);
x = xs + Math.round(Math.random() * (w-(xs*2.2))) + scrl(1);
ss = 1;
for (i=0; i < n; i++){
f[i].backgroundColor = launchColour;
f[i].width = ss + pix;
f[i].height = ss + pix;
f[i].fontSize = ss + pix;
}
dsply();
}


function dsply(){
c1 += c2;
t = setTimeout(dsply,rs);
for (i =0; i < n; i++){
f[i].top = y + xs * Math.sin(i*e*Math.PI/180) * Math.sin(c1/100) + pix;
f[i].left= x + xs * Math.cos(i*e*Math.PI/180) * Math.sin(c1/100) + pix;
if (c1 > 100){
ss = (xs < 150)?1:Math.round(1+Math.random()*2);
f[i].backgroundColor = showerCol[Math.floor(Math.random()*showerCol.length)];
f[i].width = ss + pix;
f[i].height = ss + pix;
f[i].fontSize = ss + pix;
}
}
if (c1 > 160){
clearTimeout(t);
rst();
}
}


function init(){
wndwsz();
for (i = 0; i < n; i++){
f[i] = document.getElementById(idx+i).style;
}
var strt = Math.floor(500+Math.random()*2000);
setTimeout(dsply,strt);
}


if (window.addEventListener){
window.addEventListener("resize",wndwsz,false);
window.addEventListener("load",init,false);
}
else if (window.attachEvent){
window.attachEvent("onresize",wndwsz);
window.attachEvent("onload",init);
}

})();
}

Reycer
07-06-2009, 02:07 PM
yeah I got that from the other thread. I ended up going with the Seasonal Effects Mod.

LAKELURKER001
12-31-2009, 09:55 PM
uninstalled ,slowed forum down to much

BernieK
01-31-2012, 08:12 PM
Is there any chance of an idiots guide for this :D

Ive tried unsuccessfully to add this, any help would be great

mp3president
12-25-2012, 09:54 AM
Perfect, easy to install and adjust.
The fireworks has been changed to 3px (maybe too big) and it's a good show for everyone.
Thanks and marked.

marcus123
01-02-2013, 07:54 AM
is there a version for this in vb4.2?

marcus123
01-02-2013, 08:14 AM
never mind fixed it myself

TheInsaneManiac
07-02-2013, 06:11 AM
For those wanting a 4.x.x version, click here (https://vborg.vbsupport.ru/showthread.php?p=2431642).