MyBB Community Forums

Full Version: Removing text from "No Permissions" Login Page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I am using MyBB to manage clients who have been given pre-made logins by an administrators/moderators and thus would not be registering themselves, so registering is moot and I would like to remove the text on the "no permissions" page for guests:

"You are either not logged in or do not have permission to view this page. This could be because one of the following reasons:

1. You are not logged in or registered. Please use the form at the bottom of this page to login.
2. You do not have permission to access this page. Are you trying to access administrative pages or a resource that you shouldn't be? Check in the forum rules that you are allowed to perform this action.
3. Your account may have been disabled by an administrator, or it may be awaiting account activation.
4. You have accessed this page directly rather than using appropriate forms or links."

I have found these four consecutive text strings in the messages.lang.php file, but this does not help me. I want to remove the whole block from the page regardless of permissions (these strings are displayed, for example, if guests have zero permissions to view the forums). I have been unable to find a place to do this in any of the code.

Any suggestions on how to remove this block of text and just leave the login fields? Seems like it should be something easy to comment out somewhere but I simply cannot find it.

Thanks,

-Matt
The template code should be:
{$lang->error_nopermission_guest_1}
<ol>
<li>{$lang->error_nopermission_guest_2}</li>
<li>{$lang->error_nopermission_guest_3}</li>
<li>{$lang->error_nopermission_guest_4}</li>
<li>{$lang->error_nopermission_guest_5}</li>
</ol>
<form action="member.php" method="post">
<input type="hidden" name="action" value="do_login" />
<input type="hidden" name="url" value="{$url}" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><span class="smalltext"><strong>{$lang->login}</strong></span></td>
</tr>
<tr>
<td class="trow1"><strong>{$lang->username}</strong></td>
<td class="trow1"><input type="text" class="textbox" name="username" tabindex="1" /></td>
</tr>
<tr>
<td class="trow2"><strong>{$lang->password}</strong></td>
<td class="trow2"><input type="password" class="textbox" name="password" tabindex="2" /></td>
</tr>
<tr>
<td class="trow2" colspan="2"><span class="smalltext" style="float:right; padding-top:3px;"><a href="member.php?action=register">{$lang->need_reg}</a> | <a href="member.php?action=lostpw">{$lang->forgot_password}</a>&nbsp;</span>&nbsp;<input type="submit" class="button" value="{$lang->login}" tabindex="3" /></td>
</tr>
</table>
</form>
<br />

Just leave the Form codes the template should look like this after removing:
<form action="member.php" method="post">
<input type="hidden" name="action" value="do_login" />
<input type="hidden" name="url" value="{$url}" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><span class="smalltext"><strong>{$lang->login}</strong></span></td>
</tr>
<tr>
<td class="trow1"><strong>{$lang->username}</strong></td>
<td class="trow1"><input type="text" class="textbox" name="username" tabindex="1" /></td>
</tr>
<tr>
<td class="trow2"><strong>{$lang->password}</strong></td>
<td class="trow2"><input type="password" class="textbox" name="password" tabindex="2" /></td>
</tr>
<tr>
<td class="trow2" colspan="2"><span class="smalltext" style="float:right; padding-top:3px;"><a href="member.php?action=register">{$lang->need_reg}</a> | <a href="member.php?action=lostpw">{$lang->forgot_password}</a>&nbsp;</span>&nbsp;<input type="submit" class="button" value="{$lang->login}" tabindex="3" /></td>
</tr>
</table>
</form>
<br />
Thanks, found it under Error templates. Was looking in Member templates since that was the name of the php file. Works great; thanks... Wink
Go to:
Admin CP > Templates & Styles > Templates > THEME > Error Message Templates > error_nopermission