Quote:
Originally Posted by justasiam
I would love to use this mod, but I would need the "Real Name" to display on the postbit INSTEAD of their username. If there is nothing in the user field, then the username shows, if there is a entry in the Reel Name field, then that shows instead.
Ideas?
|
If you are interesting in this for just the postbit, then create a plugin hooked at "memberaction_dropdown" with the "Plugin PHP Code":
PHP Code:
if (THIS_SCRIPT === 'showthread')
{
global $post;
$new_name = $post['field4'];
if ($new_name)
{
$memberinfo['musername'] = str_replace($memberinfo['username'], $new_name, $memberinfo['musername']);
$memberinfo['username'] = $new_name;
}
}
Change "field4" to the profile field you are using to store the user's real name.
edit: I changed to code to remove the call to a function containing a db query.