MyBB Community Forums

Full Version: change the "force login" page look
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I want to customize my "login page" (forced login template: error_nopermission), how can I do that?
Found the template but only can edit this:

{$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="{$redirect_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 float_right" style="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 />

I want to make a completely custom login design (with custom header/body). the member_login template is fully customizable but if I turn force_login to ON the forum chooses the error_nopermission template.

kind regards
The rest of page is in the error template, but editing it will affect all error pages.
(2014-10-03, 11:09 PM)Destroy666 Wrote: [ -> ]The rest of page is in the error template, but editing it will affect all error pages.

ist there any way to use the member_login template for the option "force login"?
You would have to edit the error_no_permission() function in inc/functions.php so that it uses a custom template.
(2014-10-04, 01:29 PM)Destroy666 Wrote: [ -> ]You would have to edit the error_no_permission() function in inc/functions.php so that it uses a custom template.

thanks. found:

eval("\$errorpage = \"".$templates->get("error_nopermission")."\";"); }
error($errorpage);

replaced with:

eval("\$login = \"".$templates->get("member_login")."\";"); }
output_page($login);

now its working, but it isnt loading the <head> content, so no CSS and JS are loaded.
anyway is my replacement o.k?