Jump to content
Sign in to follow this  
DonnaNJ

add login box to STS template

Recommended Posts

Hello

 

I've installed the Login box contribution which puts a nice login box on the main page.

 

However, I'm now using STS (Simple Template System) to redesign the whole layout ... and I don't know where to stick the call to login.php

 

How to a make a new variable for STS ?

 

Or can I still stick it on column_right.php .. which I did - but doesnt' seem to work.

 

I obviously can't stick it in the sts_template.html file - since it's html.

 

So how can I so this.

 

I tried defining another variable $login in the sts_display..something file.

 

I didn't get an error but it didn't work either ! LOL.

 

Thanks

 

Donna

 

:huh:

Share this post


Link to post
Share on other sites

DonnaNJ,

 

instead of adding a login box contribution, I thought about a more direct solution by adding a login html form to STS template and passing the email and password form variables to login.php

 

login html form:

<form action="http://www.yourdomain.com/catalog/login.php" method="post" name="process" >
Login:<input type="text" name="email_address"/><br/>
Password:<input type="password" name="password"/><br/>
<a class="anohref" id="sign_in" onclick="process.submit()">Sign in</a>
</form>

 

when you click Sign in , it takes you to the login page with email address box retaining the submitted email address and the password box empty. It looks like the form is not passing the two variables to process. Perhaps someone can tell why? I will be happy to turn this into a contribution if we can just get the variables to pass to login.php correctly

Share this post


Link to post
Share on other sites

oh I see why it did not pass, I needed to append ?action=process to login.php . It works like a charm now, here is the revised code, give this a try.

 

It is a box or div with email & password form input, signin, signup, and forgot password links, and also the STS $logoff variable. Do you think this is worthwhile to anyone else to turn it into a contribution ?

<!--  add this to your sts template file. --->
<div id="login">
<form action="http://pathtoyourstore/login.php?action=process" method="post" name="login" >
Login:<input type="text" name="email_address"/><br/>
Password:<input type="password" name="password"/><br/>
<a id="sign_in" onclick="login.submit()">Sign in</a>
<a id="sign_up" href="/create_account.php">Sign up</a>
<a id="forgot" href="/password_forgotten.php">Forgot?</a><br/>
$logoff
</form>
</div> <!-- end of login -->

Share this post


Link to post
Share on other sites
oh I see why it did not pass, I needed to append ?action=process to login.php . It works like a charm now, here is the revised code, give this a try.

 

It is a box or div with email & password form input, signin, signup, and forgot password links, and also the STS $logoff variable. Do you think this is worthwhile to anyone else to turn it into a contribution ?

<!--  add this to your sts template file. --->
<div id="login">
<form action="http://pathtoyourstore/login.php?action=process" method="post" name="login" >
Login:<input type="text" name="email_address"/><br/>
Password:<input type="password" name="password"/><br/>
<a id="sign_in" onclick="login.submit()">Sign in</a>
<a id="sign_up" href="/create_account.php">Sign up</a>
<a id="forgot" href="/password_forgotten.php">Forgot?</a><br/>
$logoff
</form>
</div> <!-- end of login -->

 

 

Thanks !

 

Looks great ! Works too ! Thanks

 

http://www.dbkwebdevelopment.com/3CFinal/

 

 

Donna

Share this post


Link to post
Share on other sites
Thanks !

 

Looks great ! Works too ! Thanks

 

http://www.dbkwebdevelopment.com/3CFinal/

Donna

 

looks great. Should I turn it into a contribution?

 

Have a blessed day.

Share this post


Link to post
Share on other sites
looks great. Should I turn it into a contribution?

 

Have a blessed day.

 

yes u should. i am sure that newbies like me want that.

Share this post


Link to post
Share on other sites

Hmm, Having trouble with this.

 

The 'sign in' text doesn't appear to be working. When I hover over it - it changes like a link, but I can't click it.

 

Any idea why?

Share this post


Link to post
Share on other sites
Hmm, Having trouble with this.

 

The 'sign in' text doesn't appear to be working. When I hover over it - it changes like a link, but I can't click it.

 

Any idea why?

 

My 'sign in' text appears as just text and not clickable :/, here is my code:

<!-- add this to your sts template file. --->
<div id="login">
 <div class="login_head">Login Now </div>
<form action="http://www.scottsdogtraining.com/catalog/login.php?action=process" method="post" name="login" >
<div class="login_text">Username</div><br /><input type="text" name="email_address" class="login_textbox" /><p />
<div class="login_text">Password</div><br /><input type="password" name="password" class="login_textbox" /><br />
<a id="sign_in" onclick="login.submit()">Sign in</a>
<div align="left"><a id="sign_up" href="create_account.php" class="more">Sign up</a></div>
$logoff
</form>
</div> <!-- end of login -->

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×