banner.php wind speed average to latest?
Posted: Fri 01 Feb 2013 6:18 pm
Hi Steve/others,
Ok, first of all I've got these 2 bits of code in my banner.php:
As you can see, I've deleted the "wspeed" tag and added the "wlatest" tag. I thought this makes sense.
Then, I added the same thing here. I changed the ("wspeed") tag to the ("wlatest") tag. I thought this makes sense.
But, then it just came up with the "wspeed" value instead of the "wlatest" value on my banner.php file. 
Why has this happened?
Thanks
William
Ok, first of all I've got these 2 bits of code in my banner.php:
As you can see, I've deleted the "wspeed" tag and added the "wlatest" tag. I thought this makes sense.
Code: Select all
// Current field names (matches tag fields) used
$SITE['cvalues'] = array(
"date","time","temp","hum","dew","wlatest","wgust","avgbearing","rrate",
"rfall","press","wdir","beaufort","windunit","tempunit","pressunit","rainunit",
"windrun","presstrend","rmonth","ryear","rfallY","intemp","inhum","wchill",
"temptrendval","tempTH","TtempTH","tempTL","TtempTL",
"windTM","TwindTM","wgustTM","TwgustTM",
"pressTH","TpressTH","pressTL","TpressTL",
"cversion","cbuild");Code: Select all
// Print windspeed
$text = "Wind: " . ret_value("wdir") . " " . ret_value("wlatest") . ' ' . ret_value("windunit");
if ($SITE['usettf'] == "yes" ) {
$size = 10;
imagettftextbox($im, $size, 0, 0, 22, $green, $font1, $text, $SITE['image_width'], "left");
} else {
$size = 5;
imageWriteString($im, $size, $text, $green, "left", 23);
}Why has this happened?
Thanks
William