Page 1 of 1

New Moon Phases installation

Posted: Fri 02 Jan 2015 10:18 am
by dygon
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

Re: New Moon Phases installation

Posted: Sun 22 Feb 2015 5:36 am
by K8POS
Did you load the images onto your web server?
Do you have a link to where you got the Moon Phases.zip from?