Hello-
Is there a way to set it so that more information shows up in the Member List? For example, user titles and groups. I think that this would be very helpful.
Also, along those same terms, is there any way for a member to see who is currently part of a group? Because I can't figure that out, either, besides individually viewing every member and seeing what group they are a part of. Is there an area you can go to view all the members of a group?
Thank you for the help!
Can someone please help me?? I know the coding for this would not be difficult, I just am not familiar with PHP and tried to do it on my own but couldn't get it to work.
Please help!!!
A Possible Solution
Open Member List Templates - memberlist
Find
<td class="tcat"><span class="smalltext"><strong>{$lang->posts}</strong></span></td>
Add Below
<td class="tcat"><span class="smalltext"><strong>UserGroup</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>UserTitle</strong></span></td>
Find inline (2times)
colspan="6"
Change into
colspan="8"
Then open Member List Templates - memberlist_row
Find
<td class="trow2">{$users['postnum']}</td>
Add below
<td class="trow1">{$usergroup}</td>
<td class="trow2">{$usertitle}</td>
And last =P
Open memberlist.php
Find
eval("\$member .= \"".$templates->get("memberlist_row")."\";");
Add above
// START
// GET USERGROUPNAME
$query_ = $db->simple_select(TABLE_PREFIX."usergroups", "title", "gid='".$users['usergroup']."'");
$usergroup = $db->fetch_field($query_, title);
// GET USERTITLE
if($users['usertitle'] != "")
{
$usertitle = $users['usertitle'];
}
else
{
// GET DEFAULT
require_once MYBB_ROOT."inc/functions_user.php";
$usertitle = get_usertitle($users['uid']);
}
// END
Find
$member = "<tr>\n<td colspan=\"6\" align=\"center\" class=\"trow1\">$lang->error_no_members</td>\n</tr>";
Change into
$member = "<tr>\n<td colspan=\"8\" align=\"center\" class=\"trow1\">$lang->error_no_members</td>\n</tr>";
Should result in something like this
Memberlist
Thank you SO much!! I will try it and let you know if I have any problems.
Awesome, it worked fabulously.
Is there any way to get it to list more then one usergroup, if a member is in more then one?
Thanks so much again!!!
Just needs an extra piece of code
Find
// GET USERGROUPNAME
$query_ = $db->simple_select(TABLE_PREFIX."usergroups", "title", "gid='".$users['usergroup']."'");
$usergroup = $db->fetch_field($query_, title);
Add below
// GET ADDITIONAL GROUPS
if($users['additionalgroups'] != "")
{
$usergroup .= ", ";
$groups = explode(",",$users['additionalgroups']);
$sep = "";
foreach($groups as $group)
{
$query_ = $db->simple_select(TABLE_PREFIX."usergroups", "title", "gid='".$group."'");
$usergroup .= $sep.$db->fetch_field($query_, title);
$sep = ", ";
}
}