Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Since it last rained in D/M/H no longer working

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
User avatar
ace2
Posts: 679
Joined: Tue 14 Jan 2014 12:38 pm
Weather Station: maxkon ws-1081pc
Operating System: windows 7 & 8
Location: Adelaide, south Australia, Australia
Contact:

Since it last rained in D/M/H no longer working

Post by ace2 »

Up until i converted my pages to be HTML5 compliant, this thing worked fine, it displays days, hours and minutes since it last rained.

Code: Select all

Since it last Rained&nbsp:<script type="text/javascript">
(function(){
  var days = Math.floor(<#MinutesSinceLastRainTip>/24/60);
  var hrs = Math.floor(<#MinutesSinceLastRainTip>/60%24);
  var mins = Math.floor(<#MinutesSinceLastRainTip>%60);
  function plur(x){return x === 1 ? '' : 's'};
  document.write(days + ' Day' + plur(days) + ' : ' + hrs + ' Hr' + plur(hrs) + ' : ' + mins + ' Min' + plur(mins));
}());
</script>
But now is displays the same figure, never changes. I don't know why...
The site page http://www.users.on.net/~ace2/index.htm
the template in use http://www.users.on.net/~ace2/indexT.htm

I've tried removing all the other Java scripts in this template with no success.....
CHRIS
Image
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Since it last rained in D/M/H no longer working

Post by beteljuice »

That's because your Template does NOT have <#MinutesSinceLastRainTip> but a hard coded value of 937 ;)
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
ace2
Posts: 679
Joined: Tue 14 Jan 2014 12:38 pm
Weather Station: maxkon ws-1081pc
Operating System: windows 7 & 8
Location: Adelaide, south Australia, Australia
Contact:

Re: Since it last rained in D/M/H no longer working

Post by ace2 »

beteljuice wrote:That's because your Template does NOT have <#MinutesSinceLastRainTip> but a hard coded value of 937 ;)
God i'm an idiot.... :groan:

I was staring at it as well!!!


**hides under rock** :bash:
CHRIS
Image
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
Post Reply