Recent Topics

1 Sep 29, 2008 13:37    

My b2evolution Version: 2.4.2
Hello, I have an issue - when user writes a comment I need system to show group name user is in next to his name.

can you help me?

2 Nov 20, 2008 09:42

my version is now 2.4.5

the same question - I still can't find how to do this - in the blog where registered user is placing the comment to a post and next to his name the user group is showed. How to do this?

thanx
B

3 Nov 20, 2008 15:03

Try the following:

1. If the file _item_comment.inc.php does not exist in your skin folder, copy it from skins/_item.comment.inc.php.
2. Open the file with an editor.
3. Line 52 should look like this:

$Comment->author();


Replace it with the following code:

// User group name
if ( ( $c_user =& $Comment->get_author_User() ) !== NULL )
{	// User is a member
	$c_usergroup = format_to_output( $c_user->get_Group()->get_name(), 'htmlbody' );
}
else
{
	$c_usergroup = '';
}

$Comment->author( '', '#', '', ' ['.T_( 'Member' ).': '.$c_usergroup.']' );

This will display the usual [Visitor] after the user's name if he is a guest and [Member: <Group name>] if the user is a member.

4 Nov 20, 2008 15:26

thank you, it worked!

brgds,
Ben

5 Dec 24, 2008 03:56

Thanks, it works fine also for me.
How I could achieve same result but for author's post?
I suppose it's in post.main.php and replace $Item->author, but I'm unable to modify your code to get it working.


Form is loading...