Using 2.2.9.
This is how my code is right now:
PHP Code:
// get extra profile fields
$customfields = '';
$profilefields=$DB_site->query("SELECT profilefieldid,required,title
FROM profilefield
WHERE hidden=0
ORDER BY displayorder");
while ($profilefield=$DB_site->fetch_array($profilefields)) {
if ($backcolor=="{firstaltcolor}") {
$backcolor="{secondaltcolor}";
$bgclass = "alt2";
} else {
$backcolor="{firstaltcolor}";
$bgclass = "alt1";
}
$profilefieldname="field$profilefield[profilefieldid]";
if ($userinfo[$profilefieldname]=='') {
$profilefield[value]="N/A";
} else {
$profilefield[value]=$userinfo[$profilefieldname];
}
eval("\$customfields .= \"".gettemplate("getinfo_customfields")."\";");
}
eval("dooutput(\"".gettemplate("getinfo")."\");");
}