Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 1772

phpBB Custom Coding • Re: Cron task

$
0
0
This is the full added code, comments welcome
in /includes/ucp/ucp_profile.php after $vars = array('cp_data', 'data', 'sql_ary'); add

Code:

$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;
however the field "pf_autovol" remains empty,
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



Viewing all articles
Browse latest Browse all 1772

Trending Articles