MyBB Community Forums

Full Version: Edit, Ban a user in AdminCP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello all,
Going to the profile of a user how can i edit his profile using admin CP.
cos i only see these two moderator options
Quote: * Edit this user in Mod CP
* Ban this user in Mod CP


How can it be like
Quote: * Edit this user in Admin CP
* Ban this user in Admin CP

I am logged in as admin of course Smile
Go to your adminCP, click Users & groups and find the users you want to edit. Everything you need will be there Smile
Big Grin well no that ..........
but what m asking is some thing else.......

I just move in the user profile then a direct link there to admin CP to edit that user.
I have been doing this in last version i think but now it takes me to MOD CP.
Add this to the template member_profile_modoptions:

<ul>
<li><a href="{$mybb->settings['bburl']}/{$mybb->config['admin_dir']}/index.php?module=user/users&amp;action=edit&amp;uid={$uid}">Edit in Admin CP</a></li>
<li><a href="{$mybb->settings['bburl']}/{$mybb->config['admin_dir']}/index.php?module=user/banning&amp;uid={$uid}">Ban in Admin CP</a></li>
</ul>
Ooh I see sorry!
an additional modify if you want this to appear only for who can access the ACP
in member.php find
if($mybb->usergroup['canmodcp'] == 1)
	{
		eval("\$modoptions = \"".$templates->get("member_profile_modoptions")."\";");
	}
	
	else
	{
		$modoptions = '';
	}
add before
if($mybb->usergroup['cancp'] == 1)
	{
		eval("\$adminoption = \"".$templates->get("member_profile_adminoption")."\";");
	}
	else{
		$adminoption = "";
	}
then in member_profile_modoptions find
<ul>
<li><a href="{$mybb->settings['bburl']}/modcp.php?action=editprofile&amp;uid={$uid}">{$lang->edit_in_mcp}</a></li>
<li><a href="{$mybb->settings['bburl']}/modcp.php?action=banuser&amp;uid={$uid}">{$lang->ban_in_mcp}</a></li>
</ul>
add after it
{$adminoption}
then create new template give it the name
member_profile_adminoption
and put in it what DennisTT posted above
<ul>
<li><a href="{$mybb->settings['bburl']}/{$mybb->config['admin_dir']}/index.php?module=user/users&amp;action=edit&amp;uid={$uid}">Edit in Admin CP</a></li>
<li><a href="{$mybb->settings['bburl']}/{$mybb->config['admin_dir']}/index.php?module=user/banning&amp;uid={$uid}">Ban in Admin CP</a></li>
</ul>
Yeah not sure why that was removed for admins.

And it should "Edit this user in Admin CP" imho. You can already ban in modcp. However you can't edit groups in modcp. Or lookup the IPs to check against other users.
(2008-10-15, 09:04 PM)labrocca Wrote: [ -> ]Yeah not sure why that was removed for admins.

And it should "Edit this user in Admin CP" imho. You can already ban in modcp. However you can't edit groups in modcp. Or lookup the IPs to check against other users.

thats true, and yes it's odd to get it removed in 1.4.*
I just noticed that there is template called member_profile_adminoptions in default mybb 1.4 templates.. but it's contain the old version of the template.
(2008-10-16, 03:09 AM)pepotiger Wrote: [ -> ]I just noticed that there is template called member_profile_adminoptions in default mybb 1.4 templates.. but it's contain the old version of the template.
You probably upgraded from 1.2.x. The upgrader doesn't delete old templates.
yes thats true too. I forgot that, the upgrade process doesn't delete the old templates Toungue
Pages: 1 2