Veer Well-known member Feb 2, 2011 #1 Hello, Is there a way to hide the "Admin Control Panel" link from non-super admin users and also restrict access to admin.php ?
Hello, Is there a way to hide the "Admin Control Panel" link from non-super admin users and also restrict access to admin.php ?
Paul B XenForo moderator Staff member Feb 2, 2011 #2 I'm not sure I understand, why are they Administrators if they can't access the ACP? Restricting access to admin.php can be achieved using .htaccess, for example: Code: <Files admin.php> AuthType Basic AuthName "ACP" AuthUserFile "path_to_passwd_file" Require valid-user </Files> Upvote 0 Downvote
I'm not sure I understand, why are they Administrators if they can't access the ACP? Restricting access to admin.php can be achieved using .htaccess, for example: Code: <Files admin.php> AuthType Basic AuthName "ACP" AuthUserFile "path_to_passwd_file" Require valid-user </Files>
F Floris Guest Feb 2, 2011 #3 You can use a conditional to check if $visitor.user_id is 1, .. Upvote 0 Downvote
F Floris Guest Feb 2, 2011 #4 admin.php > appearance > templates > find: moderator_bar and inside it find this code: Code: <a href="admin.php" class="acp adminLink"><span class="itemLabel">{xen:phrase admin_control_panel}</span></a> and replace it with this code: Code: <xen:if is="{$visitor.user_id} == 1"> <a href="admin.php" class="acp adminLink"><span class="itemLabel">{xen:phrase admin_control_panel}</span></a> </xen:if> And save the template. The super-admin is usually user id 1, otherwise change it. Upvote 0 Downvote
admin.php > appearance > templates > find: moderator_bar and inside it find this code: Code: <a href="admin.php" class="acp adminLink"><span class="itemLabel">{xen:phrase admin_control_panel}</span></a> and replace it with this code: Code: <xen:if is="{$visitor.user_id} == 1"> <a href="admin.php" class="acp adminLink"><span class="itemLabel">{xen:phrase admin_control_panel}</span></a> </xen:if> And save the template. The super-admin is usually user id 1, otherwise change it.
Veer Well-known member Feb 2, 2011 #5 Thanks, Floris & Brogan. That's exactly what I needed. Upvote 0 Downvote
R ragtek Guest Feb 2, 2011 #6 Brogan said: I'm not sure I understand, why are they Administrators if they can't access the ACP? Click to expand... agree Upvote 0 Downvote
Brogan said: I'm not sure I understand, why are they Administrators if they can't access the ACP? Click to expand... agree