I'm sure Ken will come up with a simple fix. My
somewhat roundabout fix goes like this:
In 'wxmetar.php' I changed
$condIconDir = './ajax-images/'; // directory for ajax-images with trailing slash
$condIconType = '.gif'; // default type='.jpg' -- use '.gif' for animated icons from http://www.meteotreviglio.com/
to
$condIconDir = './forecast/images/'; // directory for ajax-images with trailing slash
$condIconType = '.png'; // default type='.jpg' -- use '.gif' for animated icons from http://www.meteotreviglio.com/
and added
$windDir = './ajax-images/';
while leaving
$wrType = '.gif'; // extension of the graphic filename
alone.
Then in 'include-metar-display.php' I changed
<?php if(isset($mtr['WIND'])) { ?>
<img src="<?php echo $condIconDir; ?>spacer.gif" width="1"
height="<?php echo $wrHeight; ?>" alt=" " align="left"/>
<?php $wr = $condIconDir . $wrName . $dirlabel . $wrType; // normal wind rose
$wr = preg_replace('|varies|','calm',$wr);
$wrtext = langtransstr('Wind from') ." " . langtransstr($dirlabel);
if (preg_match('!(calm|varies)!i',$mtr['WIND']) and
($wrCalm <> '') ) { // use calm instead
$wr = $condIconDir . $wrCalm;
}
to
<?php if(isset($mtr['WIND'])) { ?>
<img src="<?php echo $condIconDir; ?>spacer.gif" width="1"
height="<?php echo $wrHeight; ?>" alt=" " align="left"/>
<?php $wr = $windDir . $wrName . $dirlabel . $wrType; // normal wind rose
$wr = preg_replace('|varies|','calm',$wr);
$wrtext = langtransstr('Wind from') ." " . langtransstr($dirlabel);
if (preg_match('!(calm|varies)!i',$mtr['WIND']) and
($wrCalm <> '') ) { // use calm instead
$wr = $windDir . $wrCalm;
}
Finally in 'include-metar-display.php' I added the new global, '$windDir' to the 'newIcon($numb)' function, but I see now that neither it nor '$condIconDir' are used there, thus rendering that change superfluous.
These changes worked for me, so I stopped experimenting at that point.