$pageName) { $SITE['wsModules'][$pageFile] = 'this file loaded instead of '.$pageName; } echo '".PHP_EOL; # ------------------------------------------------------------------------------------------------ # Version 2.00 for template release 2 # ------------------------------------------------------------------------------------------------ $ws['tags.php'] = $pageName.'-'.$pageVersion; # ------------------------------------------ units ----------------------------------------------- $wdDist = '%uomdistance%'; // = 'mi','km' (for windrun variables) # ------------------------------------------- date - time ---------------------------------------- $wdDatefmt = 'dd-mm-yy'; // = 'd/m/y', 'm/d/y' $from = array ('-',':'); $temp = str_replace($from,'','13-06-20 7:37'); // '2708120402' $temp = str_replace(' ','0',$temp); $ymd = '20'.substr($temp,4,2).substr($temp,2,2).substr($temp,0,2); $ws['actTime'] = $ymd.substr($temp,6,4).'00'; # ------------------------------------------ temperature ----------------------------------------- $to = $SITE['uomTemp']; $from = str_replace('°','','°C'); // = 'C', 'F', (or '°C', '°F', or '°C', '°F' ) $ws['tempMinTodayTime'] = wdDate(' 7:12'); $ws['tempMaxTodayTime'] = wdDate(' 7:35'); $ws['dewpMinTodayTime'] = wdDate(' 7:28'); $ws['dewpMaxTodayTime'] = wdDate(' 7:04'); $ws['heatMaxTodayTime'] = wdDate(' 7:24'); $ws['chilMinTodayTime'] = wdDate(' 7:02'); $ws['tempAct'] = wsConvertTemperature('19.2', $from, $to); // convert and clean of units $ws['tempActInside'] = wsConvertTemperature('23.5', $from, $to); $ws['tempActExtra1'] = wsConvertTemperature('---', $from, $to); $ws['tempActExtra2'] = wsConvertTemperature('---', $from, $to); $ws['tempDelta'] = 0; $ws['tempMinToday'] = wsConvertTemperature('18.8', $from, $to); $ws['tempMinMonth'] = wsConvertTemperature('8.3', $from, $to); $ws['tempMinYear'] = wsConvertTemperature('-0.6', $from, $to); $ws['tempMaxToday'] = wsConvertTemperature('19.2', $from, $to); $ws['tempMaxMonth'] = wsConvertTemperature('23.9', $from, $to); $ws['tempMaxYear'] = wsConvertTemperature('27.2', $from, $to); $ws['dewpAct'] = wsConvertTemperature('15.7', $from, $to); $ws['dewpDelta'] = 0; $ws['dewpMinToday'] = wsConvertTemperature('15.0', $from, $to); $ws['dewpMaxToday'] = wsConvertTemperature('16.1', $from, $to); $ws['heatAct'] = wsConvertTemperature('19.8', $from, $to); $ws['heatDelta'] = 0; $ws['heatMaxToday'] = wsConvertTemperature('20.0', $from, $to); $ws['heatMaxMonth'] = wsConvertTemperature('24.4', $from, $to); $ws['heatMaxYear'] = wsConvertTemperature('26.7', $from, $to); $ws['chilAct'] = wsConvertTemperature('19.2', $from, $to); $ws['chilDelta'] = 0; $ws['chilMinToday'] = wsConvertTemperature('18.9', $from, $to); $ws['chilMinMonth'] = wsConvertTemperature('8.3', $from, $to); $ws['chilMinYear'] = wsConvertTemperature('-0.6', $from, $to); # ------------------------------------------ pressure / baro ------------------------------------- $to = $SITE['uomBaro']; $from = 'hPa'; // = 'inHg', 'hPa', 'kPa', 'mb' $ws['baroMinTodayTime'] = wdDate(' 7:01'); $ws['baroMaxTodayTime'] = wdDate(' 7:27'); $ws['baroAct'] = wsConvertBaro('1014.3', $from, $to); $ws['baroDelta'] = 'Rising Rapidly'; // trend = --BarTrend-- $ws['baroMinToday'] = wsConvertBaro('1014.0', $from, $to); $ws['baroMinMonth'] = wsConvertBaro('990.1', $from, $to); $ws['baroMinYear'] = wsConvertBaro('981.6', $from, $to); $ws['baroMaxToday'] = wsConvertBaro('1014.3', $from, $to); $ws['baroMaxMonth'] = wsConvertBaro('1022.8', $from, $to); $ws['baroMaxYear'] = wsConvertBaro('1048.0', $from, $to); # ------------------------------------------ humidity ------------------------------------------ $ws['humiMinTodayTime'] = wdDate(' 7:28'); $ws['humiMaxTodayTime'] = wdDate(' 7:02'); $ws['humiAct'] = '80'; $ws['humiDelta'] = 0; $ws['humiMinToday'] = '78'; $ws['humiMinMonth'] = '38'; $ws['humiMinYear'] = '22'; $ws['humiMaxToday'] = '82'; $ws['humiMaxMonth'] = '96'; $ws['humiMaxYear'] = '98'; # ------------------------------------------ rain ------------------------------------------ $to = $SITE['uomRain']; $from = 'mm'; // = 'mm', 'in' $ws['rainRateAct'] = wsConvertRainfall('0.0', $from, $to); $ws['rainRateToday'] = wsConvertRainfall('0.0', $from, $to); $ws['rainToday'] = wsConvertRainfall('0.0', $from, $to); $ws['rainMonth'] = wsConvertRainfall('39.4', $from, $to); $ws['rainYear'] = wsConvertRainfall('314.2', $from, $to); $ws['etToday'] = wsConvertRainfall('0.00', $from, $to); $ws['etMonth'] = wsConvertRainfall('0.00', $from, $to); $ws['etYear'] = wsConvertRainfall('0.00', $from, $to); # ------------------------------------------ wind ------------------------------------------ $to = $SITE['uomWind']; $from = str_replace('hr','h','km/hr'); // = 'kts','mph','kmh','km/h','m/s','Bft' $ws['gustMaxTodayTime'] = wdDate('----'); $ws['windActDsc'] = '---'; $ws['windActDeg'] = '---'; $ws['windBeafort'] = wsBeaufortNumber ('0.0',$from); $ws['windAct'] = wsConvertWindspeed('0.0', $from ,$to); $ws['gustAct'] = wsConvertWindspeed('0.0', $from ,$to); $ws['gustMaxToday'] = wsConvertWindspeed('0.0', $from ,$to); $ws['gustMaxMonth'] = wsConvertWindspeed('0.0', $from ,$to); $ws['gustMaxYear'] = wsConvertWindspeed('4.8', $from ,$to); if ($ws['gustAct'] <= $ws['windAct']) {$ws['gustAct'] = $ws['windAct'];} # ------------------------------------------ UV ----------------------------------------- $ws['uvMaxTodayTime'] = wdDate('----'); $ws['uvAct'] = '---'; $ws['uvMaxToday'] = '0.0'; $ws['uvMaxMonth'] = '0.0'; $ws['uvMaxYear'] = '0.0'; # ------------------------------------------ Solar ---------------------------------------- $ws['solarMaxTodayTime'] = wdDate('----'); $ws['solarAct'] = '---'; #$ws['solActPerc'] = '%currentsolarpctplain%'; $ws['solarMaxToday'] = '0'; $ws['solarMaxMonth'] = '0'; $ws['solarMaxYear'] = '0'; # ------------------------------------------ forecasts ------------------------------------- $ws['fcstTxt'] = ' FORECAST REQUIRES 3 HOURS OF RECENT DATA. '; # ------------------------------------------ sun and moon ---------------------------------- $ws['sunrise'] = date($SITE['timeOnlyFormat'],strtotime(' 5:25')); $ws['sunset'] = date($SITE['timeOnlyFormat'],strtotime('22:04')); # ------------------------------------------ some more -------------------------------------- $ws['wsVersion'] = ''; $ws['wsHardware'] = ''; // unknown $ws['wsUptime'] = ''; #------------------soil moistere + temp & leaf moistere readings--------------------------- $to = $SITE['uomTemp']; $from = str_replace('°','','°C'); // = 'C', 'F', (or '°C', '°F', or '°C', '°F' ) # Soil temp sensor 1 $ws['soilTempAct'][1] = wsConvertTemperature('---', $from, $to); $ws['soilTempMaxToday'][1] = wsConvertTemperature('---', $from, $to); $ws['soilTempMinToday'][1] = wsConvertTemperature('---', $from, $to); $ws['soilTempMaxTodayTime'][1] = wdDate('---'); $ws['soilTempMinTodayTime'][1] = wdDate('---'); # Soil temp sensor 2 $ws['soilTempAct'][2] = wsConvertTemperature('---', $from, $to); $ws['soilTempMaxToday'][2] = wsConvertTemperature('---', $from, $to); $ws['soilTempMinToday'][2] = wsConvertTemperature('---', $from, $to); $ws['soilTempMaxTodayTime'][2] = wdDate('---'); $ws['soilTempMinTodayTime'][2] = wdDate('---'); # Soil temp sensor 3 $ws['soilTempAct'][3] = wsConvertTemperature('---', $from, $to); $ws['soilTempMaxToday'][3] = wsConvertTemperature('---', $from, $to); $ws['soilTempMinToday'][3] = wsConvertTemperature('---', $from, $to); $ws['soilTempMaxTodayTime'][3] = wdDate('---'); $ws['soilTempMinTodayTime'][3] = wdDate('---'); # Soil temp sensor 4 $ws['soilTempAct'][4] = wsConvertTemperature('---', $from, $to); $ws['soilTempMaxToday'][4] = wsConvertTemperature('---', $from, $to); $ws['soilTempMinToday'][4] = wsConvertTemperature('---', $from, $to); $ws['soilTempMaxTodayTime'][4] = wdDate('---'); $ws['soilTempMinTodayTime'][4] = wdDate('---'); # Moisture sensor 1 $ws['moistAct'][1] = '---'; $ws['moistMaxToday'][1] = '---'; $ws['moistMinToday'][1] = '---'; $ws['moistMaxTodayTime'][1] = wdDate('---'); $ws['moistMinTodayTime'][1] = wdDate('---'); # Moisture sensor 2 $ws['moistAct'][2] = '---'; $ws['moistMaxToday'][2] = '---'; $ws['moistMinToday'][2] = '---'; $ws['moistMaxTodayTime'][2] = wdDate('---'); $ws['moistMinTodayTime'][2] = wdDate('---'); # Moisture sensor 3 $ws['moistAct'][3] = '---'; $ws['moistMaxToday'][3] = '---'; $ws['moistMinToday'][3] = '---'; $ws['moistMaxTodayTime'][3] = wdDate('---'); $ws['moistMinTodayTime'][3] = wdDate('---'); # Moisture sensor 4 $ws['moistAct'][4] = '---'; $ws['moistMaxToday'][4] = '---'; $ws['moistMinToday'][4] = '---'; $ws['moistMaxTodayTime'][4] = wdDate('---'); $ws['moistMinTodayTime'][4] = wdDate('---'); #--------------------------------------------------------------------------- # leaf sensor 1 $ws['leafWetAct'][1] = '---'; $ws['leafWetMaxToday'][1] = '---'; $ws['leafWetMinToday'][1] = '---'; $ws['leafWetMaxTodayTime'][1] = wdDate('---'); $ws['leafWetMinTodayTime'][1] = wdDate('---'); $ws['leafTempAct'][1] = '---'; $ws['leafTempMaxToday'][1] = '---'; $ws['leafTempMinToday'][1] = '---'; $ws['leafTempMaxTodayTime'][1] = wdDate('---'); $ws['leafTempMinTodayTime'][1] = wdDate('---'); # leaf sensor 2 $ws['leafWetAct'][2] = '---'; $ws['leafWetMaxToday'][2] = '---'; $ws['leafWetMinToday'][2] = '---'; $ws['leafWetMaxTodayTime'][2] = wdDate('---'); $ws['leafWetMinTodayTime'][2] = wdDate('---'); $ws['leafTempAct'][2] = '---'; $ws['leafTempMaxToday'][2] = '---'; $ws['leafTempMinToday'][2] = '---'; $ws['leafTempMaxTodayTime'][2] = wdDate('---'); $ws['leafTempMinTodayTime'][2] = wdDate('---'); #--------------------------------------------------------------------------- # retrieve missing moon entries $skipMoonPage = true; include ($SITE['moonSet']); $skipMoonPage = false; #--------------------------------------------------------------------------- // end of todayTags.htx/todayTags.php ?>