Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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

Getting The Moon Phase Picture Back

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

Locked
User avatar
Buford T. Justice
Posts: 423
Joined: Fri 17 Aug 2012 9:21 pm
Weather Station: Ecowitt GW1002
Operating System: Windows 11 Pro
Location: USA

Getting The Moon Phase Picture Back

Post by Buford T. Justice »

I did some digging around on and off and found a pretty good Moon Phase Picture. I think the code has been removed from the Cumulus MX indexT.htm template.

From Cumulus 1.9.4, here is the original Almanac code:

Code: Select all

<!-- Almanac -->
<table style="width:100%;border-collapse: collapse; border-spacing: 0;" >
  <tbody><tr>
    <td class="labels">Dawn:</td>
    <td class="site_data" style="text-align: left;"><#dawn></td>
    <td class="labels">Sunrise:</td>
    <td class="site_data" style="text-align: left;"><#sunrise></td>
    <td class="labels">Moonrise:</td>
    <td class="site_data" style="text-align: left;"><#moonrise></td>
    <td rowspan="3"><img src="images/moon.bmp" alt="Moon" width="64" height="64" style="margin: 0px 10px;horizontal-align:left" /></td>
  </tr>
  <tr>
    <td class="labels">Dusk:</td>
     <td class="site_data" style="text-align: left;"><#dusk></td>
    <td class="labels">Sunset:&nbsp;</td>
    <td class="site_data" style="text-align: left;"><#sunset></td>
    <td class="labels">Moonset:</td>
    <td class="site_data" style="text-align: left;"><#moonset></td>
  </tr>
  <tr>
    <td class="labels">Daylight:</td>
    <td class="site_data" style="text-align: left;"><#daylightlength></td>
    <td class="labels">Day Length:</td>
    <td class="site_data" style="text-align: left;"><#daylength></td>
    <td class="labels">Moon Phase:</td>
    <td class="site_data" style="text-align: left;"><#moonphase></td>
  </tr>
</tbody>
</table>
<!-- END Almanac -->
Now here it is with the correction to do Moon Phases in Cumulus MX:

Code: Select all

<!-- Almanac -->
<table style="width:100%;border-collapse: collapse; border-spacing: 0;" >
  <tbody><tr>
    <td class="labels">Dawn:</td>
    <td class="site_data" style="text-align: left;"><#dawn></td>
    <td class="labels">Sunrise:</td>
    <td class="site_data" style="text-align: left;"><#sunrise></td>
    <td class="labels">Moonrise:</td>
    <td class="site_data" style="text-align: left;"><#moonrise></td>
    <td rowspan="3"><a href="http://aa.usno.navy.mil/imagery/moon" target="_blank"><img src="http://tycho.usno.navy.mil/cgi-bin/phase.gif" alt="<#moonphase>" height="75" width="75" style="margin: 0px 10px" /></a></td>
  </tr>
  <tr>
    <td class="labels">Dusk:</td>
     <td class="site_data" style="text-align: left;"><#dusk></td>
    <td class="labels">Sunset:&nbsp;</td>
    <td class="site_data" style="text-align: left;"><#sunset></td>
    <td class="labels">Moonset:</td>
    <td class="site_data" style="text-align: left;"><#moonset></td>
  </tr>
  <tr>
    <td class="labels">Daylight:</td>
    <td class="site_data" style="text-align: left;"><#daylightlength></td>
    <td class="labels">Day Length:</td>
    <td class="site_data" style="text-align: left;"><#daylength></td>
    <td class="labels">Moon Phase:</td>
    <td class="site_data" style="text-align: left;"><#moonphase></td>
  </tr>
</tbody>
</table>
<!-- END Almanac -->
You can also click on the Moon Phase picture to see exactly what the Moon looks like in its current phase.

If you want AM/PM times:

Code: Select all

<!-- Almanac -->
<table style="width:100%;border-collapse: collapse; border-spacing: 0;" >
  <tbody><tr>
    <td class="labels">Dawn:</td>
    <td class="site_data" style="text-align: left;"><#dawn format="h:mm tt"></td>
    <td class="labels">Sunrise:</td>
    <td class="site_data" style="text-align: left;"><#sunrise format="h:mm tt"></td>
    <td class="labels">Moonrise:</td>
    <td class="site_data" style="text-align: left;"><#moonrise format="h:mm tt"></td>
    <td rowspan="3"><a href="http://aa.usno.navy.mil/imagery/moon" target="_blank"><img src="http://tycho.usno.navy.mil/cgi-bin/phase.gif" alt="<#moonphase>" height="75" width="75" style="margin: 0px 10px" /></a></td>
  </tr>
  <tr>
    <td class="labels">Dusk:</td>
     <td class="site_data" style="text-align: left;"><#dusk format="h:mm tt"></td>
    <td class="labels">Sunset:&nbsp;</td>
    <td class="site_data" style="text-align: left;"><#sunset format="h:mm tt"></td>
    <td class="labels">Moonset:</td>
    <td class="site_data" style="text-align: left;"><#moonset format="h:mm tt"></td>
  </tr>
  <tr>
    <td class="labels">Daylight:</td>
    <td class="site_data" style="text-align: left;"><#daylightlength format="H'h' mm'm' ss's'"></td>
    <td class="labels">Day Length:</td>
    <td class="site_data" style="text-align: left;"><#daylength format="H'h' mm'm' ss's'"></td>
    <td class="labels">Moon Phase:</td>
    <td class="site_data" style="text-align: left;"><#moonphase></td>
  </tr>
</tbody>
</table>
<!-- END Almanac -->
Last edited by Buford T. Justice on Sun 26 Mar 2017 10:15 am, edited 2 times in total.
scanman
Posts: 72
Joined: Sun 18 Oct 2009 8:44 pm
Weather Station: Davis VP2

Re: Getting The Moon Phase Picture Back

Post by scanman »

Thanks for that. I feel like Gru from the "Despicable Me" movies - I put the moon back! :lol:
jlmr731
Posts: 225
Joined: Sat 27 Aug 2016 12:11 am
Weather Station: Davis vantage pro 2
Operating System: Debian
Location: Wickliffe, Ohio
Contact:

Re: Getting The Moon Phase Picture Back

Post by jlmr731 »

Thanks nice to see the moon there now
sungazer
Posts: 4
Joined: Thu 29 Sep 2016 6:57 am
Weather Station: WH3081
Operating System: Win7 64bit
Location: Australia
Contact:

Re: Getting The Moon Phase Picture Back

Post by sungazer »

Just wondered if this code will be included in the next build. The moon phases are something I have always liked as well but putting the code in may be a bit much especially if the next update then reset this and I had to do it again.

TIA
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Getting The Moon Phase Picture Back

Post by mcrossley »

If I were Steve, the problem for me with putting this in the MX source files is it introduces an external dependency that may change and and break the template in the future. In fact I just tried the link - http://tycho.usno.navy.mil/cgi-bin/phase.gif - and its not working for me at the moment - EDIT: Ah worked 5 mins later.

It just leads to more support questions on the forum when it doesn't work for some reason.

It's fine for people to tweak and self support though. I chose to be self contained and created my own graphic on my web server.
water01
Posts: 3244
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Getting The Moon Phase Picture Back

Post by water01 »

I wrote a moon phase piece of code for MX users some months back, that is self contained (uses its own images), and works in the northern and southern hemispheres. https://cumulus.hosiene.co.uk/viewtopic.p ... se#p110751
David
Image
sungazer
Posts: 4
Joined: Thu 29 Sep 2016 6:57 am
Weather Station: WH3081
Operating System: Win7 64bit
Location: Australia
Contact:

Re: Getting The Moon Phase Picture Back

Post by sungazer »

I am not a programmer. I can follow instructions and change code as directed but would not want to have to do this on a constant basis. The Moon Phase for me is important as my wife is Buddhist and a lot revolves around the stages of the moon.

Please put it back in as standard in a bold and beautiful way.

TIA
Locked