2015-08-25, 01:56 AM
Hello,
I'm trying to make a custom login page. I know how to make custom php pages, so I created a very simple page titled "global-login.php".
I created a new template called "global_login" and it's attached to the global-login.php file.
This is what i have in the template:
This is the global-login.php file:
The page loads correctly and I can login from the page without a problem.
For some reason the text/link for "forgot password" is not showing.
I'm sure I missed something that is pretty easy, just wondering if another set of eyes could point out my folly.
Thanks!
I'm trying to make a custom login page. I know how to make custom php pages, so I created a very simple page titled "global-login.php".
I created a new template called "global_login" and it's attached to the global-login.php file.
This is what i have in the template:
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->login}</title>
{$headerinclude}
</head>
<body>
<br />
{$inline_errors}
{$member_loggedin_notice}
<div class="container">
<div id="logo"><img src="/images/artofwar/aowlogo.png"> </div>
<form action="member.php" method="post">
<div class="well well-sm well-head thread"><span>{$lang->login}</span></div>
<div class="col-xs-12 col-md-6 col-md-offset-3">
<div class="form-group">
<div class="input-group">
<label class="sr-only" for="username">{$lang->username}</label>
<input type="text" class="textbox form-control" name="username" id="username" value="{$username}" placeholder="Username" />
<label for="username" class="input-group-addon glyphicon glyphicon-user"></label>
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 col-md-offset-3">
<div class="form-group">
<div class="input-group">
<input type="password" class="textbox form-control" name="password" value="{$password}" placeholder="Password"/>
<label for="password" class="input-group-addon glyphicon glyphicon-lock"></label>
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 col-md-offset-3">
<div class="col-xs-6 pull-left">
<div class="form-group">
<div class="checkbox">
<label title="{$lang->remember_me_desc}"><input type="checkbox" class="checkbox" name="remember" checked="checked" value="yes" /> {$lang->remember_me}</label>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="checkbox">(<a href="{$mybb->settings['bburl']}/member.php?action=lostpw">{$lang->lostpw_note}</a>)</div>
</div>
</div>
<table class="table">
{$captcha}
</table>
<br />
<div class="text-center"><input type="submit" class="btn btn-primary" name="submit" value="{$lang->login}" /></div>
<input type="hidden" name="action" value="do_login" />
<input type="hidden" name="url" value="{$redirect_url}" />
</form>
</div>
{$footer}
</body>
</html>
This is the global-login.php file:
<?php
define("IN_MYBB", 1);
define("NO_ONLINE", 1);
define('THIS_SCRIPT', 'global-login.php');
require_once "./global.php";
add_breadcrumb("Global Login", "global-login.php");
eval("\$html = \"".$templates->get("global_login")."\";");
output_page($html);
?>
The page loads correctly and I can login from the page without a problem.
For some reason the text/link for "forgot password" is not showing.
I'm sure I missed something that is pretty easy, just wondering if another set of eyes could point out my folly.
Thanks!