1 gcompton Jul 27, 2010 13:48
3 gcompton Jul 27, 2010 15:50
Is it possible to change the default "Identity shown", or will we have to set it manually on each profile?
I'm on 3.3.3
4 yabba Jul 27, 2010 16:37
You can change it in your skin, but it's probably easier to hack the core
inc/comments/model/_comment.class.php
function get_author( $params = array() )
{
global $Plugins;
// Make sure we are not missing any param:
$params = array_merge( array(
'before_visitor' => '',
'after_visitor' => ' ['.T_('Visitor').']',
'before_user' => '',
'after_user' => ' ['.T_('Member').']',
'format' => 'htmlbody',
'make_link' => false,
), $params );
if( $this->get_author_User() )
{ // Author is a user
if( strlen( $this->author_User->url ) <= 10 )
{
$params['make_link'] = false;
}
// added line
$this->author_User->idmode = 'namefl'; // or namelf
$author_name = format_to_output( $this->author_User->get_preferred_name(), $params['format'] );
¥
No need to change the skin. There's a variety of options available under the 'Identity shown:' field of the user's profile. You would want to choose the <<First name Last name>> option.
(You didn't specify your version and I can only vouch for 3.3.3)