Link to the mod (https://custom.simplemachines.org/index.php?mod=4199)
SMF-Snowflakes
Seasonal Effects Modification c/o Chen Zhen
Copyright 2014 - 2024, Chen Zhen @ web-develop.ca
Compatible with the SMF 2.1.X branchRequirements: PHP 7.4 or better, modern mainstream browserNavigate to: ADMIN -> MODIFICATION SETTINGS -> SNOWFLAKES to enable and adjust settings for this modificationThis installation process will add options to the mod settings template
which will allow an administrator to opt various types of snowflake and animated image scripts.
This will allow all your users to view these scripts on all of your website pages.
Distributed under the GNU Lesser General Public License version 3 (https://opensource.org/licenses/lgpl-3.0.html)
Available effects:
- Four types of snowflakes: Snowflakes, Flurry, Diverse & Snowstorm
- Fireworks
- Flying Bats
- Xmas Lights
- Xmas Light Strands
- Xmas Wired Lights
- Random (some/all of the above)
- Many more available under the headings of "Diverse" & "Halloween" (ie. rain, leaves, bees, butterflies, doves, etc.)
- Your own images can be uploaded in the Halloween, Diverse or Xmas Wired Lights options
Available options:
- Various settings for all of the effects (available when each are selected in the admin)
- Enable/disable options for: modification, members, specific actions/sub-actions, mobile or tablet detection
- Ability to enable/disable JQuery library for the SMF 2.0 branch (ie. disable when already available from another modification)
- Upload/change images for some of the effects
Disclaimer:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Nice job! The only thing I could wish for is the ability to have more than one choice selectable (not counting the random option). :)
It seems pretty good, I'll install it in a test forum to see it better. Great job @Chen Zhen
Regards!
Thanks ;D
Quote from: Steve on December 24, 2018, 11:09:50 AM
Nice job! The only thing I could wish for is the ability to have more than one choice selectable (not counting the random option). :)
The random effect option lets you opt the effects you want in the form of a check list.
Do you mean to let the member opt the effect instead of just the Admin?
As I understand it, the random effect rotates through whatever is checked so that there is only one effect happening at a time.
I wish I could select two or more of the effects and have them all show at the same time.
But that's only a wish. Like I said, great job on the mod as it is. :D
I just released version 1.6 which has some important updates.
Please uninstall plus delete the older version, then download & install the newer one.
Read the change-log in the app or in this mods initial post for details.
This update mainly concerns fixing the snowstorm & lights effects.
It also adds a newer light-strands effect.
The lights effect was previously using Soundmanager2 and its script was conflicting with other jQuery on the page.
This has been fixed in Snowflakes v1.6 along with using ion.sound v3.0.7 instead of Soundmanager2.
@Steve:
I can look into what you requested although I will have to test them with each other to see if they do not conflict (variable & function wise).
Having that many scripts running on the page at one time may almost certainly cause a performance concern.
No worries Chen Zhen. It was only wishful thinking and I don't want you going through a lot of work just to do this.
Thanks for the update. :D
Hmm ... I see only options for the snowflakes. No lights, no bats, etc.
@Steve:
I just tested it on both SMF 2.0 & SMF 2.1 branches.
As well as installing when it was installed previously and when it was not.
In all scenarios it functions as expected with no PHP errors, no Javascript errors, no conflicts and nothing missing in any admin menu.
Although this was using the default theme in those tests.
What theme are you using?
I can not seem to duplicate what was reported.
Please uninstall it from your forum, clear the forum cache, clear the browser cache/history, download the version from here again and then install it.
Let me know if it works properly or not after those steps.
Thanks.
My apologies Chen Zhen. I'm an idiot. I totally missed the dropdown box which switches effects. It works as advertised. (https://i.imgur.com/Wm1mvsd.gif)
@Steve:
No problem and I'm glad it works as expected.
Even though I chose the name "Snowflakes", it has many effects including the ability to customize the images for "Diverse" & "Halloween".
Diverse provides a drop effect and Halloween provides a hover effect.
Which have options to change size, density, speed, images, etc.
You can make floating bees, leaves, falling rain drops or whatever you want.
What I should do is provide the ability to save multiple configurations for those 2 options.
Snowflakes v1.61 is now available.
This update fixes issues with the smash lights effect.
Please read the change-log located in the initial post of the thread for details.
Regards.
Anyone have a link to a forum where this is in use so I can see what it looks like ?
Snowflakes has been updated to version 1.62.
This update includes some bug fixes and extra admin options.
The newer settings can make it so when a user has their mouse over specific HTML/XHTML containers, the lights will be temporarily disabled.
This will allow you to have those lights at the top in the position you want but not interfere with any links or navigation.
@landyvlad:
I have this mod enabled on my website and it is set to random.
You can click on the Forum link in the nav bar multiple times to see different effects.
However, due to the season I have 2 of the effects turned off (6 are enabled).
Snowflakes has been updated to version 1.7
This update includes some bug fixes and another added wired lights effect.
The new effect has multiple image options including the ability to add your own images.
Hi,
Not working in SMF 2.1 RC2 with default theme.
Installs without error but when clicking on 'settings' just gives a blank page. Nothing listed in error log either.
6 hooks installed and listed as active.
No other mods installed.
Works OK on 2.0.15
Quote from: davejo on September 28, 2019, 08:53:44 AM
Hi,
Not working in SMF 2.1 RC2 with default theme.
Installs without error but when clicking on 'settings' just gives a blank page. Nothing listed in error log either.
6 hooks installed and listed as active.
No other mods installed.
Works OK on 2.0.15
Update:
It doesn't play nice with SMFPacks Shoutbox in 2.0.15. When enabled it has the error as seen in the first & second image below. When I activate 'Apend to body' the error is then smaller as seen in the second/third image below.
There are no erros in the SMF log and no errors on the cPanel either. I've tested it on various different themes including default and different sites. The php for all sites is 5.6. I have tested it on the Pro version and free version of the Shoutbox with the same results.
It's such a shame as I really like this mod.
I would take a look at what you reported but atm it appears the SMF 2.1 version of that shoutbox mod is paid/pro only.
Although I suppose I can test the SMF 2.0.15 version from this forum to see if it has the same problem you reported.
Quote from: Chen Zhen on November 04, 2019, 10:05:21 PM
Although I suppose I can test the SMF 2.0.15 version from this forum to see if it has the same problem you reported.
Thanks Chen I would really like to use this mod.
I just tested this on SMF 2.0.15 with the SMF Packs shoutbox installed and enabled.
Both mods seem to be working without conflict.
Atm I am not able to duplicate the javascript issue you reported (as per your first posted image).
Quote from: Chen Zhen on November 10, 2019, 05:00:42 PM
I just tested this on SMF 2.0.15 with the SMF Packs shoutbox installed and enabled.
Both mods seem to be working without conflict.
Atm I am not able to duplicate the javascript issue you reported (as per your first posted image).
Thanks for looking Chen,
Not sure what it can be then as I tested it with the free shoutbox version on 3 different sites with the same issue all using the default theme.
I will do the same as you and test it on a new install and see what happens, perhaps it's a host thing.
Hi Chen,
Ok did the same as you and you are correct that there are no errors, see image attached.
So now I don't know what the issue is, I guess that there is a JS conflict somewhere that is one step too much. I might try to install the other mods I have on the live site, on the test site, and see if I can get the the root of it.
Thank you for at least looking
Yes install your other mods one at a time until you find the culprit.
OK now found out what the issue is. I should add that this was done on a new install of 2.0.15 with PHP5.6
It's all related to the SMF Smileys settings.
If you have Smileys that you don't want to show on the 'Post Form' and opt for the 'Pop Up' then this is when the error happens.
If you set all your smileys to 'Post Form' the error is not there, as seen in image 4, so obviously now that's what I've done...not sure if this can be called a bug or not and if it is who's bug is it?
I have taken screen shots, see below
It's worth noting that this doesn't happen on the new topic posting page nor on the reply to post either.
Quote
If you have Smileys that you don't want to show on the 'Post Form' and opt for the 'Pop Up' then this is when the error happens.
I'm looking at the smiley settings in a localhost setup of SMF 2.0.15 right now and I do not see those settings.
Are you positive that this is not settings added by some sort of mod or am I looking in the wrong admin template?
Please provide a screenshot that shows the appropriate admin sub-menu that includes those settings.
Looks like a shoutbox mod combined with customised smileys being enabled.
Gents,
Just started from scratch again to try and get some idea of this. I know you probably know all this but I'm also trying to get a handle on why this is happening but can't so I'm hoping you guys will.
So on a new install I left the 'Smileys' to default...image 1
Next I checked the box for 'Enable customised smileys' (no new set installed)...image 2
This then expands to menu for smileys to enable you to choose to edit them etc..image 3
I edtied the 'Afro' smiley so it would be seen on the pop up
I then install Shoutbox, post a test message, when I click on the smiley button you can see the option for 'more' is at the end...image 4
Now I install 'Snowflakes' and enable it, go back to the shoutbox and in image 5 you can see the results.
It seems that everything is OK when it's just the shoutbox installed and Snowflakes is not enabled. I obviously don't know where the issue lies this is only my interpretation of the issue.
I should also add there are no errors in the SMF error log and none in the cPanel host error log either
On the live site I've now discabled all the pop up smileys so this doesn't happen anymore.
So I will leave it to you to ponder.
That shoutbox mod has some poorly written javascript and HTML.
Take a look using a validator and you will see what I am referring to.
The author used document.write which IMO should perhaps be used during testing but not for stable usage.
DOM is usually the preferred method.. perhaps they improved the pro version.
Anyhow.. here is a template file you can use as a replacement for that mod.
It should be placed in the Themes/default directory to overwrite that mod's file.
Your smileys popup now appears directly above the shoutbox.
I did not test it thoroughly to include multiple smileys displayed in the popup.
Test it out and let me know if there is a problem with it.
Thanks Chen I'll check it out
OK replaced the original with your version Chen and it's all working OK. Thank you very much for your help, it's much appreciated.
Quote from: davejo on November 25, 2019, 02:47:08 AM
Thanks Chen I'll check it out
OK replaced the original with your version Chen and it's all working OK. Thank you very much for your help, it's much appreciated.
OK another update. I suppose I really should have checked everything but just checked the pop up smiley issue.
The file you have posted will clear that issue but then if you try to go in to 'Setting' in Admin it says that the tempate can't be found.
I have resolved that by re-inserting the code from the end of the original shoutbox.template file into the one you have created.
There are a couple of other issues too but I'll try to resolve those myself.
I just wanted to post this here incase someone else has the same problem and then replaces the original file with yours Chen
If it helps I have attched the original template for the original Pro V13 shoutbox mod. As my license has expired I cannot get a more recent version of the file which might of course resolved the issue.
I do appreciate what you have done though Chen, thank you.
I found some suspected issues with that last file.
Attached to this post is your edited template for the pro version of SMF Packs Shoutbox.
It will now work with multiple smileys in the "more" popup.
The file attached to this post is for the public version of SMF Packs shoutbox.
I add this in case anyone else is looking for the same fix but for the public version.
Quote from: Chen Zhen on November 25, 2019, 09:05:36 PM
I found some suspected issues with that last file.
Attached to this post is your edited template for the pro version of SMF Packs Shoutbox.
It will now work with multiple smileys in the "more" popup.
Thanks again Chen, I will have a look
Actually use the one attached to this post.
It should add a space before a smiley (not after).
Hi Chen,
The other one seemed to work ok and the new one does too. I now have the site running with no errors and the Snowflakes works with the shoutbox.
Once again thank you for all your help
Sorry I posted this in another thread b4 but figured I'd post it here since I believe this mod is causing my problems. ;)
I'm have an issue when previewing a post. At the end I get "null null". But when I actually post something the "nulls" arent there. So I uninstalled this mod and the "null null" on preview post was not there. Then I reinstalled this mod and the "nulls" showed up again. Any ideas? (see attachment)
This mod installed on SMF2.0.17
I also installed it on 2.1RC3 and no problems
Navigate to its admin settings and enter the appropriate action in the disable input field:
List actions/subactions to disable Snowflakes (comma separated)
An example setting:
post
.. this will disable the mod when someone is making or editing a post.
Quote from: Chen Zhen on November 25, 2020, 07:27:16 PM
Navigate to its admin settings and enter the appropriate action in the disable input field:
List actions/subactions to disable Snowflakes (comma separated)
An example setting:
post
.. this will disable the mod when someone is making or editing a post.
Ok, well that stopped the snowflakes while editing or posting but still getting that "null null" on preview!? Its not really a problem cause it post normal but would like to figure out whats causing it. Must be having conflict between this mod and another cause when I uninstall this one the "null null" is not there. :o
I am able to duplicate the problem on the SMF 2.0 branch.
Although when disabled for that action it doesn't load any of its css or JavaScript nor does it show any console errors.
I can give you a temporary patch for your post template until I can resolve the problem without parsing/editing SMF files.
file: ../Themes/default/Post.template.php
find:
bodyText += preview.getElementsByTagName(\'body\')[0].childNodes[i].nodeValue;
replace with:
bodyText += preview.getElementsByTagName(\'body\')[0].childNodes[i].nodeValue ? preview.getElementsByTagName(\'body\')[0].childNodes[i].nodeValue : "";
Quote from: Chen Zhen on November 26, 2020, 08:33:52 PM
I am able to duplicate the problem on the SMF 2.0 branch.
Although when disabled for that action it doesn't load any of its css or JavaScript nor does it show any console errors.
I can give you a temporary patch for your post template until I can resolve the problem without parsing/editing SMF files.
file: ../Themes/default/Post.template.php
find:
bodyText += preview.getElementsByTagName(\'body\')[0].childNodes[i].nodeValue;
replace with:
bodyText += preview.getElementsByTagName(\'body\')[0].childNodes[i].nodeValue ? preview.getElementsByTagName(\'body\')[0].childNodes[i].nodeValue : "";
Works great now thanks!
Snowflakes has been Updated to version 1.72.
v1.72
! fixed conflict with SMF 2.0.X branch post preview template
@Shades:
Thanks for the report!
You can revert the previous edit if you decide to update the mod.
Updated and it works great thank you! 8)
Hi Chen,
The diverse setting is not working on any site that's using the 'Xmas' theme, any idea what it could be?. I am admin on 3 sites and it doesn't work on any of them, as soon as I refer back to our default theme it's OK.
All other selections work fine.
Using v1.72
SMF 2.0.17. PHP 5.6
regards
Dave
PS> It's disabled for mobile and tablet as something makes the page seem go go in and out on my tablet 'Tab S6'
I have SMF 2.1 RC3. I installed snowflakesSMF_v1.7x and it crashed my forum with a 503
Quote from: rusbowden on December 04, 2020, 01:03:29 PM
I have SMF 2.1 RC3. I installed snowflakesSMF_v1.7x and it crashed my forum with a 503
More info.
I am wondering if the issue is that Snowflakes is incompatible with the Lunarfall_v0.7.1.
No matter, my question is
Now what do I do?
@davejo:
You are correct as I just tested it on a custom theme and the diverse setting is not working.
I will look into it & thank you for the report.
@rusbowden:
I just tested it on SMF 2.1 RC3 with the Lunarfall theme whereas everything seems to be working just fine without errors.
Snowflakes does not edit any SMF files because it uses hooks therefore as long as it added the hooks to your DB properly and its Source files exist in the proper directory (../Sources) then it should be functioning properly.
If you think you have an issue with a theme you can always use ../index.php?theme=1 in the URL to use the default theme although I doubt that is the problem.
Snowflakes is disabled for your Admin section by default (so long as you didn't enable that setting for it) therefore you can try to use ../index.php?action=admin in your URL to navigate to your admin section leaving snowflakes disabled in the process.
From there you should be able to uninstall the mod.
Quote@rusbowden:
I just tested it on SMF 2.1 RC3 with the Lunarfall theme whereas everything seems to be working just fine without errors.
Snowflakes does not edit any SMF files because it uses hooks therefore as long as it added the hooks to your DB properly and its Source files exist in the proper directory (../Sources) then it should be functioning properly.
If you think you have an issue with a theme you can always use ../index.php?theme=1 in the URL to use the default theme although I doubt that is the problem.
Snowflakes is disabled for your Admin section by default (so long as you didn't enable that setting for it) therefore you can try to use ../index.php?action=admin in your URL to navigate to your admin section leaving snowflakes disabled in the process.
From there you should be able to uninstall the mod.
The crash was immediate upon installation. If not the theme, then something. It's uninstalled for good now.
Thanks for looking into it.
Omg this is what im looking for, thank you thank you
Snowflakes has been updated to version 1.73.
v1.73
! fixed: Xmas Wired Lights display none/flex for mouseover/mouseout
! fixed: Diverse & Fireworks use last child of body tag instead of #wrapper id
! fixed: missing concatenating assignment operator for $context['settings_insert_below']
! fixed: body overflowY & position properties for Fireworks
! fixed: Xmas Light Strands script for SMF 2.0
@davejo: Diverse should now work for you on all your themes.
Quote from: Chen Zhen on December 06, 2020, 10:59:21 PM
@davejo: Diverse should now work for you on all your themes.
Thanks very much Chen
Hi Chen,
On updating and then checking the mod it seems that 2 of the sites get the following error (see attachment) when clicking on the save button. The 3rd site gets no errors at all.
The only difference for the sites is that 2 (with the errors) are on one host and the third (with no errors) is on a different host
I should add that there is nothing wrong with the mod working, the diverse is now OK and so is everything else
I suppose it's possible that a PHP setting (such as open_basedir) may be causing more restrictive behavior.
No problem.. I adjusted it yet again but I'd like you to try it first (from my site) & let me know if it works without error on those 2 websites before I release it here.
ref.
https://web-develop.ca/index.php?action=downloads;area=stable_smf_modifications;file=37
Thanks.
Hi Chen,
I uploaded to site 1 and it worked fine no errors once installed. Site 2 still had the issue, then I checked the php version being used and it was different @ 5.6 so changed to php 7 and now it's working fine.
The host had changed the php version from 5.6 to 7 on my personal site that's why it worked ok.
So all sites are now working OK working on php 7
Thanks for your help Chen
This mod has been updated to version 1.74.
v1.74
! fixed: no image directory check for empty path name
@davejo:
You should update here or on my site again even though it shows the same version.
What you downloaded was just a quick test but I found something that needed adjustment which has been applied to the proper release.
Quote from: Chen Zhen on December 08, 2020, 09:39:47 PM
@davejo:
You should update here or on my site again even though it shows the same version.
What you downloaded was just a quick test but I found something that needed adjustment which has been applied to the proper release.
Ok Chen will do. Thank you for all your help.
@Chen Zhen
I turned on the snowflakes, but unfortunately not all options work. These options don't work:
Diverse
Fireworks
Xmas Lights
Xmas Lights Strands
Xmas Wired Lights
What could be causing this?
Is this regarding the SMF 2.0.X branch?
If it is then try enabling/disabling the jQuery library in Snowflakes settings.
Those effects need jQuery but this mod should only load the library if it is not already available from another mod.
Yes, the forum runs on SMF 2.0.17
I installed the latest version of this mod 1.74 and only these effects are not displayed:
Xmas Lights
Xmas Lights Strands
Xmas Wired Lights
Quote from: Chen Zhen on December 15, 2020, 10:12:15 PM
If it is then try enabling/disabling the jQuery library in Snowflakes settings.
Those effects need jQuery but this mod should only load the library if it is not already available from another mod.
All effects are displayed correctly in the test forum. But on the official forum, unfortunately the lights do not show on the enabled or disabled jQuery library. I have SMFPacks Shoutbox Pro installed on the forum, maybe is an incompatibility here?
The same error occurs in the forum:
https://www.simplemachines.org/community/index.php?topic=564196.msg4037928#msg4037928
The attachment for this post: [Click Here] (https://www.simplemachines.org/community/index.php?topic=564196.msg4038645#msg4038645) ... is a replacement file for that shoutbox mod. Try it out to see if it resolves your problem.
It does in fact, resolve the same problem I had with one minor glitch. When I go to my forum's index page the shoutbox loads normally, At it's next automatic refresh, it hangs up. Refreshing the page resolves that problem.
Edit: it doesn't seem to be doing it now so maybe it was a problem on my end. I have some custom mods which may be interfering.
For SMF Packs Shoutbox make sure you download the appropriate file because 1 is for pro and the other is for the free version.
The pro version has a different file that loads some sort of modal JS library.
I'm sorry but which one is for Pro?
This one?:
https://www.simplemachines.org/community/index.php?topic=564196.msg4038645#msg4038645
Yes but I haven't tested the pro file because I do not have that version.
If I remember correctly all I did was edit that file with similar edits that I did to the public file.
The public version works fine for me.
Note that you can't test it with 2 windows opened in the same browser.
If you're going to test the shoutbox you need to have 2 different user accounts but log into them using different browsers.
ie. Edge for one user and Chrome for the other.
I believe the shoutbox is designed not to refresh for the same user in the same browser because it updates in the browser you shouted in.
Quote from: Chen Zhen on December 16, 2020, 07:07:49 PM
The attachment for this post: [Click Here] (https://www.simplemachines.org/community/index.php?topic=564196.msg4038645#msg4038645) ... is a replacement file for that shoutbox mod. Try it out to see if it resolves your problem.
@Chen Zhen
Unfortunately, this file does not solve this problem, these effects are still not displayed: Xmas Lights, Xmas Lights Strands, Xmas Wired Lights
And unfortunately, this file on my forum did not fix the display of the window with additional emoticons. This file from the attachment broke this feature more.
I have SMFPacks Shoutbox Pro 1.4.5 and the Shoutbox.template.php file is v1.4.4
Can you do this for this version? I can attach this file.
Temporarily uninstall Ohara YouTube Embed and then see if it works.
Unfortunately, these effects still don't work after uninstalling the Ohara YouTube Embed mod.
I would also like to fix this bug. There is a collision between the SMFPacks Shoutbox Pro modification and your modification. Can you help me fix this bug?
(https://i.imgur.com/0aKRfNr.png)
jsx try using the attached file.
Rename your original file by adding a 1 after the word 'template' then upload this version. It should stop the issue with the shoutbox and also help the snowflakes to work.
What will not work is the 'Smileys' [more] 'Pop Up' button, although the smileys you have on the 'Post form' will still work.
If you switch off 'Snowflakes' at the end of the festive season then rename this file to 2 and rename the original file by removing the 1, then the shoutbox will work as normal.
Why would someone fix one problem knowing it will create another?
Quote from: billtidy on December 28, 2020, 05:44:00 AM
jsx try using the attached file.
Rename your original file by adding a 1 after the word 'template' then upload this version. It should stop the issue with the shoutbox and also help the snowflakes to work.
What will not work is the 'Smileys' [more] 'Pop Up' button, although the smileys you have on the 'Post form' will still work.
If you switch off 'Snowflakes' at the end of the festive season then rename this file to 2 and rename the original file by removing the 1, then the shoutbox will work as normal.
However, I want the additional smileys window to display properly.
I mentioned the Ohare Youtube mod because it uses document.write which can cause problems with other JavaScript on the page. Imo developers should be using DOM to insert script tags & not document.write at all. The latest JQuery library makes it extremely easy to do that using $.getScript().
Unfortunately I can not test any changes to your Shoutbox Pro mod because I do not have a copy of it at all. For me to test any changes I make to any of its files requires me to have a legal copy of it which I'm not willing to pay for. For me to make blind changes to one of its files & upload it for you to test is too much trouble. You can ask the shoutbox mod author who may be willing to help you out.
Quote from: Steve on December 28, 2020, 07:56:24 AM
Why would someone fix one problem knowing it will create another?
In it's present state it doesn't work at all, so the attached file lets it work with just the minor issue of the pop up window not working. Both of these mods have always
not worked together, alone they work perfectly, so my fix is, admittedly only a limited fix, but a fix none the less.
It better to have something working rather than nothing, wouldn't you agree Steve?
The file I attached file was from the pro version of the shoutbox mod.
Quote from: billtidy on December 29, 2020, 02:22:10 AMIt better to have something working rather than nothing, wouldn't you agree Steve?
Actually, in the case of mods, no, I wouldn't agree. BUT, that's just me. Your solution may work for others and the time and effort you put in to get it to work this much is appreciated. (https://i.imgur.com/Wm1mvsd.gif)
The solution is to replace document.write() with proper DOM object manipulation.
Anyone who is JavaScript savvy & has access to the pro version should be able to perform the edits to that modification's file(s).
In my opinion if the author of that shoutbox mod is still active & supports that package then simply ask him/her to do just that.
I assure you it will fix the problem.
@Chen Zhen
When I uninstalled TinyPortal 2.0.0 these effects display correctly: Xmas Lights, Xmas Lights Strands, Xmas Wired Lights
So it would be nice if you checked what causes this mistake.
@jsx: Please stop frequently PMing me to look at your posts.
You can download & try this version here:
https://web-develop.ca/index.php?action=downloads;area=stable_smf_modifications;file=37
I have to test it for a while which is why it is a RC version release. There may be unforeseen bugs due to the minor changes.
When it appears to have no problems, I will post a stable release here & on my forum (no RC in its title/name).
@Chen Zhen
Okay if you have a problem with that.
I installed this version from your link and these effects are showing now.
But after refreshing the forum, for example, the lamps breaking effect does not work and no sound heard.
But when the Flurry effect is enabled, when I browse the forum on Chrome on my smartphone, the forum moves. I saw this bug on the previous version of your modification.
When the Snowstorm effect is enabled, this effect is not displayed on the smartphone when browsing the forum.
Many of the snow & image effects will likely raise your CPU usage for smartphones.
You can run your own tests to see if that statement holds true.
For this reason I included admin options to disable the effects for smartphones and/or tablets.
I suggest disabling the effects for both which will affect people using mobile browsers.
Thanks for the reports.
I understand.
I have the Flurry effect enabled and from time to time the forum seems to be reloading, a flash appears. Why is this happening?
Prior to the recent changes I have not seen that behavior on desktop/laptop. Also using Simple Portal or EhPortal I never had those problems with any of the light scripts.
Other than the use of document.write() from TP, I don't see any JS errors on the page yet something is causing a problem. Even after replacing document.write() with DOM manipulation the incorrect behavior persists.
Quote from: Chen Zhen on January 04, 2021, 05:22:32 PM
Prior to the recent changes I have not seen that behavior on desktop/laptop. Also using Simple Portal or EhPortal I never had those problems with any of the light scripts.
Unfortunately, while browsing the forum on the monitor, I see blinking from time to time.
Looks like I'm having a similar issue (running 2.0.17)
I am able to see *some* of the effects; but not all.
I am not able to see these effects:
Snowflake
Flurry
Diverse
Fireworks
Halloween
I *can* see the Snowstorm and all the Xmas lights effects.
Weird :/
@jsx:
Try the v1.75-RC2 version from my forum at the link I previously gave you in this thread.
I reworked the buffer hook function quite extensively.
Keep in mind that any JavaScript / (X)HTML errors from other 3rd party mods, custom portal blocks and/or your own file edits may cause this mod's scripts to fail.
This has been tested while also having Tiny Portal installed.
ref. to possible current TP issue/scenario:
https://github.com/Tinyportal/TinyPortal/pull/816/files
I installed this version v1.75-RC2 and I noticed two flashes on the screen while writing a private message on the forum. It is possible that this is a bug in JavaScript from another modification installed.
I can see on your forum page that document.write is invoked approx. 6 times and it appears a JQuery library is being loaded more than once.
Due to one of your mods there may be more problems on the actual post page but I'd have to register to test that out.
- Lex removed a web address on request.
Quote from: Chen Zhen on January 17, 2021, 11:30:48 AM
Due to one of your mods there may be more problems on the actual post page but I'd have to register to test that out.
I sent you private messages. One of them contains data to log into the account.
Quote from: jsx on January 17, 2021, 06:59:28 AM
I installed this version v1.75-RC2 and I noticed two flashes on the screen while writing a private message on the forum. It is possible that this is a bug in JavaScript from another modification installed.
Update to v1.76I don't see any flashes on the screen when attempting to write a post or PM.
What you can do is just disable snowflakes for those actions.
Imo it's not a big deal if the effects are not visible when users are actually writing a post or PM.
It will still show when they are reading PM's or browsing the forum posts.
Go to the Snowflakes admin and find the input box for:
QuoteList actions/subactions to disable Snowflakes (comma separated)
enter the following & save the settings.
post,pm~send
2.1RC4
Getting the following error on newest install:
QuoteError
Type of error
Undefined_vars
Error message
8: Undefined variable: currentAction
File
/home2/*****/public_html/*****/Sources/snowflakesSMF.php
Line
704
URL of page causing the error
https://*****.com/index.php?action=admin;area=modsettings;sa=snowflakes
Backtrace information
#0: smf_error_handler()
Called from /home2/*****/public_html/*****/Sources/snowflakesSMF.php on line 704
#1: smf_snowflakes_buffer()
Called from unknown on line -1
I fixed the undefined error & updated the modification.
Thanks for the report.
I had Snowflakes 1.7 installed, everything worked, except Fireworks.
Just installed 1.7.8 and now everything works, except Xmas Lights (which I really liked, and was popular on the forum as well).
Can't make heads or tails why some of the effects do or don't work...
(either way, great mod..! :D )
@Dwev:
It might be some sort of JS conflict.
Have you attempted to adjust various settings such as attach to the body or perhaps click on the checkbox that sets the defaults for the lights?
First try to enable "Append to <body> of the HTML page".
Quote from: Chen Zhen on December 27, 2021, 06:57:11 PM@Dwev:
Have you attempted to adjust various settings such as attach to the body or perhaps click on the checkbox that sets the defaults for the lights?
Never had to that before, so have to admit that I didn't try to do this. :-*
QuoteFirst try to enable "Append to <body> of the HTML page".
That did the trick, so now everything works!
Thanks a lot for the fast and very helpful reaction! :D
Thanks Love it ;D
Quote from: Chen Zhen on December 27, 2021, 06:57:11 PMFirst try to enable "Append to <body> of the HTML page".
Is that something everyone should do?
Quote from: Steve on December 28, 2021, 08:00:34 AMQuote from: Chen Zhen on December 27, 2021, 06:57:11 PMFirst try to enable "Append to <body> of the HTML page".
Is that something everyone should do?
Thats what I had to do with my 2.0.19 my 2.1 RC4 support site seems to work without it.
Thanks. :)
SMF Snowflakes has been updated to v1.79.
This release includes some fixes mostly affecting Xmas Lights, Halloween Effects & the user/welcome container detection.
@mickjav & steve:
You should be able to disable that previous setting for your Xmas Lights with this version & going forward.
Please let me know if it works as expected.
Quote from: Chen Zhen on December 28, 2021, 04:08:19 PMSMF Snowflakes has been updated to v1.79.
This release includes some fixes mostly affecting Xmas Lights, Halloween Effects & the user/welcome container detection.
@mickjav & steve:
You should be able to disable that previous setting for your Xmas Lights with this version & going forward.
Please let me know if it works as expected.
Won't be able uninstall and install version till tomorrow but will let you know thanks.
Mick
Please take note for anyone updating this modification that the browser history should be initially cleared for the JavaScript changes to take effect.
Managed to install on my tab turned off <body> and seems to work, I have a few random events selected one seems not to show i'll look more into that tomorrow.
I did clear history before installing.
Checked all events on your latest version and everything seems to be working fine without the "Append to <body> of the HTML page" checked. :)
@Chen Zhen I have this modification installed in version 1.79 and youtube videos in Ohara YouTube Embed v1.2.11 modification stopped displaying. When I disable the Snowflakes modification, the videos work again.
I've already told you why that mod causes a conflict in a previous post from this thread
Ask the author of that mod to replace all of the document.write() with proper DOM manipulation. I'm not going to do it and if the author doesn't want to bother (or anyone capable) then your out of luck She is still occasionally active but ask in her mod thread or on her public forum, do not PM her about mod support like you previously did to me in the past.
I had to forget what you wrote to me because your mod is only used once a year for those few days. And don't educate me about private messages.
Apparently he did as you sent him unwanted PMs. And there will be no more discussion about that in this topic.
Let's keep it on topic, please.
Such a cool mod! I really like how the setting options change when you select the type of effects. Really nice work on this. Thanks you so much. The detail you put into it is amazing.
Happy New Year.
I'm getting the following error messages
/smf/index.php?PHPSESSID=b9f061190472c83f5bd0a680f65e5bb9&action=dlattach;topic=11051.0;attach=32078;image;ts=1553017207
8: Trying to access array offset on value of type null
/smf/Sources/snowflakesMobileDetect.php
Line: 1065
==>1065: if (is_array($matchType['matches'])) {
I'm using the latest version of Snowflake, smf 2.0.19 and php 7.4
Any idea why?
Thanks
@petewadey The null error you were receiving in your log should be fixed for Snowflakes v1.80.
Thanks for the report.
Thanks for the great mod. I installed it on a clean 2.1.1 installation and the snowflakes work fine, but trying to change any settings resulted in a blank screen when saving. The only thing I can think of is that my site is running on PHP 8.x. Could that be the problem? Thanks in advance.
Can you drop your PHP to 7.x and see if you still have the same problem?
Would love to know what errors are hitting the server (not necessarily SMF's) error log.
Quote from: Steve on February 21, 2022, 01:54:42 PMCan you drop your PHP to 7.x and see if you still have the same problem?
I downgraded to 7.4 and it seems to be working fine now. Thanks. Hopefully it can be updated to support PHP 8.x in the future.
@JasonSGN :
I updated the mod to version 1.81 which should allow it to function using PHP 8.0.0+.
The changelog shows what was fixed for anyone curious about it.
Thanks. Just tested it with PHP 8.04 and it works perfectly. I appreciate you updating it so quickly.
Hi there, great mod!
Question: I would like to assign a random opacity value to each flake in Flurry mode to create a little more depth. All I was able to do with my limited knowledge so far was to add this randomization to the jquerySnow01.js file
{op=(Math.random() * (0.99 - 0.75) + 0.75).toFixed(2)};
But it makes the flakes changing opacity indefintely. It looks nice, too, giving them a shimmering effect, but it's not quite what I'd like it to be. Is there a way to get individual opacity for each flake?
Just use the Math.random() function by itself & add to the JS where it alters the css for the flakes (instead of the op variable).
ie.
f.css('opacity',Math.random());
To make it affect each flake a bit different you can try this...
find:
f.css('opacity',op);
replace with:
setInterval(flakeOpacity, (Math.floor(Math.random() * 15000) + 2000), f);
Put this at the end of the file:
function flakeOpacity(f) {
f.css('opacity',Math.random());
}
You can change the random interval to your liking (15000 & 2000 from above).
IMO for this scenario an interval (repeat) is not necessary & will cause a bit of a performance issue.
A timeout is more suitable for the desired outcome.
Change the above interval function to a timeout:
setTimeout(flakeOpacity, (Math.floor(Math.random() * 15000) + 2000), f);
Thank you so much for helping out, Zhen! Your solution creates interesting effects but they still flicker.
I'd like to achieve something like this:
https://www.cssscript.com/demo/snow-falling-animation/
The reason I would like to use your mod instead of the one in my link is that yours is a bit more CPU efficient, at least it seems that way.
What happened to the exploding lights, my peeps are missing them...
@woolly bugger The "Xmas Lights" option is available which gives you the exploding lights.
I recently upgraded to SMF 2.1.3 and have been receiving the following errors in the log of my forum ever since.
Quote98.97.113.141
2903a0e006f86daba3fdbaf7970d19a5
https://www.sonomacountydsa.org/forums/index.php?action=profile;area=alerts_popup;counter=0;u=2 Backtrace information
Type of error: General
Error messageSelect
Hook call: function "smf_snowflakes_profile" in file /home/customer/www/sonomacountydsa.org/public_html/forums/Sources/snowflakesSMF.php could not be called.
I confirmed the snowflakesSMF.php is in the Sources folder so I'm not sure what's happening.
Just wanted you to know in case it was something you wanted to fix.
Thank you and happy holidays.
@Michael Vail For the moment I can't seem to duplicate your report.
However, I've only tested this thus far on a patched update of SMF as opposed to a fresh installation.
I've also tried adjusting profile settings as your error URL seems to indicate that there was a problem when doing that but it seems to work fine with snowflakes enabled or disabled (in the user profile).
Can you try uninstalling it & then installing the latest version anew?
Ironically, the problem stopped on its own here too. I have no idea what was causing it other than maybe there was a hosting account problem. Sorry for the trouble but I'm glad it turned out to only be a ghost in the machine.
Thanks for the awesome MOD and Happy Holidays!
Hi Chen Zhen,
i have a problem with your mod in SMF 2.1.3.
I use the Option: "XMAS Light Strands" on my Forum at Christmas
With SMF 2.0.19 i have nice colored bigger dots (see xlights_smf-2.0.19.jpg)
With SMF 2.1.3 i just have tiny white dots (see xlights_smf-2.1.3.jpg)
That looks rather odd.
Did you have a idea to fix that ?
Thanks for your help.
Greetings
Steffen
@Viper013 I apologize for the late reply. I just tested this on SMF 2.1.3 with the default theme & don't see any issue. It could be the theme you're using or a mod somehow affecting the css.
Hi Chen Zhen,
thanks for your answer.
I have the default theme and used the "Curve2 Color Changer" Mod
to change some colors (Background,Buttons,etc.)
I tried some other Themes and it works all fine.
It must be something with my own created background-color for the header.
Greetings
Steffen
... now i got it.
It was definitly the mod "Curve2 Color Changer".
Now the fun begins.
Trying to find out what the heck this mod affect to the snowflakes. :o
Finaly i find it out. :)
The Mod "Curve2 Color Changer" has a option to remove shadows.
(text-shadow + box-shadow).
When this option is checked, .... the Snowflake-Mod has this strange "XMAS Light Strands" problem.
I change text-shadow options in the index.css to "text-shadow: none !important"
and voila, ... everything works fine.
@Chen Zhen - went to install this on to the default Theme 2.1.4 - downloaded and uploaded the zip file, but when I attempted to install I received a Simple Machines Download Site - Unknown or Not Found
This mod works fine on SMF 2.1.4 when installed via the SMF package manager.
The mod itself works fine but it does cause a problem with any theme that has a menu bar at the top. It is EXTREMELY difficult to get the cursor in just the right spot so the menu item can be clicked on. And the quick theme changer mod (https://custom.simplemachines.org/index.php?mod=3356) can't be used at all.
I can provide screenshots if you need them.
There are admin settings to add container id's & classes. The effects will be hidden when the mouse cursor hovers over those containers.
It's difficult to have these included in the code by default since I can't guess what unique id's are going to be used by theme developers.
I can possibly add something that will do that for cursor position (XY coordinates) which I will look into this weekend. In the meantime you can look at the source code of templates via the browser to determine container id's/classes to add to the Snowflakes admin settings.
Updated to version 1.83 with an option to disable the light effects on a vertical cursor range.
(staring at 1 to a max of 999 from the top of the window)
Note that there are already options to disable light effects on container classes & id's.
There are also options to offset the light scripts so they don't interfere with top navigation.
Admin options will vary when you choose a specific effect within the admin.
Thanks. :)
Quote from: ColinJM on December 08, 2023, 02:44:28 AM@Chen Zhen - went to install this on to the default Theme 2.1.4 - downloaded and uploaded the zip file, but when I attempted to install I received a Simple Machines Download Site - Unknown or Not Found
I have the same problem. I wanted to add it to the xmas theme by TwitchisMental and wanted to add some snowflakes so I tested it using wamp 1st and it worked perfectly fine. Installed it on a live forum and it does install but is missing from the modification settings but you can see it in package manager.
Why does it say miscellaneous on your screenshot? Snowflakes does not install under that heading on a regular SMF setup.
Click on the actual modification settings link to bring up mods which should include Snowflakes.
QuoteThis installation process will add options to the mod settings template...
@ Chen
Like I said when I click on Configuration - modification settings it doesn't install but it will install when using wampserver.
Like the attachment below
@chen, My apologies - I've now done a correct reinstall - nice mod! 8)
@ColinJM: No problem.. I'm glad you figured it out & got it working.
@lord alibaski:
I apologize as I forgot the first link for mod settings navigation shows "miscellaneous".
Any mod I've made that uses the generalized mod settings for admin access are on their own beside that link.
I don't know why it's behaving like that as I've never seen that problem.
Does this only occur on that Xmas theme?
Does the drop-down menu show the snowflakes link?
ie.
@lord alibaski:
I noticed you're using SMF 2.1.4 and you appear to have the the "child boards as drop-down" mod installed. As far as I can tell that mod is only compatible with the SMF 2.0 branch.
Did you edit that mod so it will work with SMF 2.1.4?
Is it possible that it is conflicting with the modification settings navigation links?
@ Chen Zhen
After me posting last night I thought to myself was it the drop down mod causing problems, this could be the issue the mod package isn't there anymore but for some strange reason it looks like it stayed installed when I did a full upgrade to SMF 2.1.4 and now I can't remove it, I can disable it but this doesn't fix the issue.
The issue is there on all theme's on my live forum but is completely fine on wampserver so it could definitely be the drop down mod causing the problem, it's not a problem to worry about.
It sounds like leftover hooks loading & executing files/functions for that mod. You can use SMF maintenance to manually remove those hooks.
Quote from: Chen Zhen on December 11, 2023, 04:46:13 PMIt sounds like leftover hooks loading & executing files/functions for that mod. You can use SMF maintenance to manually remove those hooks.
Just done that but for some reason it still wont install and I have removed all modifications and cleaned all old hooks that were not needed.
Brilliant now I tried to re-install SimpleAudioVideoEmbedder7.0.3 and now I have a HTTP500 error, last time I got this it was a modification parse error but I forgot how to fix it.
- uninstall all mods
- remove all hooks
- use the SMF 2.1.4 upgrade package to overwrite all SMF default/main files
- install all desired mods compatible with the SMF 2.1 branch
Just done all that and I still having problems re-installing SimpleAudioVideoEmbedder7.0.3 I will see what vb says about it.
Hi I installed it but i cant see any changes after applied, i have smf 2.1.4 version i tested it with default theme and other one and nothing, i didnt see errors on installation... thanks
You need to navigate to:
Administration Center -> Modifications Settings -> Snowflakes
From that page you can enable the mod & adjust its settings.
I've had the same issue with v1.83 too. I've been using v1.82 and earlier for years with no issues, but couldn't get v1.83 to show the snowflakes and did not get any errors. I've just stuck with v1.82 since it worked on my forum.
With version 1.83 I added disabling light strands for a Y coordinate range because they conflict with SMF's top user JS navigation. When the cursor is between 0 & the # set in admin it hides the lights.
For those having issues, set the following:
Ignore Y coordinate setting for "Xmas Lights" effect [enable]
Disable light effects for Y coordinate range [400]
I will look into any issues with v1.83 but it works on SMF 2.1 with a few themes that I tested.
@JasonSGN: was this behavior on the default theme, custom theme or both? If on a custom theme, which one? Which version of SMF?
Quote from: Chen Zhen on June 19, 2024, 08:26:58 PM@JasonSGN: was this behavior on the default theme, custom theme or both? If on a custom theme, which one? Which version of SMF?
I'm using the default theme with version 2.1.4. I'll try your settings above to see if that helps, but I'm fine sticking with v1.82 if there are no security issues. Thanks.
@JasonSGN: I took a quick look at your forum as a guest & see it validates so at the moment I'm thinking it's possibly a mod conflicting with the Snowflakes v1.83 JS when a user is logged in.
I realize you're happy with the previous version but I'd like to debug the issue. Can you please post a list of installed mods?
------------------------------
@clubkadettspain: Did you locate the Snowflakes admin & is it working for you now?
Quote from: Chen Zhen on June 23, 2024, 01:19:35 PM@JasonSGN: I took a quick look at your forum as a guest & see it validates so at the moment I'm thinking it's possibly a mod conflicting with the Snowflakes v1.83 JS when a user is logged in.
I realize you're happy with the previous version but I'd like to debug the issue. Can you please post a list of installed mods?
No problem:
- SMF Gallery Lite
- Quick Spoiler
- Post Subject Length
- Users Online Today
- Avatars Display Integration
- Topic Start Date on Message Index
- ArantorSidebar
- Topic Solved
- Message Bookmarks
- Login Security
- Stop Forum Spam
- Have-I-Been-Pwned
Let me know if you need anything else.
FWIW I installed... it installed fine... I see no changes to my site. I don't see any kind of switch to turn effects on off other than in the settings which are enabled.
2.0.1
Quote from: FrizzleFried on December 24, 2024, 09:44:46 AMFWIW I installed... it installed fine... I see no changes to my site. I don't see any kind of switch to turn effects on off other than in the settings which are enabled.
2.0.1
QuoteThis installation process will add options to the mod settings template
Navigate to "Modification Settings" from your admin section & opt Snowflakes. You can enable it & change its settings from that page.
This mod has been updated with nice clear & bold instruction on where to navigate within the admin section to adjust its settings.
SMF 2.0.X support has been dropped with this release. If you want that version, you'll have to browse my forum archives.
Also be aware that the mod states that it will automatically bring you to that section after its installation if you are patient enough to wait for the 5 second counter.
Why do the xmas lights disappear when I hover over a header? I used to be able to smash the lights from the "Xmas Lights" effect, but now I can't do it because the effect disappears. Those lights from those "Xmas Light Strands", "Xmas Wired Lights" effects also disappear when I hover mouse cursor over the header. I'm using version 1.85
@jsx:
You can set "Disable light effects for Y coordinate range" to a low number like 5.
Setting it to 0 will disable that behavior.
Thank you for your help. :)