Page Index Toggle Pages: 1 Print
Adding a Login to Main Web Page HTML (Read 7031 times)
Captain John
Ex Member


Adding a Login to Main Web Page HTML
Apr 14th, 2008 at 3:46pm
Print Post  
Code
Select All
<form action="http://www.YOURURL/yabb2/YaBB.pl?action=login2" method="post">
		<div style="clear: both; padding-top: 4px; margin-left: auto; margin-right: auto; width: 600px;">
			<span style="float: left; width: 50%; text-align: left; margin-bottom: 5px;">
				Username or email address: <br />
				<input type="text" name="username" size="30" maxlength="30" style="width: 285px;" tabindex="1" />
			</span>
			<span style="float: left; width: 25%; text-align: left; margin-bottom: 5px;">
				Password:<br />
				<input type="password" name="passwrd" size="15" maxlength="30" style="width: 110px;" tabindex="2" />
			</span>
			<span style="float: left; width: 25%; text-align: left; margin-bottom: 5px;">
				Logged in for:<br />
				<select name="cookielength" style="width: 117px;" tabindex="3">
				<option value="2">Until I exit the browser</option>
				<option value="1" selected="selected" >Keeps</option>
				<option value="60">1 hour</option>
				<option value="180">3 hours</option>
				<option value="360">6 hours</option>
				<option value="720">12 hours</option>
				<option value="1440">24 hours</option>
				</select>
			</span>
		</div>
		<div style="clear: both; margin-top: 5px; margin-left: auto; margin-right: auto; width: 370px;">
			<span style="float: left; width: 49%; margin-bottom: 5px;">
				<input type="submit" value="Login" tabindex="5" accesskey="l" style="float: left; width: 175px;" class="button" />
			</span>
			<span style="float: left; width: 49%; margin-bottom: 5px;">
				<input type="button" value="Forgot password?" style="float: right; width: 175px;" onclick="location.href='http://www.YOURURL/yabb2/YaBB.pl?action=reminder'" class="button" />
			</span>
		  <br /><br />
		</div>
	  </form> 



     replace YOURURL with your url ... insert into your html ... This will work though it does not include FORM SESSION value ... You'll have to add hidden code value, which you can find by viewing source of your  forums login page.
  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: Adding a Login to Main Web Page HTML
Reply #1 - Apr 20th, 2008 at 2:10am
Print Post  
For YaBB Ver. 2.2.1

Code
Select All
<!-- Start of User Login -->
  <div class="bordercolor" style="width: 700px; margin-bottom: 8px; margin-left: auto; margin-right: auto;">

<table cellpadding="4" cellspacing="1" border="0" width="100%" align="center">
  <tr>
    <td class="titlebg" colspan="2"><b>Login</b></td>
  </tr>
  <tr>
    <td class="windowbg2" colspan="2" valign="middle">

    <form action="http://www.yourdomain.com/yabb2/YaBB.pl?action=login2" method="post">
    <div style="clear: both; padding-top: 4px; margin-left: auto; margin-right: auto; width: 600px;">
	<span style="float: left; width: 50%; text-align: left; margin-bottom: 5px;">
	  Username or email address: <br />
	  <input type="text" name="username" size="30" maxlength="30" style="width: 285px;" tabindex="1" />
	</span>
	<span style="float: left; width: 25%; text-align: left; margin-bottom: 5px;">
	  Password:<br />
	  <input type="password" name="passwrd" size="15" maxlength="30" style="width: 110px;" tabindex="2" />
	</span>

	  <input type="hidden" name="cookielength" value="1" />

    </div>
    <div style="clear: both; margin-top: 5px; margin-left: auto; margin-right: auto; width: 370px;">
	<span style="float: left; width: 49%; margin-bottom: 5px;">
	  <input type="submit" value="Login" tabindex="5" accesskey="l" style="float: left; width: 175px;" class="button" />
	</span>
	<span style="float: left; width: 49%; margin-bottom: 5px;">
	  <input type="button" value="Forgot password?" style="float: right; width: 175px;" onclick="location.href='http://www.yourdomain.com/yabb2/YaBB.pl?action=reminder'" class="button" />
	</span>
	<br /><br />
    </div>
	  <input type="hidden" name="formsession" value="5A7C677E3C4C626169206D6163497B6B7D7A0E0" /></form>
    </td>
  </tr>
</table>
<!-- End of User Login --></div>

  



the number to put in the highlighted should be in this file  /yabb2/Variables/cook.txt
« Last Edit: Jul 9th, 2008 at 9:40pm by »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Print
 
  « Board Index ‹ Board  ^Top