however the field "pf_autovol" remains empty,This is the full added code, comments welcome
in /includes/ucp/ucp_profile.php after$vars = array('cp_data', 'data', 'sql_ary');
addCode:
$TankDim = preg_replace("/\D+/", ':',$cp_data['pf_tankdim']);// Replace consecutive non-digits by ":" $Dim = array_pad(explode(":",$TankDim),3,"0");$TankVol = round((int)$Dim[0]*(int)$Dim[1]*(int)$Dim[2]/1000);($TankVol == 0) ? $TankVol = "?" : $TankVol = $TankVol." litres";// (Condition) ? true : false$cp_data["pf_autovol"] = $TankVol;
I thought it would be automatically updated each time the member modifies "'pf_tankdim"
why not ?
Statistics: Posted by Hervé — Mon Aug 12, 2024 12:01 pm