Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications

Reply
 
Thread Tools
Snow & other Effects for your forum Details »»
Snow & other Effects for your forum
Version: 1.5, by blackpheonix blackpheonix is offline
Developer Last Online: Jul 2007 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 11-02-2005 Last Update: 05-31-2006 Installs: 119
Template Edits
Additional Files  
No support by the author.

[Original Source & Files Copyrighted to ? Dynamic Drive]

UPDATED:

Ok i have changed the code a little bit and added some images to the zip folder at current i havent added a menu in admin CP to globally turn this off
when i manage to figure out the new hooks system ill have a bash at doing it for you .

You can easily add your own images just upload your image to the effects folder which should be located
in your forums image folder for example /forum/images/misc/effects/
Then change the code to point to the new image name.

The images will only work with the Forum Effects code


ok lets get started .

first goto admincp > styles & templates > edit templates and locate header and edit
at the very very top before anything else. Add one of the following codes,



For small snowflakes add this code

Code:
<!-- Snow Effect(Small SnowFlakes) by Blackpheonix ? to Dynamic Drive -->
<script type="text/javascript" src="/forum/images/misc/effects/snow.js">
</script>
<!-- /Snow Effect(Small SnowFlakes) by Blackpheonix ? to Dynamic Drive -->
find and edit this line

src="/forum/images/misc/effects/snow.js

point it to your forum image path

************************************************** **************************

For big snowflakes and other effects add this code

Code:
<!-- Forum Effects by Blackpheonix ? to Dynamic Drive -->

<script language="JavaScript1.2">
  

  //Configure below to change URL path to the snow image
  var snowsrc="/forum/images/misc/effects/effect(*).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]+'px';
      document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+'px';
      }   
    }
    setTimeout("snowIE_NS6()", 10);
  }

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

</script>
<!-- /Forum Effects by Blackpheonix ? to Dynamic Drive -->
find and edit this line

var snowsrc="/forum/images/misc/effects/effect(*).gif"

point it to your forum image path and delete the (*) and put a number from 1-18 (make sure there is no space for example effect1) to use the pre-added images.

************************************************** **************************

now download forum_effects.zip and upload the effects folder to your forum image path for example /forum/images/misc/


************************************************** **************************

Few addons for this modification.

************************************************** **************************

Let your forum members choose weather or not to display the effect. - Thanks to SHANE-D-PAIN


Go to AdminCP => User Profile Fields => Add new User Profile field => Single Select Menu

Title: View Forum Effects
Description: Choose yes to view forum effects.
Options:
Yes
No
Set Default: Yes, but No First Blank Option
Editable By User: Yes
Display Page: Options: Other Options

Write down your field# . i.e field5


Change X to the Field id.


Just remember to wrap the code with the if tags provided.


Code:
<if condition="$bbuserinfo[fieldX] != 'No'">
Add The Code Here
</if>
For Example:

Code:
<if condition="$bbuserinfo[field5] != 'No'">
<!-- Snow Effect(Small SnowFlakes) by Blackpheonix ? to Dynamic Drive -->
<script type="text/javascript" src="/forum/images/misc/effects/snow.js">
</script>
</if>
<!-- /Snow Effect(Small SnowFlakes) by Blackpheonix ? to Dynamic Drive -->
************************************************** **************************

Make modification optional per usergroup. - Thanks to SHANE-D-PAIN

Code:
<if condition="is_member_of($bbuserinfo[usergroupid], array(1,2,3,4,5))">
Add The Code Here
</if>
Where 1,2,3,4 & 5 are the ids of the Usergroups that this is to be displayed to.

For Example:

Code:
<if condition="is_member_of($bbuserinfo[usergroupid], array(1,2,3,4,5))">
<!-- Snow Effect(Small SnowFlakes) by Blackpheonix ? to Dynamic Drive -->
<script type="text/javascript" src="/forum/images/misc/effects/snow.js">
</script>
</if>
<!-- /Snow Effect(Small SnowFlakes) Effect by Blackpheonix ? to Dynamic Drive -->
************************************************** **************************

To Save on the heavy CPU usage that this mod uses follow the instructions below - Thanks to Solitary Seraph

Please Note, This is for the small snowflakes and not the big ones.

Edit the snow.js with any type of editor (ie. notepad).


Code:
var num = 20;   //Number of flakes 
var timer = 75; //setTimeout speed. Varies on different comps 
var enableinNS6 = 1 //Enable script in NS6/Mozilla? Snow animation could be slow in those browsers. (1=yes, 0=no).
The first two will let you change it, Solitary Seraph changed it to 20/75, and it dropped to about 50% cpu usage for his/her members with bad computers.
Keep tweaking with it and eventually it should work nicely for everyone, or you can turn it off with the last bit, for the mozilla users.

************************************************** **************************

I would also like to thank the following ppl

Smiry Kin's - for the nicer snow image.

************************************************** **************************

PLEASE NOTE: Big snowflakes and other effects may slow down your board and may not be viewable via firefox browsers. The small flakes should be ok and can be viewed by firefox.

hope u enjoy!



[Original & Files Copyrighted to ? Dynamic Drive]

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #82  
Old 02-09-2006, 09:07 PM
Smiry Kin's's Avatar
Smiry Kin's Smiry Kin's is offline
 
Join Date: Dec 2005
Location: United Kingdom!
Posts: 954
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just update thread with new image... n send out emails to every one.. it will be great..
Reply With Quote
  #83  
Old 06-01-2006, 09:37 PM
blackpheonix blackpheonix is offline
 
Join Date: Nov 2004
Location: Great Yarmouth - UK
Posts: 167
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated
Reply With Quote
  #84  
Old 06-01-2006, 10:14 PM
CSS59 CSS59 is offline
 
Join Date: Oct 2004
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool, an update in June LOL
Reply With Quote
  #85  
Old 06-02-2006, 01:28 PM
blackpheonix blackpheonix is offline
 
Join Date: Nov 2004
Location: Great Yarmouth - UK
Posts: 167
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CSS59
cool, an update in June LOL
hehe yeah been rather busy lately and its not just for snow no more so it can be used all year round
Reply With Quote
  #86  
Old 08-07-2006, 01:50 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this work for 3.6 Gold?
Reply With Quote
  #87  
Old 08-07-2006, 02:12 PM
blackpheonix blackpheonix is offline
 
Join Date: Nov 2004
Location: Great Yarmouth - UK
Posts: 167
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alfa1
Does this work for 3.6 Gold?
havent dloaded and installed 3.6 as yet so not sure sorry
Reply With Quote
  #88  
Old 10-03-2006, 10:02 PM
Roan Roan is offline
 
Join Date: May 2006
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and working fine on both of my vB 3.6.1 forums and viewable in IE and FF. I'm using the halloween witch for the time being. Going to make my own graphics for this.

I'd like to restrict the falling effects to just the forumdisplay pages or on my vBAdvanced front end pages, however, as I think it's too annoying to have when you are posting a message or viewing a thread list. Would also save on CPU as well.

Anyone know how to do that?

Roan

Running on both of these sites:

http://bowheads.org/forums/cmps_index.php
http://aquafacts.net
Reply With Quote
  #89  
Old 11-13-2006, 04:52 PM
SparKeh SparKeh is offline
 
Join Date: May 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its good but effect2 is only showing to the end of the first post really, is there no way it can show the whole way to the bottom of the page?
Reply With Quote
  #90  
Old 12-06-2006, 10:02 AM
alawee.blawee's Avatar
alawee.blawee alawee.blawee is offline
 
Join Date: Oct 2006
Location: IraQ
Posts: 290
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
Reply With Quote
  #91  
Old 12-13-2006, 04:22 PM
fishhub fishhub is offline
 
Join Date: Aug 2006
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

waiting for the AdminCp disable function

However, great mod!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:09 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07627 seconds
  • Memory Usage 2,313KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete