Find
PHP Code:
if ($thread['postuserid']) {
$thread['postedby'] = "<a href=\"member.php?action=getinfo&userid=$thread[postuserid]\">$thread[postusername]</a>";
} else {
$thread['postedby'] = $thread[postusername];
}
and replace with
PHP Code:
$secondname_db=$DB_site->query("SELECT fieldx FROM userfield WHERE userid='$thread[postuserid]'");
$secondname=$secondname_db[fieldx];
if ($thread['postuserid']) {
$thread['postedby'] = "<a href=\"member.php?action=getinfo&userid=$thread[postuserid]\">$secondname</a>";
} else {
$thread['postedby'] = $secondname;
}
edit the fieldX to whatever the field number is.
Have fun.