Mon. - Fri. 9 am - 5 pm Ask a Question
Remember me

Snowflakes

3 years 9 months ago #1

  • Robert's Avatar
  • Robert
  • Posts: 700
Hi guys,

love the snowflakes. Is there a way to have it run "automatically"?
I have no idea about coding, but something like this:

If date >= ("01.11" + year) and date <= ("29.02" + (year +1)) then
SNOWFLAKES

That way it would be automized and no need to activate / deactivate

Just a thought.

Regards from Germany

3 years 9 months ago #2

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 28391
Hello,
Thank you for contacting us

You can use this JS code:
let month = new Date().getMonth();
if (month >= 10 || month <= 1) {
    'Snowflakes code here';
}
Note: in javascript month is Integer value representing the month, beginning with 0 for January to 11 for December

Regards,
Vyacheslav, Balbooa.com

3 years 9 months ago #3

  • Robert's Avatar
  • Robert
  • Posts: 700
Hi Vyacheslav,

that is obviously never going to work because it can never be true! At least I think so... :woohoo:

But it gives me a place to start and maybe I can figure it out. The change to a new year has to be checked somehow, as I "want" the snow all of February also! :whistle:

3 years 9 months ago #4

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 28391
The code that we sent you works and will run the snow of November to February inclusive

Best Regards,
Vyacheslav, Balbooa Support Team

3 years 9 months ago #5

  • Robert's Avatar
  • Robert
  • Posts: 700
Hi Vyacheslav,

ups! :oops:

Sorry, I should have tried it first!! Thank you very much, I will try it later...

Have a super nice holiday season and a very successful 2020!

3 years 9 months ago #6

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 28391
Thank you for your kind words, we are very pleased!
Happy holidays!

Best Regards,
Vyacheslav, Balbooa Support Team

3 years 9 months ago #7

  • Robert's Avatar
  • Robert
  • Posts: 700
Working nicely, see www.main11er.de/

Now lets see, if it stops in March... :whistle: Don't want to play around with my date settings.

For some reason, it won't run as expected on my other site, still looking into that...

3 years 9 months ago #8

  • Robert's Avatar
  • Robert
  • Posts: 700
Can't figure out, why this www.hierkochtmann.de/ is behaving differently to two other sites...

As far as I can tell, I did the same thing on all three sites!

3 years 9 months ago #9

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 28391
You need to disable minimization, it looks like there is an error in the custom code and the code below the error does not work

Regards,
Vyacheslav, Balbooa.com

3 years 9 months ago #10

  • Robert's Avatar
  • Robert
  • Posts: 700
miniWHAT? No idea, what you mean or where to set it.

3 years 9 months ago #11

  • Robert's Avatar
  • Robert
  • Posts: 700
I found the problem! Comment with "// COMMENT" was the problem. Now with "/* COMMENT */" it is working.

Thank you again.

3 years 9 months ago #12

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 28391
You are welcome ;)
Powered by Kunena Forum