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 4018) - 28 March 2024

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

Moon Ditty

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

Moderator: daj

Post Reply
Warrandyte
Posts: 41
Joined: Sat 06 Apr 2013 11:46 pm
Weather Station: Fine Offset with Solar
Operating System: Windows XP, 7 8 and 10
Location: TIrrannaville NSW Australia

Moon Ditty

Post by Warrandyte »

Just a quick little something to replace the moon image
it uses the MoonPercent Webtag and gets an appropriate image for that phase of the moon
like so:
Image
theres a bit of code to go in the placeholder for the image, and the moon images need to be in the images/moon/directory relative to the page.
I've kept the code verbose so people can see and change
hope someone finds it useful.
Theres also a large script animated moon at http://www.warrandytefarm.com/moon_large.htm
all the files are in Image
http://www.warrandytefarm.com/resources/moon.zip
Rob

Code: Select all

<script type="text/javascript">
var MoonPC=-<#MoonPercent>/100;
var ImageNum=0;
ImageNum=Math.round((1+MoonPC)*12);
if(ImageNum<10){
ImageNum=String(0)+String(ImageNum);
}
document.write("<img src=\"images/moon/moon_"+ImageNum+".png\"width=\"150px\" height=\"150px\"/>");
</script>
Post Reply