The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Login page for none members/not logged in members.
Right i want to make it so only signed in members are able to view the board.
I have made the following page http://www.ultimate-forums.co.uk for people to log in with but i want it so no matter what page a person trying to view if there not loged in they will view this page. eg try to view http://www.ultimate-forums.co.uk/vB/index.php if the uses are not loged in they view my log in page. I know this has been done for ikonboard but can it also be done for vb? if so how? |
#2
|
|||
|
|||
you have got to do this:
open member.php find: Code:
// ############################### start login ############################### Code:
if ($user['cookieuser']==1) { vbsetcookie("bbuserid",$user['userid']); Code:
if ($action=="login") { include("./global.php"); if (isset($username)) { // get userid for given username if ($user=$DB_site->query_first("SELECT userid,username,password,cookieuser FROM user WHERE username='".addslashes(htmlspecialchars($username))."'")) { if ($user['password']!=md5($password)) { // check password if ($sort == "bb") {; eval("standarderror(\"".gettemplate("error_wrongpassword")."\");"); } else {; echo ("<meta http-equiv=\"Refresh\" content=\"0;URL=/index.php?msg=3\">"); }; exit; } $userid=$user[userid]; } else { // invalid username entered if ($sort=="bb"){; eval("standarderror(\"".gettemplate("error_wrongusername")."\");"); } else {; echo ("<meta http-equiv=\"Refresh\" content=\"0;URL=/index.php?msg=2\">"); }; exit; } open up your CP and find every template that has anything to do with logging in, like the No permission form. Add right underneath the sessionhash line: Code:
<input type="hidden" name="sort" value="bb"> create a new page index.php and place within: Code:
<?php echo (' <HTML> <HEAD> <TITLE>AlexDex Net Board</TITLE> </HEAD> <BODY> <table border="0" bgcolor="#555576" cellpadding="4" cellspacing="1" align="center"> <form action="/forums/member.php" method="post"><input type="hidden" name="s" value="0b99c5440d5ea1850fb094ae79454a1b"> <input type="hidden" name="sort" value="nobb"> <tr valign="top"> '); if (!isset($msg)) {; $msg="1"; }; if ($msg=="1") { echo(' You need to log in'); } if ($msg=="2") { echo(' The given username was incorrect'); } if ($msg=="3") { echo(' The given password was incorrect'); } echo (' <td bgcolor="#DFDFDF"><font face="verdana, arial, helvetica" size="2" ><b>Your User Name:</b></font></td> <td bgcolor="#DFDFDF"><font face="verdana, arial, helvetica" size="2" ><input type="text" class="bginput" name="username" value="Unregistered" size="25"> </font> <font face="verdana,arial,helvetica" size="1" ><a href="/forums/register.php?action=signup">Want to register?</a> </font></td> </tr> <tr valign="top"> <td bgcolor="#F1F1F1"><font face="verdana, arial, helvetica" size="2" ><b>Your Password:</b></font></td> <td bgcolor="#F1F1F1"><font face="verdana, arial, helvetica" size="2" ><input type="password" class="bginput" name="password" value="" size="25"> </font> <font face="verdana,arial,helvetica" size="1" ><a href="/forums/member.php?action=lostpw">Forgotten your password?</a> </font></td> </tr> </table> <br> <center><font face="verdana, arial, helvetica" size="2" > <input type="hidden" name="action" value="login"> <input type="hidden" name="url" value="/"> <input type="submit" class="bginput" value="Login!"></form> </font></center> <p><font face="verdana,arial,helvetica" size="1" >The administrator may have required you to <a href="/forums/register.php?action=signup">register</a> before you can view this page. </font></p></font></td> </tr> </table> </BODY> </HTML> '); ?> The code above will produce, when you call the login from a separate page, you won't get the vBulletin errors for username and password, but the errors you specify in your php file good luck! |
#3
|
|||
|
|||
p.s.
if you are logged in on the board, you still need to provide your info every time. maybe a good idea for a future hack |
#5
|
|||
|
|||
FireFly has your a good hacker (no butt kissing at all) have you got any ideas on just how i might be able to do this?
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|