Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.3.0 build 3063 - 10 January 2020.
    Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

    See the Wiki for downloading either version.

    New Moon Phases installation

    Discussion of Jacques DesRoches's web site templates

    Moderator: JacquesD

    Post Reply
    dygon
    Posts: 24
    Joined: Tue 02 Dec 2014 9:04 pm
    Weather Station: Oregon WMR200
    Operating System: windows 7
    Location: Italia

    New Moon Phases installation

    Post by dygon » Fri 02 Jan 2015 10:18 am

    Hello everyone,
    I downloaded the file Moon Phases.zip to change the image of the moon phase on my site but are not able to make the changes described in the txt file.
    The file is written:

    Code: Select all

    PHP Code:
    <td rowspan = "3"> <? php echo '<img src = "../ images / moon /'. rawurlencode ($ moonphase). '.png" alt = "No Image" width = "64" height = "64" /> '?> </ td>
    
    AJAX Code:
    function set_ajax_obs()
    ajx.innerHTML=val + unt; // and write the xml element into the document
    document.getElementById('moonphaseimage').innerHTML='<IMG src="images/' + val + '.png" <id="moonphaseimage" alt="Moon" width="64" height="64" hspace="10" align="left" border="0">';      
    
    or...
    
        <td rowspan=3><span class="ajax" id="moonphaseimage"><IMG src="../../icon_sets/moon/images/<#moonphase>.png" alt="Moon" width="64" height="64" hspace="10" align="left" border="0"></span></td>
    
    function set_ajax_obs()
    ajx.innerHTML=val + unt; // and write the xml element into the document
    switch(val)
                   {
                   case "Waxing Gibbous":
                      document.getElementById('moonphaseimage').innerHTML='<IMG src="images/' + val + '.png" <id="moonphaseimage" alt="Moon" width="64" height="64" hspace="10" align="left" border="0">';
                   break;
                   case "Full moon":
                      document.getElementById('moonphaseimage').innerHTML='<IMG src="images/' + val + '.png" <id="moonphaseimage" alt="Moon" width="64" height="64" hspace="10" align="left" border="0">';      
                   break;
                   case "New moon":
                      document.getElementById('moonphaseimage').innerHTML='<IMG src="images/' + val + '.png" <id="moonphaseimage" alt="Moon" width="64" height="64" hspace="10" align="left" border="0">';      
                   break;
                   case "Waning Gibbous":
                      document.getElementById('moonphaseimage').innerHTML='<IMG src="images/' + val + '.png" <id="moonphaseimage" alt="Moon" width="64" height="64" hspace="10" align="left" border="0">';      
                   break;
                   case "Waxing Cresent":
                      document.getElementById('moonphaseimage').innerHTML='<IMG src="images/' + val + '.png" <id="moonphaseimage" alt="Moon" width="64" height="64" hspace="10" align="left" border="0">';      
                   break;
                   case "Waning Cresent":
                      document.getElementById('moonphaseimage').innerHTML='<IMG src="images/' + val + '.png" <id="moonphaseimage" alt="Moon" width="64" height="64" hspace="10" align="left" border="0">';      
                   break;
                   case "First Quarter":
                      document.getElementById('moonphaseimage').innerHTML='<IMG src="images/' + val + '.png" <id="moonphaseimage" alt="Moon" width="64" height="64" hspace="10" align="left" border="0">';      
                   break;
                   case "Last Quarter":
                      document.getElementById('moonphaseimage').innerHTML='<IMG src="images/' + val + '.png" <id="moonphaseimage" alt="Moon" width="64" height="64" hspace="10" align="left" border="0">';      
                   break;
                   }
    
    I state that I am not an expert in web ...
    where exactly should I put these lines of code?
    I have installed the Sunset template of Weather by You

    Could you describe step by step what should I do?

    thanks a lot

    User avatar
    K8POS
    Posts: 94
    Joined: Sat 03 Jan 2015 4:17 am
    Weather Station: Davis Vantage Pro2
    Operating System: Windows 7
    Location: Thumb of Michigan
    Contact:

    Re: New Moon Phases installation

    Post by K8POS » Sun 22 Feb 2015 5:36 am

    Did you load the images onto your web server?
    Do you have a link to where you got the Moon Phases.zip from?

    Post Reply