IntoVB |
05-28-2011 10:00 PM |
Invite only login page
1 Attachment(s)
What this template modification will do is create a universal login page for your forum meaning that people will only see this page when they come to your forum. I take no credit for the actual login page, it was the simple login page mod, i just fitted it into the pages. This code also has a link to a stylesheet, but you'll have to make that yourself.
First what you want to do is copy this code:
Code:
<if condition="$bbuserinfo['userid'] == 0">
<title>iPod-hacking</title>
<link rel="stylesheet" type="text/css" href="_css/style.css"/>
<!--[if IE]>
<style>
#pass_key label{
text-align: right;
margin: 10px 10px 0 21px;
}
</style>
<![EndIf]-->
</head>
<body>
<div id="container" align="center">
<img src="/images/logo.png" alt="MdS Logo"/>
<form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
<script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
<div id="player_name">
<label>Username:</label>
<input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="20" accesskey="u" tabindex="1" value=""/></td>
</div><!-- player_name -->
<div id="pass_key">
<label>Password:</label>
<input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="20" tabindex="2" /></td>
</div><!-- pass_key -->
<div id="remember_me">
<input type="checkbox" name="cookieuser" value="1" id="cb_cookieuser" tabindex="3" accesskey="c"/>
<label>Remember me?</label>
</div><!-- end remember_me -->
<input width="123" type="submit" value="log me in" height="46" border="1" tabindex="4" accesskey="s" alt="send" class="loginbtn"/>
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
<input type="hidden" name="url" value="/index.php" />
</form>
<div class="pbitttt" align="center">
Already logged in? Please click <a href="http://ipod-hacking.com/index.php">here</a>
Forgot your pass? Please click <a href="http://ipod-hacking.com/login.php?do=lostpw">here</a>
<div>
<center>
</div>
</div><!-- end container -->
</body>
</html>
<else />
Now you need to paste that at the start of these templates:
FORUMHOME
SHOWTHREAD
FORUMDISPLAY
and
SEARCH
At the end of these templates YOU MUST put </if>
The only way someone will be able to access the forum is if they know the exact URL of a thread, and this won't really help them unless you don't have an invite only mod on.
You will also want to edit the code wrapped in the first [CODE] tags to suit your forum
|