Recent Topics

1 Jul 27, 2010 13:48    

My b2evolution Version:

All our users' Logins and Nicknames are lower case, which looks a bit amateurish when they add a comment, as their name appears in lower case at the top of the comment.

We're using LDAP authentication on an intranet, and this creates user accounts this way automatically.

However, their Name (First Name + Last Name) is properly capitalised.

How can I change the template so that their Name is shown when they add a comment?

2 Jul 27, 2010 14:38

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)

3 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 Jul 27, 2010 16:37

You can change it in your skin, but it's probably easier to hack the core


	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'] );


Form is loading...