wohali Posted December 4, 2015 Posted December 4, 2015 This is the support thread for the Snow plugin. The Snow plugin adds a festive, wintry touch to any IPS4 website with configurable JavaScript-driven snow. Features: Snow that gently falls and gathers, with wind speed and direction determined by the mouse X position. Settings provided include: Number of snow particles on screen and active ("falling") at any time Configurable Animation tick rate Snow Color (with color picker) Snow by default is in the header, but can be configured to be in any HTML element ID, or within the document body. Snow "floor" can be set in pixels (the absolute pixel value at which the snow stops falling or sticks) Stickiness of snow (does it stick to the bottom of the window/element or not?) Twinkle effect - snow fades in and out as it goes down the screen Optional support for mobile devices (will be cruel to their CPU and battery!) Enjoy what is perhaps the second most useless plugin ever developed for IPS4! Original BSD-licensed code for snowstorm provided by Scott Schiller (2007). WARNING: Will slow down browsers. As the JavaScript implementing this functionality is not mine, only critical IPS-breaking issues will be fixed. What you see is what you get, take it or leave it. Known issues: When targeting document.body (leave target parameter blank), the IPS main content blocks the snow effect, leaving the snow only in the header and the side margins of the page. Scrolling to the bottom of the page can result in an "infinite scroll" situation. As a result the default target is the header block only. Kamino and FirebirdRUS 2
Koby Posted December 4, 2015 Posted December 4, 2015 (edited) Installed it, but the snow is coming out black even though it's set as FFFFFF in the settings. UPDATE: Enabling 'Enable snow twinkle effect?' turned the snow white. =) Edited December 4, 2015 by Koby wohali 1
wohali Posted December 4, 2015 Author Posted December 4, 2015 (edited) Weird. What browser are you using? I have twinkle off and the colour set to DFBFFF and it shows up as that colour in Mozilla, Chrome and IE11 (all on Windows 7 SP1 64-bit) here. Edited December 4, 2015 by wohali
Steven Thacher Posted December 5, 2015 Posted December 5, 2015 I tested with chrome and edge seems to work just fine. I had it in the body but it kept making the board index longer.....So i just switched it back to the header and working great. Thanks for this one. wohali 1
qiu shanlong Posted December 5, 2015 Posted December 5, 2015 http://prntscr.com/9al7sk Please fix this bug, the page scroll just keeps increasing at the footer.
wohali Posted December 5, 2015 Author Posted December 5, 2015 (edited) Known issue and I don't know how to fix it, it's not my JavaScript. All I did was wrap it up into an IPS plugin. I will try and take a look, but I can't promise anything... That's why the default is snow in the header only. I might just force that to be the only option since I can't fix the known issue. Edited December 5, 2015 by wohali Shyuan 1
Greg W Posted December 5, 2015 Posted December 5, 2015 11 hours ago, qiu shanlong said: http://prntscr.com/9al7sk Please fix this bug, the page scroll just keeps increasing at the footer. This is not a bug with the plugin, it is something in the actual javascript file as in you need to put an end limit to the distance the snow goes down. If you leave it at default, it carries on falling forever & that is why your page keeps getting longer forever. I put this on my site a few weeks ago when I did a Christmas skin & because of this, I had to change it. With a forum, you cannot really specify the length as it changes on differnet pages, so I put it that it snows on the header image only... So you can see it settling at the bottom of the header. It also stopped the distraction of snow going across the topics & posts, so in the long run, I thought it was the best idea. So, to stop it at a certain point, you need to add this in the script... snowStorm.flakeBottom = 198; // stops at botton of header Just change the number to where you want it to stop.
wohali Posted December 6, 2015 Author Posted December 6, 2015 (edited) 12 hours ago, Greg W said: So, to stop it at a certain point, you need to add this in the script... snowStorm.flakeBottom = 198; // stops at botton of header Just change the number to where you want it to stop. By default, in my plugin version, the snow targets the header div only. The poster qiu used an option I provide to retarget the document.body instead. If the poster had left it at the default, then the snow would stay within the header and would never scroll past that. No pixel-specific limit is required. That said, I provide plugin setting options for the flakeBottom number as well as the ability to reselect the div section. No need to edit your skin or the script directly! Edited December 6, 2015 by wohali
wohali Posted December 6, 2015 Author Posted December 6, 2015 OK, I fixed the bug in the JavaScript, thanks to a bout of insomnia. A new version, 1.0.1, has been uploaded. Details of the fix are at my pull request into the upstream JS library @ https://github.com/scottschiller/Snowstorm/pull/23
wohali Posted December 6, 2015 Author Posted December 6, 2015 @qiu shanlong please review and let me know if this fixes your problem.
Mr.Jake Posted December 11, 2015 Posted December 11, 2015 (edited) Thank you for making this for 4.x Great work! Could i ask you to add option for how much snow it keeps on bottom? If i remember right, in the .js file there was option for it when i used this in some project. I think it was these two options: this.snowStick = true; // Whether or not snow should "stick" at the bottom. When off, will never collect. this.useMeltEffect = true; // When recycling fallen snow (or rarely, when falling), have it "melt" and fade out if browser supports it I would like it to pile up some amount of snow before removing it. Thanks a lot again Edited December 11, 2015 by Mr.Jake Found those options i would like to have wohali 1
wohali Posted December 12, 2015 Author Posted December 12, 2015 Hi there, snowStick is set to true by default; I can look at adding a way to turn it off if you want. I'll also look at adding the useMeltEffect option. What you want to do is increase the Max Active Snowflakes setting, which should increase how much snow piles up at the bottom. In short, if I understand the code correctly, Max Active Snowflakes - Max Snowflakes = Snowflakes in the pile at the bottom of the header/body. Mr.Jake 1
tAPir Posted December 12, 2015 Posted December 12, 2015 Anyone know how to change the character to an asterix please? Mr.Jake 1
Mr.Jake Posted December 12, 2015 Posted December 12, 2015 6 hours ago, wohali said: Hi there, snowStick is set to true by default; I can look at adding a way to turn it off if you want. I'll also look at adding the useMeltEffect option. What you want to do is increase the Max Active Snowflakes setting, which should increase how much snow piles up at the bottom. In short, if I understand the code correctly, Max Active Snowflakes - Max Snowflakes = Snowflakes in the pile at the bottom of the header/body. Ah it is on then. Maybe they just melt too fast even i've set max flakes to 500. Have to max them out more then, but would really appreciate if you could add the option to turn melt off 2 hours ago, tAPir said: Anyone know how to change the character to an asterix please? That option is also in the .js file. But i don't even know where plugins puts all files so tell me if some of you are wiser than me this.snowCharacter = '•'; // • = bullet, · is square on some systems etc. tAPir 1
Greg W Posted December 12, 2015 Posted December 12, 2015 In the original js setup, you can set... snowStorm.snowCharacter = '*'; tAPir 1
tAPir Posted December 12, 2015 Posted December 12, 2015 3 hours ago, Greg W said: In the original js setup, you can set... snowStorm.snowCharacter = '*'; I couldn't find the js but your post gave me a clue to put this in the xml file and reinstall: snowStorm.snowCharacter = \'*\'; Thank you
wohali Posted December 12, 2015 Author Posted December 12, 2015 I will add snowCharacter, snowStick and useMeltEffect admin-configurable options to the plugin this weekend, so you don't have to edit the XML. tAPir and Mr.Jake 2
wohali Posted December 12, 2015 Author Posted December 12, 2015 New version 1.1.0 uploaded. Changelog: Quote ACP settings added for HTML entity (default •), useMeltEffect, flakeWidth and flakeHeight. (Try setting the flake HTML entity to ❄ and increase flake W/H!) Improved fix for scroll bug when targeting document.body. Improved ability to target document.body if desired (use document.body rather than leave option blank). tAPir and Mr.Jake 2
EmpireKicking Posted November 1, 2016 Posted November 1, 2016 Is there away to control on what theme that I want to have the snow on? I have three themes and only wanted on one of them!!! wohali 1
wohali Posted November 1, 2016 Author Posted November 1, 2016 6 hours ago, Michael R said: Any update for 2016? The add-on is stable. Is there any sort of functionality you'd like to see added? 52 minutes ago, EmpireKickass said: Is there away to control on what theme that I want to have the snow on? I have three themes and only wanted on one of them!!! Good question. Let me look into feasibility. I don't know if I can retrieve the names of all of the installed themes, and/or check which theme is active at the time of page render, but I'll give it a go.
Michael R Posted November 1, 2016 Posted November 1, 2016 1 hour ago, wohali said: The add-on is stable. Is there any sort of functionality you'd like to see added? Good question. Let me look into feasibility. I don't know if I can retrieve the names of all of the installed themes, and/or check which theme is active at the time of page render, but I'll give it a go. Can the user turn it off for them personally? Can it be on or off for mobile? InsideEdge 1
EmpireKicking Posted November 1, 2016 Posted November 1, 2016 2 hours ago, wohali said: The add-on is stable. Is there any sort of functionality you'd like to see added? Good question. Let me look into feasibility. I don't know if I can retrieve the names of all of the installed themes, and/or check which theme is active at the time of page render, but I'll give it a go. Reasons since I have two Ipsfocus themes that already have that option built in and the others don't have that option, So I need to able to have your plugin snow on for the default and not for the ipsfocus themes
CP_User Posted December 7, 2016 Posted December 7, 2016 @wohali any chance this could be updated to support 4.1.17.1 ?
Recommended Posts