vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=134)
-   -   want a christmas look (https://vborg.vbsupport.ru/showthread.php?t=90149)

blackpheonix 12-04-2004 10:00 PM

want a christmas look
 
[Template Mod by vBCore]

Hey get into the festive spirit with this little template add-on

first goto admincp then styles & templates then edit templates and locate header and edit at the very very top before anything else. Add this,

Code:

<script type="text/javascript" src="/forum/images/misc/snow.js">

/***********************************************
* Snow Effect 1 -little snowflakes
***********************************************/

</script>

<script language="JavaScript1.2">

/******************************************
* Snow Effect Script 2 -big snow flakes
******************************************/
 

  //Configure below to change URL path to the snow image
  var snowsrc="/forum/images/misc/snow.gif"
  // Configure below to change number of snow to render
  var no = 10;

  var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
  var ie4up = (document.all) ? 1 : 0;
  var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

  var dx, xp, yp;    // coordinate and position variables
  var am, stx, sty;  // amplitude and step variables
  var i, doc_width = 800, doc_height = 600;
 
  if (ns4up||ns6up) {
    doc_width = self.innerWidth;
    doc_height = self.innerHeight;
  } else if (ie4up) {
    doc_width = document.body.clientWidth;
    doc_height = document.body.clientHeight;
  }

  dx = new Array();
  xp = new Array();
  yp = new Array();
  am = new Array();
  stx = new Array();
  sty = new Array();
 
  for (i = 0; i < no; ++ i) { 
    dx[i] = 0;                        // set coordinate variables
    xp[i] = Math.random()*(doc_width-50);  // set position variables
    yp[i] = Math.random()*doc_height;
    am[i] = Math.random()*20;        // set amplitude variables
    stx[i] = 0.02 + Math.random()/10; // set step variables
    sty[i] = 0.7 + Math.random();    // set step variables
    if (ns4up) {                      // set layers
      if (i == 0) {
        document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><a href=\"http://dynamicdrive.com/\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/layer>");
      } else {
        document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"><\/layer>");
      }
    } else if (ie4up||ns6up) {
      if (i == 0) {
        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
      } else {
        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
      }
    }
  }
 
  function snowNS() {  // Netscape main animation function
    for (i = 0; i < no; ++ i) {  // iterate for every dot
      yp[i] += sty[i];
      if (yp[i] > doc_height-50) {
        xp[i] = Math.random()*(doc_width-am[i]-30);
        yp[i] = 0;
        stx[i] = 0.02 + Math.random()/10;
        sty[i] = 0.7 + Math.random();
        doc_width = self.innerWidth;
        doc_height = self.innerHeight;
      }
      dx[i] += stx[i];
      document.layers["dot"+i].top = yp[i];
      document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
    }
    setTimeout("snowNS()", 10);
  }

  function snowIE_NS6() {  // IE and NS6 main animation function
    for (i = 0; i < no; ++ i) {  // iterate for every dot
      yp[i] += sty[i];
      if (yp[i] > doc_height-50) {
        xp[i] = Math.random()*(doc_width-am[i]-30);
        yp[i] = 0;
        stx[i] = 0.02 + Math.random()/10;
        sty[i] = 0.7 + Math.random();
        doc_width = ns6up?window.innerWidth : document.body.clientWidth;
        doc_height = ns6up?window.innerHeight : document.body.clientHeight;
      }
      dx[i] += stx[i];
      if (ie4up){
      document.all["dot"+i].style.pixelTop = yp[i];
      document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
      }
      else if (ns6up){
      document.getElementById("dot"+i).style.top=yp[i];
      document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]);
      } 
    }
    setTimeout("snowIE_NS6()", 10);
  }

  if (ns4up) {
    snowNS();
  } else if (ie4up||ns6up) {
    snowIE_NS6();
  }

</script>

now download snow.zip and upload snow.js and snow.gif to /forum/images/misc/

hope u enjoy!

live demo @ www.vbcore.com/forum

sabret00the 12-05-2004 02:09 PM

nice work, you had any users report slow ness?

blackpheonix 12-05-2004 02:10 PM

thanx not as yet but it is a little slow to start with

sabret00the 12-05-2004 03:43 PM

this doesn't appear to have firefox support btw :(

blackpheonix 12-05-2004 05:02 PM

no i found that out just works with ie

KW802 12-05-2004 05:38 PM

Just installed it at then-and-now.net for the Happy Holidays theme. Works nice, thanks.

platnum 12-06-2004 02:18 AM

This seems to drive my CPU to 100%? :(

platnum 12-07-2004 07:28 PM

I added this to my site.. And it made everyone lag.. I removed the code for the big flakes.. And everything is normal now.. With just the small ones ;)

The big flakes don't work in firefox.. But the smaller ones do.

C_P 12-07-2004 08:57 PM

Do you have the code without the Big ones so we can try it because it does seem to really slow things down BIG time.
Nice look by the way!

platnum 12-08-2004 10:19 AM

Quote:

Originally Posted by C_P
Do you have the code without the Big ones so we can try it because it does seem to really slow things down BIG time.
Nice look by the way!


Code:

<script type="text/javascript" src="/forum/images/misc/snow.js">

/***********************************************
* Snow Effect 1 -little snowflakes
***********************************************/

</script>


C_P 12-09-2004 01:04 AM

I guess you mean to remove that part?

Mechanical Mind 12-12-2004 05:56 PM

I installed, but I am seeing snowing little red X's. ??? What did I miss?

C_P 12-12-2004 05:58 PM

Quote:

Originally Posted by Mechanical Mind
I installed, but I am seeing snowing little red X's. ??? What did I miss?

Quote:

now download snow.zip and upload snow.js and snow.gif to /forum/images/misc/
Right click on your red X's to see where the snow image should be uploaded to.

Mechanical Mind 12-12-2004 06:21 PM

This is the URL that I get when I right click on the "snowing red x's" :D

http://www.mechanicalminds.net/forum.../misc/snow.gif

But my folder isn't called "forum", it is called "forums".

Is this the problem?

Mechanical Mind 12-12-2004 06:32 PM

I figured it out. I just had to modify that path to ...forums... in the code.

Thanks so much. Love it. Just the right touch for my members for the holidays.

*clicks install*

C_P 12-12-2004 06:56 PM

Then upload snow.js and snow.gif to /forums/images/misc/
And possibly all references in the above script change to 'forums'
You may have to check with coder of script though, give it a try.

*Ooops update, you beat me to the reply.

Mechanical Mind 12-12-2004 07:31 PM

Quote:

Originally Posted by C_P
Then upload snow.js and snow.gif to /forums/images/misc/
And possibly all references in the above script change to 'forums'
You may have to check with coder of script though, give it a try.

*Ooops update, you beat me to the reply.

Thanks anyways though. I love advice, even if it is a couple minutes late.

Just joking !!! ;) :rolleyes: :D :p

Mechanical Mind 12-17-2004 12:28 AM

Does anybody know how I could modify this to only show on my portal, which is VBadvanced?

SilverDawn 12-25-2004 03:41 AM

Quote:

Originally Posted by C_P
I guess you mean to remove that part?

No that is the part you want delete the rest of it! :)
PHP Code:

 
 
<script type="text/javascript" src="/forum/images/misc/snow.js">/************************************************ Snow Effect 1 -little snowflakes***********************************************/</script


C_P 12-25-2004 04:20 PM

Quote:

Originally Posted by dfr.sd
No that is the part you want delete the rest of it! :)
PHP Code:

<script type="text/javascript" src="/forum/images/misc/snow.js">/************************************************ Snow Effect 1 -little snowflakes***********************************************/</script


Absolutely perfect! Thank you!

blackpheonix 12-29-2004 10:39 PM

glad u like it

Slapp3r 01-08-2005 12:20 AM

nice bit of work m8

blackpheonix 01-10-2005 12:54 PM

thanks all im glad u all like it


All times are GMT. The time now is 02:30 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01317 seconds
  • Memory Usage 1,783KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete