Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.16.1 (build 3183) - 06 May 2022

Legacy Cumulus 1 release v1.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 interested in supporting Cumulus then maybe you would like to contribute to the maintenance of the Wiki? This need not take hours of your time - just a half hour here and there can make a big difference, particularly if many people are doing this. Any contributions are very welcome, whether they involve new content or editing of existing content. It will be very helpful to current and future users of Cumulus software if the Wiki is kept well-maintained and current. If you are interested then please contact forum user saratogaWX and ask for a Wiki account.

Script Request

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

Moderator: daj

Post Reply
Mapantz
Posts: 1268
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Script Request

Post by Mapantz »

Does anybody have a copy of a script that shows a live countdown to each astronomical season?

I can't remember the name of the file, but I think it has 'season function' written inside of the PHP file, at the top..
Image
User avatar
BeaumarisWX
Posts: 276
Joined: Mon 09 Apr 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 Pro Hades Canyon
Location: Beaumaris, Tasmania, AU
Contact:

Re: Script Request

Post by BeaumarisWX »

Hi Mapantz,
I think you may mean season-include.php (one of Curly's old scripts I think).
I can't find my old original, could send you mine, though it's heavily modified for Tasmania.
Kind Regards,
Tony Beaumaris, Tasmania (AUS)

CUMX Mobile : https://beaumaris-weather.com/BWX/
CUMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Banner below - Saratoga Template :
Image
User avatar
BeaumarisWX
Posts: 276
Joined: Mon 09 Apr 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 Pro Hades Canyon
Location: Beaumaris, Tasmania, AU
Contact:

Re: Script Request

Post by BeaumarisWX »

Actually there is a copy zipped up for download here https://www.weather-watch.com/smf/index ... ic=67830.0
Kind Regards,
Tony Beaumaris, Tasmania (AUS)

CUMX Mobile : https://beaumaris-weather.com/BWX/
CUMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Banner below - Saratoga Template :
Image
Mapantz
Posts: 1268
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Script Request

Post by Mapantz »

Hi Tony

That didn't work for me, unfortunately. I think it uses webtags from Weather Display or something?

cGetSeasonInfo is needed, but it is nowhere to be seen. :(
Image
User avatar
BeaumarisWX
Posts: 276
Joined: Mon 09 Apr 2012 2:38 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 Pro Hades Canyon
Location: Beaumaris, Tasmania, AU
Contact:

Re: Script Request

Post by BeaumarisWX »

Hi Mapantz,
It's not a WD thing, it is Saratoga Template based, function resides in the common.php

Code: Select all

// -----------------------------------------------------------------------------
// SEASON FUNCTIONS  return season dates based on USNO dates for Spring, Summer, Fall, Winter                                                             .
// -----------------------------------------------------------------------------
function cGetSeasonInfo ($YY=0) { // feed it the year

$seasonList = array( // seasons from USNO in WD date format
// generated from https://api.usno.navy.mil/seasons?year=YYYY&tz=0&dst=false JSON
// year => 'Spring|Summer|Autumn|Winter' (Northern Hemisphere)
 '2018' => '16:15 GMT 20 March 2018|10:07 GMT 21 June 2018|01:54 GMT 23 September 2018|22:23 GMT 21 December 2018|',
 '2019' => '21:58 GMT 20 March 2019|15:54 GMT 21 June 2019|07:50 GMT 23 September 2019|04:19 GMT 22 December 2019|',
 '2020' => '03:50 GMT 20 March 2020|21:44 GMT 20 June 2020|13:31 GMT 22 September 2020|10:02 GMT 21 December 2020|',
 '2021' => '09:37 GMT 20 March 2021|03:32 GMT 21 June 2021|19:21 GMT 22 September 2021|15:59 GMT 21 December 2021|',
 '2022' => '15:33 GMT 20 March 2022|09:14 GMT 21 June 2022|01:04 GMT 23 September 2022|21:48 GMT 21 December 2022|',
 '2023' => '21:24 GMT 20 March 2023|14:58 GMT 21 June 2023|06:50 GMT 23 September 2023|03:27 GMT 22 December 2023|',
 '2024' => '03:06 GMT 20 March 2024|20:51 GMT 20 June 2024|12:44 GMT 22 September 2024|09:20 GMT 21 December 2024|',
 '2025' => '09:01 GMT 20 March 2025|02:42 GMT 21 June 2025|18:19 GMT 22 September 2025|15:03 GMT 21 December 2025|',
 '2026' => '14:46 GMT 20 March 2026|08:24 GMT 21 June 2026|00:05 GMT 23 September 2026|20:50 GMT 21 December 2026|',
 '2027' => '20:25 GMT 20 March 2027|14:11 GMT 21 June 2027|06:02 GMT 23 September 2027|02:42 GMT 22 December 2027|',
 '2028' => '02:17 GMT 20 March 2028|20:02 GMT 20 June 2028|11:45 GMT 22 September 2028|08:19 GMT 21 December 2028|',
 '2029' => '08:02 GMT 20 March 2029|01:48 GMT 21 June 2029|17:38 GMT 22 September 2029|14:14 GMT 21 December 2029|',
 '2030' => '13:52 GMT 20 March 2030|07:31 GMT 21 June 2030|23:27 GMT 22 September 2030|20:09 GMT 21 December 2030|',
); // end of seasonList
  if($YY<2009) {$YY = idate('Y');} // use current year 
  $info = new stdClass();
  if(!isset($seasonList[$YY])) {
	   $info->error = "Year $YY not in list";
	   return $info;
   }
   list($spring,$summer,$fall,$winter) = explode('|',$seasonList[$YY]);
   $info->spring = $spring;
   $info->summer = $summer;
   $info->fall   = $fall;
   $info->winter = $winter;
   
   return $info;

}
Kind Regards,
Tony Beaumaris, Tasmania (AUS)

CUMX Mobile : https://beaumaris-weather.com/BWX/
CUMX Default: https://beaumaris-weather.com/cumulusmx_default/
Colour Dashboard : https://beaumaris-weather.com/dashborad_color.php
Banner below - Saratoga Template :
Image
Mapantz
Posts: 1268
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Script Request

Post by Mapantz »

Thanks Tony

That didn't help either. The webpage will not load as it gives a stack trace error when I use <?php include on the webpage. I spent an hour trying to work out why, but no luck.
Image
Post Reply