So, two issues. Regarding the Month gust max display, it is produced by ajax-dashboard.php using
Code: Select all
<?php if(isset($mrecordwindgust)) { ?>
<tr>
<td colspan="2" class="data1" align="center">
<?php langtrans('Gust Month'); ?>: <?php echo $mrecordwindgust. " $uomWind"; ?>
<?php if(isset($mrecordhighgustday)) { ?>
<?php echo $monthname . " " . $mrecordhighgustday; ?>
<?php } // $mrecordhighgustday ?>
</td>
</tr>
<?php } // $mrecordwindgust ?>
those values are produced in CU-defs.php from
Code: Select all
$time = substr($WX['time'],0,5); // calculated value
$date = $WX['date'];
# generate the separate date/time variables by dissection of input date/time and format
list($date_year,$date_month,$date_day,$time_hour,$time_minute,$monthname,$dayname)
= CU_setDateTimes($date,$time,$SITE['WDdateMDY']);
$mrecordwindgust = $WX['MonthGustH'];
list($mrecordhighgustday,$mrecordhighgustmonth,$mrecordhighgustyear)=CU_getRecordDate($WX['MonthGustHD'],$WX['year']); // calculated value
In CUtags.php?sce=dump, the values above are
Code: Select all
$WX['date'] = '11. 11. 2023';
$WX['time'] = '22:25 on 11 november 2023';
$WX['year'] = '2023';
$WX['monthname'] = 'november';
$WX['MonthGustH'] = '69';
$WX['MonthGustHT'] = '19:58';
$WX['MonthGustHD'] = '02 november';
in CU-defs.php the
Code: Select all
#-------------------------------------------------------------------------------------
# CU support function - CU_getRecordDate - Convert 'dd Month '.'YYYY' to list(d,m,y)
#-------------------------------------------------------------------------------------
function CU_getRecordDate($inDayMonth,$inYear) {
global $SITE,$Debug;
$EnglishMonths = array(
'January','February','March','April','May','June',
'July','August','September','October','November','December');
$tstr = $inDayMonth . ' ' . $inYear;
$Debug .= "<!-- CU_getRecordDate input tstr='$tstr' -->\n";
// input dates are assumed to be in English only
if (isset($SITE['monthNames'])) {
// convert TO English for strtotime()
foreach ($EnglishMonths as $i => $monthEN) {
$tstr = preg_replace('|'.$SITE['monthNames'][$i].'|i',$monthEN,$tstr);
}
$Debug .= "<!-- CU_getRecordDate after tstr='$tstr' -->\n";
}
$ttime = strtotime($tstr);
$ltime = date('j n Y',$ttime);
$Debug .= "<!-- CU_getRecordDate result ltime='$ltime' -->\n";
return(explode(' ',$ltime));
}
is used to format the date. I think the issue is caused by
which should either be mm/dd/yyyy or dd/mm/yyyy -- the template doesn't understand the dd. mm. yyyy format.
For the 'unable to switch language' issue, I suspect it is the cookie consent script. Try commenting out
Code: Select all
<script src="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js" data-cfasync="false"></script>
in your index.php and see if the language switch works again. When the script is engaged (even with 'Permit' enabled, the cookie for language is not updated).