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
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']
Thanks for your help guys, it is appreciated