Christmas Lights
-
Greetings,
Can anyone make a Christmas Lights plugin for WordPress. This javascript can be seen on
https://www.schillmania.com/projects/snowstorm/
https://www.schillmania.com/projects/snowstorm/lights/index.html
TY
-
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.And anyway, there’s already a plugin with that very same javascript. ??
https://www.ads-software.com/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”.
Guys thank you for the reply. But kindly re-read…..I am talking about the Lights, not the snow.
Thank You.
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 saysAnd 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="https://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>
download the files here
https://www.schillmania.com/projects/snowstorm/lights/christmaslights.css https://www.schillmania.com/projects/snowstorm/lights/soundmanager2-nodebug-jsmin.js https://www.schillmania.com/projects/snowstorm/lights/christmaslights.js https://www.schillmania.com/projects/snowstorm/lights/soundmanager2_flash9.swf https://www.schillmania.com/projects/snowstorm/lights/image/bulbs-32x32-top.png https://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="https://yui.yahooapis.com/combo?2.6.0/build/yahoo-dom-event/yahoo-dom-event.js&2.6.0/build/animation/animation-min.js"></script>
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.
Ok, after more work I was able to get it to work on an empty page:
https://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.
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 urlhttps://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.
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.
https://www.livingdowntowndesmoines.com
The code is there, just no lights.
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.
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:
https://www.tomic.com.au – WordPress Projectsor download directly from:
DownloadI’m having problems. I’d love to get it solved and working before tomorrow…heres a link to my blog:
https://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.
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.
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.
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.
- The topic ‘Christmas Lights’ is closed to new replies.