The BoardMod Project
 The Project | News | Downloads | Mods | FAQ | Templates | Chat | Forum
BoardMod Support Forum
[ Home | Help | Search | Login | Register ]  

19.06.13 at 16:27:28, Welcome, Guest. Please Login or Register

Choose Language:
Page Index Toggle Pages: 1
Login Box in a Different Directory then YaBB? (Read 4597 times)
NewshotDCB
Bloody Novice
*
Offline

Posts: 10



05.07.07 at 18:44:06  
Hi, I am extremely interested in using this product. I am a noob at webdesign and programming, so I purchased a package without any databases. I searched around until I found YaBB!

Anyways, I have a login box on my homepage of my site that I want to be connected with my forum. This way new users will be tempted to register for the forum because of the nice and pretty login box, while my base users will be able to sign in without an extra link.

Can anyone give me a tutorial of any kind? I read that other post, but I didn't really understand where I should put the code.

All help is appreciated!
 
IP Logged
 
ChiMoHe
Fulltime Hacker
***
Offline

, New Hampshire, USA
Posts: 197



Reply #1 - 07.07.07 at 15:39:47  
here is the login form html Code:

       <form action="http://*yourURL*/yabb2/YaBB.pl?action=login2" method="post">
<div style="clear: both; padding-top: 4px; margin-left: auto; margin-right: auto; width: 370px;">
<span style="float: left; width: 33%; text-align: left; margin-bottom: 5px;">
Username:<br />
<input type="text" name="username" size="15" style="width: 110px;" tabindex="1" />
</span>
<span style="float: left; width: 33%; text-align: left; margin-bottom: 5px;">
Password:<br />
<input type="password" name="passwrd" size="15" style="width: 110px;" tabindex="2" />
</span>
<span style="float: left; width: 33%; text-align: left; margin-bottom: 5px;">
Logged in for:<br />
<select name="cookielength" style="width: 117px;" tabindex="3">
<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;" />
</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://*yourURL*/yabb2/YaBB.pl?action=reminder'" />
</span>
</div>
       <input type="hidden" name="formsession" value="

what  goes here?

" /></form>



find
*yourURL*

and replace it with your url

I'm not to sure about the formsession data.  I know ithe value changes everytime I refresh

my guess would be to go to your forum and log out ... right click and select "view source"  then search for

name="formsession" value="

take the value you get (a long string of numbers and letters) and plug it into the form html.

you can change most of the html in the form to fit your needs

hope this is helpfull
« Last Edit: 17.04.08 at 05:47:54 by ChiMoHe »  
IP Logged
 
NewshotDCB
Bloody Novice
*
Offline

Posts: 10



Reply #2 - 08.07.07 at 15:43:29  
Thanks you are helping me so much. I made a lot of progress because of your code, but I'm having a problem now.

If I type in a username and a password, a message displays that tells me that the field only accepts numbers. I then just used numbers to see what will happen and I get the same message.

This is my current setup for my login box.

Code:
<form action="http://www.newshotstudio.com/cgi-bin/yabb2/YaBB.pl?action=login2" method="post">
<div id="field_username"> <strong><span>Log in:</span></strong>
<input type="text" name="username" />
</div>
<div id="field_password"> <strong><span>Password:</span></strong>
<input type="password" name="passwrd" />
</div>
<div id="button_enter">
<input type="image" src="images/userlogin_enter.gif" alt="Enter" class="button" />
</div>
<input type="hidden" name="formsession" value="A4BACBC6BAC0C46FA1C1C1AFB3B8688DB5B7B9B0564786"

what goes here?

" /></form>


Here is my site.

www.newshotstudio.com
 
IP Logged
 
qersys
Hacker Expert
****
Offline

SF, California, USA
Posts: 342



Reply #3 - 08.07.07 at 17:06:42  
I believe you Need to set the cookie length
 
IP Logged
 
NewshotDCB
Bloody Novice
*
Offline

Posts: 10



Reply #4 - 08.07.07 at 17:25:48  
I skipped the cookie length because I don't know how to program it without messing up my template.

This is my first website, so I am very new to design. I actually just downloaded a pre-made template and modified it object by object.

Can you fix it for me?
 
IP Logged
 
ChiMoHe
Fulltime Hacker
***
Offline

, New Hampshire, USA
Posts: 197



Reply #5 - 09.07.07 at 03:21:21  
replace

Code:
value="A4BACBC6BAC0C46FA1C1C1AFB3B8688DB5B7B9B0564786"

what goes here?

" /></form>


with

Code:

value="A4BACBC6BAC0C46FA1C1C1AFB3B8688DB5B7B9B0564786" /></form>


I took out the

what goes here?

I don't know anything about setting the cookie length.  sorry.
 
IP Logged
 
NewshotDCB
Bloody Novice
*
Offline

Posts: 10



Reply #6 - 09.07.07 at 05:15:29  
I did it. Nothing new happened.
 
IP Logged
 
ChiMoHe
Fulltime Hacker
***
Offline

, New Hampshire, USA
Posts: 197



Reply #7 - 09.07.07 at 13:51:05  
try this ...

Code:


<!-- Start of User Login -->
<div id="userlogin">
<div id="userlogin_header">
<h2><span>User Login</span></h2>
</div>
<form action="http://www.newshotstudio.com/cgi-bin/yabb2/YaBB.pl?action=login2" method="post">
<div id="field_username"> <strong><span>Log in:</span></strong>
<input type="text" name="username" />
</div>
<div id="field_password"> <strong><span>Password:</span></strong>
<input type="password" name="passwrd" />
</div>
<div id="button_enter">
<input type="submit" src="images/userlogin_enter.gif" alt="Enter" class="button" />
</div>
<input type="hidden" name="formsession" value="73899A95898F933E7090907E8287375C8486887F255037" /></form>
<div id="userlogin_links"> <a href="http://www.newshotstudio.com/cgi-bin/yabb2/YaBB.pl?action=register" id="register"><strong><span>Register >>></span></strong></a> <br />
<a href="http://www.newshotstudio.com/cgi-bin/yabb2/YaBB.pl?action=register" id="notregister"><strong><span>Not Registered Yet?</span></strong></a> </div>
</div>
<!-- End of User Login -->


I changed

Code:
	    <input type="image" src="images/userlogin_enter.gif" alt="Enter" class="button" /> 



to

Code:
	    <input type="submit" src="images/userlogin_enter.gif" alt="Enter" class="button" /> 



and your formsession value=


 
IP Logged
 
NewshotDCB
Bloody Novice
*
Offline

Posts: 10



Reply #8 - 09.07.07 at 15:44:54  
All that did was mess up my button.

I know we are close. We are just getting that error message.
 
IP Logged
 
ChiMoHe
Fulltime Hacker
***
Offline

, New Hampshire, USA
Posts: 197



Reply #9 - 09.07.07 at 15:54:10  
I think qersys was right ... the number value it's looking for is the cookie length ... so give this a try to see if it logs in and then we'll work on making it look pretty

Code:

<!-- Start of User Login -->
<div id="userlogin">
<div id="userlogin_header">
<h2><span>User Login</span></h2>
</div>
<form action="http://www.newshotstudio.com/cgi-bin/yabb2/YaBB.pl?action=login2" method="post">
<div id="field_username"> <strong><span>Log in:</span></strong>
<input type="text" name="username" />
</div>
<div id="field_password"> <strong><span>Password:</span></strong>
<input type="password" name="passwrd" /></div>
<div id="button_enter">
Logged in for:
<select name="cookielength" style="width: 117px;" tabindex="3">
<option value="1" 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>
&nbsp;&nbsp;
<input type="image" src="images/userlogin_enter.gif" alt="Enter" class="button" />
</div>
<input type="hidden" name="formsession" value="73899A95898F933E7090907E8287375C8486887F255037" /></form>
<div id="userlogin_links"> <a href="http://www.newshotstudio.com/cgi-bin/yabb2/YaBB.pl?action=register" id="register"><strong><span>Register >>></span></strong></a> <br />
<a href="http://www.newshotstudio.com/cgi-bin/yabb2/YaBB.pl?action=register" id="notregister"><strong><span>Not Registered Yet?</span></strong></a> </div>
</div>
<!-- End of User Login -->
 
IP Logged
 
ChiMoHe
Fulltime Hacker
***
Offline

, New Hampshire, USA
Posts: 197



Reply #10 - 09.07.07 at 16:09:24  
if it helps ... you could also set a default value for cookie length as a hidden input.  that way you don't need to have it affect your template.  If You opt to go that way

use this
Code:

  <!-- Start of User Login -->
   <div id="userlogin">
<div id="userlogin_header">
 <h2><span>User Login</span></h2>
</div>
<form action="http://www.newshotstudio.com/cgi-bin/yabb2/YaBB.pl?action=login2" method="post">
 <div id="field_username"> <strong><span>Log in:</span></strong>
   <input type="text" name="username" />
 </div>
 <div id="field_password"> <strong><span>Password:</span></strong>
   <input type="password" name="passwrd" />
 </div>

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

 <div id="button_enter">
   <input type="image" src="images/userlogin_enter.gif" alt="Enter" class="button" />
 </div>

   <input type="hidden" name="formsession" value="73899A95898F933E7090907E8287375C8486887F255037" /></form>
<div id="userlogin_links"> <a href="http://www.newshotstudio.com/cgi-bin/yabb2/YaBB.pl?action=register" id="register"><strong><span>Register >>></span></strong></a> <br />
 <a href="http://www.newshotstudio.com/cgi-bin/yabb2/YaBB.pl?action=register" id="notregister"><strong><span>Not Registered Yet?</span></strong></a> </div>
   </div>
   <!-- End of User Login -->


this will set the default cookielength to keeps
 
IP Logged
 
NewshotDCB
Bloody Novice
*
Offline

Posts: 10



Reply #11 - 09.07.07 at 18:36:42  
Oh my god!

Thank you so much. I was worried that I would have to remove that nice little feature. It works perfectly now!

Is there anything that I can do for you? Anything you need help with? Some of my members enjoy making banners, so I could get someone to help with that.

Thank you!
 
IP Logged
 
ChiMoHe
Fulltime Hacker
***
Offline

, New Hampshire, USA
Posts: 197



Reply #12 - 09.07.07 at 20:12:45  
no problem ... glad it works for you.  

Banners are great ... I'll put up a link exchange page so that we can swap banners and such.  I won't beable to get to it untill later later.  It's about to down pour with thundr and lightening showers so I need to shutdown untill it passes

good luck ... keep in touch ... I'm ussually always on and willing to help in anyway I can with just about anything

PLUR
 
IP Logged
 
mattcch
Bloody Novice
*
Offline

Posts: 45



Reply #13 - 26.01.08 at 23:54:29  
ChiMoHe wrote on 09.07.07 at 16:09:24:
if it helps ... you could also set a default value for cookie length as a hidden input.  that way you don't need to have it affect your template.  If You opt to go that way

use this
Code:

  <!-- Start of User Login -->
   <div id="userlogin">
<div id="userlogin_header">
 <h2><span>User Login</span></h2>
</div>
<form action="http://www.newshotstudio.com/cgi-bin/yabb2/YaBB.pl?action=login2" method="post">
 <div id="field_username"> <strong><span>Log in:</span></strong>
   <input type="text" name="username" />
 </div>
 <div id="field_password"> <strong><span>Password:</span></strong>
   <input type="password" name="passwrd" />
 </div>

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

 <div id="button_enter">
   <input type="image" src="images/userlogin_enter.gif" alt="Enter" class="button" />
 </div>

   <input type="hidden" name="formsession" value="73899A95898F933E7090907E8287375C8486887F255037" /></form>
<div id="userlogin_links"> <a href="http://www.newshotstudio.com/cgi-bin/yabb2/YaBB.pl?action=register" id="register"><strong><span>Register >>></span></strong></a> <br />
 <a href="http://www.newshotstudio.com/cgi-bin/yabb2/YaBB.pl?action=register" id="notregister"><strong><span>Not Registered Yet?</span></strong></a> </div>
   </div>
   <!-- End of User Login -->


this will set the default cookielength to keeps


Thanks a lots.Work great.
It is easily integrated into template.

link: http://www.yu38.com    Grin Grin
 
IP Logged
 
ChiMoHe
Fulltime Hacker
***
Offline

, New Hampshire, USA
Posts: 197



Reply #14 - 17.04.08 at 06:31:45  
HTML for YABB2.2.1 Login Box

Code:

<!-- 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>
 </div>
<!-- Start of User Login -->


Replace
yourdomain

with your domain url

Enjoy
 
IP Logged
 
Page Index Toggle Pages: 1
© 2000-2012 by - All rights reserved.

Project website hosting proudly sponsored and provided by UK2 Hosting
 The Project | News | Downloads | Mods | FAQ | Templates | Chat | Forum