⚡ How to Add a Realistic Rain + Lightning Effect to Your Forum
Sometimes you want your community to feel more alive – especially at night. This tutorial shows you how to add a rainstorm effect with raindrops, thunder, and zigzag lightning bolts to your FluentCommunity (or any WordPress forum).
✨ Features
- 🌧️ Animated rain with splash ripples and wind tilt
- ⚡ Lightning flashes & bolts (zigzag paths with glowing branches)
- 🔊 Thunder sound (WebAudio API, safe & lightweight)
- ⏰ Time-based control – only runs from 18:30–23:00 (device time)
- 🛡️ Admin safe – automatically disabled on
/forum/admin/settings - 🎛️ Customizable API – change rain density, bolt frequency, sound volume, etc.
🛠️ Steps to Add It
1. Go to Forum Customization
Navigate to Forum Settings → Custom Code (CSS/JS), just like you add other tweaks.
2. Paste the Script
Insert this script into the Custom JavaScript box: \
https://www.mediafire.com/file/h1y5r2bnawy8dix/How_to_Add_a_Realistic_Rain_%252B_Lightning_Effect_to_Your_Forum.txt/file
Click Save Custom CSS & JS.
🎨 Customization Tips
- More rain → raise
rainCfg.density(default:0.0005) - More jagged bolts → raise
boltJitterorboltBranchProb - Quieter thunder → lower
burstGain.gain.valueinplayThunder() - Always on → remove the time window check
📜 License
This effect is free to use & modify.
Just keep the header credits when sharing.
👉 Try it on your forum – works best with dark themes and creates a powerful stormy atmosphere for community engagement. 🌩️🌧️
Snowing would be a fun idea to use during the holidays!
Is there a way to customize the code to only display in a specific space?
