WordPress.org

Ready to get started?Download WordPress

Forums

Christmas Lights (17 posts)

  1. moviefox
    Member
    Posted 5 years ago #

    Greetings,

    Can anyone make a Christmas Lights plugin for WordPress. This javascript can be seen on

    http://www.schillmania.com/projects/snowstorm/

    http://www.schillmania.com/projects/snowstorm/lights/index.html

    TY

  2. secol
    Member
    Posted 5 years ago #

    you dont need a plugin, download the file with the script and images, add this code <script type="text/javascript" src="script/snowstorm.js"></script> in the header.php file.

  3. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    And anyway, there's already a plugin with that very same javascript. :)

    http://wordpress.org/extend/plugins/let-it-snow/

    If you're running 2.7, now might be a good time to try the built in plugin installer. Search for a tag of "snow".

  4. moviefox
    Member
    Posted 5 years ago #

    Guys thank you for the reply. But kindly re-read.....I am talking about the Lights, not the snow.

    Thank You.

  5. secol
    Member
    Posted 5 years ago #

    For the lights its the same, yuo just need to add the files, folders in your server, and add the code to the header of your wp and done.
    the author says

    And the Christmas Lights?

    The christmas lights are a separate experimental script which also has an example. It is undocumented, but the script can be modified to taste if you're the adventurous type.

    here is the code of that page, try to download the js, css and other files needed =)

    <html>
    <head>
    <title>Smashable Christmas Lights</title>
    <link rel="stylesheet" media="screen" href="christmaslights.css" />
    <script type="text/javascript" src="soundmanager2-nodebug-jsmin.js"></script>
    <script type="text/javascript" src="http://yui.yahooapis.com/combo?2.6.0/build/yahoo-dom-event/yahoo-dom-event.js&2.6.0/build/animation/animation-min.js"></script>
    <script type="text/javascript" src="christmaslights.js"></script>
    <script type="text/javascript">
    var urlBase = './';
    soundManager.url = './';
    </script>
    </head>
    <body>
    <div>
     <div id="loading">
      <h1>Christmas Light Smashfest 2008: Prototype</h1>
      <h2>Rendering...</h2>
     </div>
     <div id="lights">
      <!-- lights go here -->
     </div>
     <div style="position:absolute;bottom:3px;left:3px">
      <a href="?size=pico">pico</a> | <a href="?size=tiny">tiny</a> | <a href="?size=small">small</a> | <a href="?size=medium">medium</a> | <a href="?size=large">large</a>
     </div>
    </div>
    </body>
    </html>
  6. secol
    Member
    Posted 5 years ago #

    download the files here

    http://www.schillmania.com/projects/snowstorm/lights/christmaslights.css
    http://www.schillmania.com/projects/snowstorm/lights/soundmanager2-nodebug-jsmin.js
    http://www.schillmania.com/projects/snowstorm/lights/christmaslights.js
    http://www.schillmania.com/projects/snowstorm/lights/soundmanager2_flash9.swf
    http://www.schillmania.com/projects/snowstorm/lights/image/bulbs-32x32-top.png
    http://www.schillmania.com/projects/snowstorm/lights/image/bulbs-50x50-fragments.png

    i think this is all you need, check the page code too, try to copy the exact page, do some test =)

    add this code

    <script type="text/javascript" src="http://yui.yahooapis.com/combo?2.6.0/build/yahoo-dom-event/yahoo-dom-event.js&2.6.0/build/animation/animation-min.js"></script>
  7. MulderDSM
    Member
    Posted 5 years ago #

    I tired implementing this for some time but could never figure out how to do it, too bad there's not just a plug in for the lights like there is for the snow.

    The most I was ever able to accomplish was to get the lights to show on an empty page and couldn't get the sound to work.

    When trying to put in my header.php file, regardless of where I stuck the code it would mess up my header.

  8. MulderDSM
    Member
    Posted 5 years ago #

    Ok, after more work I was able to get it to work on an empty page:

    http://www.livingdowntowndesmoines.com/wp-content/xmas/lights/index.html

    I HOWEVER could NOT get it to work in my header.php file regardless of where I put the scripting lines in the head area, it would always mess up my page display and never show the bulbs.

  9. secol
    Member
    Posted 5 years ago #

    check this on your code

    <script type="text/javascript">
    var urlBase = './';
    soundManager.url = './';
    </script>

    you need to change urlBase and soundManager.url
    try add the full urlhttp://www.livingdowntowndesmoines.com/wp-content/xmas/lights/

    check this too

    <strong><body></strong>
     <div id="lights">
    
      <!-- lights go here -->
     </div>
    <strong></body></strong>

    you just need to put the code with the scripts js, css, etc. on the header, the div id="lights" goes into the body.

  10. MulderDSM
    Member
    Posted 5 years ago #

    Well I played around with this again, it works fine on it own page, but when working on my main blog page, the lights never show up.

    http://www.livingdowntowndesmoines.com

    The code is there, just no lights.

  11. MulderDSM
    Member
    Posted 5 years ago #

    Never mind, I had to remove code again since it disabled some other stuff on my blog.

    I do appreciate your help. My header.php is very touchy, one wrong piece of code and everything goes wacky, don't ask me why.

  12. ntomic
    Member
    Posted 5 years ago #

    I know this is late , being Christmas eve but I only started using WordPress 3 days ago.

    I have made a plugin that uses the light script that you have been talking about. It is not avaliabl yet on the plugins page so if you really want it you can download it from my site as a zip.

    Check out:
    http://www.tomic.com.au - WordPress Projects

    or download directly from:
    Download

  13. brentpowell5
    Member
    Posted 5 years ago #

    I'm having problems. I'd love to get it solved and working before tomorrow...heres a link to my blog:

    http://www.powellentertainment.net/blog

    The error message shown blocks everything. Specifically which template file is "<?php show_lights(); ?>" meant to go in...as I have installed the plugin you made.

  14. bellzebu
    Member
    Posted 5 years ago #

    Thank you ntomic for your contrib.

    I solved a little bug with IE version check (lights doesnt work with IE7)

    look for "function smashInit()" at line 458

    replace

    "if (navigator.userAgent.match(/msie 6/i)) {
    return false;
    }
    "

    with

    "if (false /*@cc_on || @_jscript_version < 5.7 @*/) {
    return false;
    }
    "

    "navigator.userAgent.match(/msie 6/i)" always return true.

    Cheers.

  15. S1nG
    Member
    Posted 5 years ago #

    MulderDSM
    i've seen your site and checked the source of it, what is the link did you use to get the sound working? Where the link refers to the urlBase as well as the soundmanager.url

    <script type="text/javascript">
    var urlBase = './';
    soundManager.url = './';
    </script>

    Any help's appreciated.

  16. villeda
    Member
    Posted 4 years ago #

    I have a problem, i used the ntomic's plugin, and this show the lights on my blog. but deactivates the links on my page, ie: I can not click on the navigation menu. I'm using google chrome.

  17. mindfrost82
    Member
    Posted 4 years ago #

    I also tried this and am having the same problem as villeda.

Topic Closed

This topic has been closed to new replies.

About this Topic