Here is the info on the rain and rain rate gauges popup mod.
Rain gauge:
The “Last rain” info isn’t delivered from MeteoHub, so I choose to replace it with the “Rain this month” info.
First two modified files are in the gauges/scripts subdirectory.
In the language.js I’ve changed this
LastRain_info : "Last Rain",
to this
LastRain_info : "Rain This Month",
In the wsGauges.js I’ve changed this
document.getElementById('imgtip2_txt').innerHTML = LANG.LastRain_info + ': ' + data.LastRained;
to this
document.getElementById('imgtip2_txt').innerHTML = LANG.LastRain_info + ': ' + extractDecimal(data.rfallM) + ' ' + data.rainunit;
I added this line:
$arrOut['rfallM'] = $ws['rainMonth'];
to line 127 of the wsAjaxDataLoad_v3.php file, which is in the root directory of the template.
Rain rate gauge:
I was missing the time of the rain rate maximum in the popup info and the “Max per hour” info isn’t delivered from MeteoHub, so I removed it.
In the wsGauges.js I’ve changed this
'- ' + LANG.maximum_info + ': ' + data.rrateTM + ' ' + data.rainunit + '/h ' + LANG.at + ' ' + data.TrrateTM +
' | ' + LANG.max_hour_info + ': ' + extractDecimal(data.hourlyrainTH) + ' ' + data.rainunit + ' ' + LANG.at + ' ' + data.ThourlyrainTH;
to this
'- ' + LANG.maximum_info + ': ' + data.rrateTM + ' ' + data.rainunit + '/h ' + LANG.at + ' ' + data.TrrateTM;
I added this line:
|rainRateMaxTodayTime|[day1_rain0_ratemax_time:--]|!
to line 159 of the tags.mh.html file, which is in the graphs directory on MeteoHub
I added this line:
$ws['rainRateMaxTodayTime'] = mhdate ($wx['rainRateMaxTodayTime']);
to line 261 of the tagsMH.php file, which is in the scriptsMH subdirectory of the template.
In the wsAjaxDataLoad_v3.php file I’ve changed this
$arrOut['TrrateTM'] = '00:00';
to this
if (isset ($ws['rainRateMaxTodayTime']) )
{$arrOut['TrrateTM'] = WStime($ws['rainRateMaxTodayTime']);}
else {$arrOut['TrrateTM'] = '00:00';}
So far the the mod is applied only on my experimental site but will be on my regular site soon.