2011-02-23, 05:51 AM
You might have noticed a link
Go to ./member.php and find; (around line # 1752)
and add the following code just after that;
Now Go to: Admin CP > Templates > *Your theme's templates* > Member Templates > member_profile_modoptions > and find;
and Replace it to;
Now Go to: ./inc/languages/english/member.php and find;
Similarly, if you want to change the link in
Open ./member.php and find; (around line # 1734)
and add the following code just above that;
Now Go to: Admin CP > Templates > *Your theme templates* > Member Templates > member_profile_adminoptions > and find;
and Replace it to;
No Go to: ./inc/languages/english/member.php and find;
Save the files and templates and the bug corrected
OLD:
[attachment=21710] [attachment=21712]
NEW:
[attachment=21711] [attachment=21713]
Ban this user in Mod CP
in user profile. If you ban a user, the link still says the same Ban this user in ModCP
. However the user is already banned I've reported this bug here: http://community.mybb.com/thread-88947.html . There is a small fix for this so I thought to share it with the community. Go to ./member.php and find; (around line # 1752)
else
{
$memprofile['usernotes'] = $lang->no_usernotes;
}
and add the following code just after that;
if ($memprofile['usergroup'] != 7)
{
$ban_unban = "<li><a href=\"{$mybb->settings['bburl']}/modcp.php?action=banuser&uid={$uid}\">{$lang->ban_in_mcp}</a></li>";
}
else
{
$ban_unban = "<li><a href=\"{$mybb->settings['bburl']}/modcp.php?action=liftban&uid={$uid}&my_post_key={$mybb->post_code}\">{$lang->unban_in_mcp}</a></li>";
}
if ($memprofile['uid'] == $mybb->user['uid'])
{
$ban_unban = "";
}
Now Go to: Admin CP > Templates > *Your theme's templates* > Member Templates > member_profile_modoptions > and find;
<li><a href="{$mybb->settings['bburl']}/modcp.php?action=banuser&uid={$uid}">{$lang->ban_in_mcp}</a></li>
and Replace it to;
{$ban_unban}
Now Go to: ./inc/languages/english/member.php and find;
$l['ban_in_mcp'] = "Ban this user in Mod CP";
and add the following just after that;$l['unban_in_mcp'] = "Unban this user in Mod CP";
Similarly, if you want to change the link in
Administrator Options
options box, then here is how;Open ./member.php and find; (around line # 1734)
eval("\$adminoptions = \"".$templates->get("member_profile_adminoptions")."\";");
and add the following code just above that;
if ($memprofile['usergroup'] != 7)
{
$ban_unban = "<li><a href=\"{$mybb->settings['bburl']}/{$config['admin_dir']}/index.php?module=user/banning&uid={$uid}\">{$lang->admin_ban_in_acp}</a></li>";
}
else
{
$ban_unban = "<li><a href=\"{$mybb->settings['bburl']}/{$config['admin_dir']}/index.php?module=user-banning&action=lift&uid={$uid}&my_post_key={$mybb->post_code}\">{$lang->admin_unban_in_acp}</a></li>";
}
if ($memprofile['uid'] == $mybb->user['uid'])
{
$ban_unban = "";
}
Now Go to: Admin CP > Templates > *Your theme templates* > Member Templates > member_profile_adminoptions > and find;
<li><a href="{$mybb->settings['bburl']}/{$config['admin_dir']}/index.php?module=user/banning&uid={$uid}">{$lang->admin_ban_in_acp}</a></li>
and Replace it to;
{$ban_unban}
No Go to: ./inc/languages/english/member.php and find;
$l['admin_ban_in_acp'] = "Ban this user in Admin CP";
and add the following code just below that;$l['admin_unban_in_acp'] = "Unban this user in Admin CP";
Save the files and templates and the bug corrected
OLD:
[attachment=21710] [attachment=21712]
NEW:
[attachment=21711] [attachment=21713]