MyBB Community Forums

Full Version: Display group string
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

I want to make add display a users primary group under their profile, what string Must I use to display this? I searched the forum, but only got one thing that didn't work

Regards
$memprofile['usergroup']
Thanks, but now it is just showing the Group's gid, so it is just a number, is there any way to fix this?
Open ./member.php and find;
	// Get member's permissions
	$memperms = user_permissions($memprofile['uid']);
and Add the following code just above that;
	$query_gid = $db->simple_select("usergroups", "*", "gid='{$memprofile['usergroup']}'");
	$primary = $db->fetch_array($query_gid);
	$primary_usergroup = 'Primary Group: <img src="'.$primary['image'].'">';

Now add $primary_usergroup where ever you want to display image in member_profile template.
(2011-07-28, 05:30 PM)Yaldaram Wrote: [ -> ]Open ./member.php and find;
	// Get member's permissions
	$memperms = user_permissions($memprofile['uid']);
and Add the following code just above that;
	$query_gid = $db->simple_select("usergroups", "*", "gid='{$memprofile['usergroup']}'");
	$primary = $db->fetch_array($query_gid);
	$primary_usergroup = 'Primary Group: <img src="'.$primary['image'].'">';

Now add $primary_usergroup where ever you want to display image in member_profile template.

You could do that, or I believe you could use the cache in order to not add a query. I'll have to see how it might be done though.
Got a easier way, without making any core edits, only template edits:

$displaygroup['title']
Toungue Thanks for your help guys, it is appreciated