forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: fbattikha on March 29, 2005, 07:49:18 pm

Title: login from html
Post by: fbattikha on March 29, 2005, 07:49:18 pm
Urgent Urgent Urgent:  :\'( I've made a page in html, and i've place a login area on it, how can i make users from there login to coppermine?
help is greatly appreceated..... ???
Title: Re: login from html
Post by: Nibbler on March 29, 2005, 08:52:32 pm
Aim it at login.php and make sure the form input names are the same as coppermine uses.
Title: Re: login from html
Post by: fbattikha on April 04, 2005, 05:13:17 pm
i aimed it to login.php
but the rest i didn't get it... can u b more specific  :-\\
Title: Re: login from html
Post by: Nibbler on April 04, 2005, 05:35:32 pm
You need a box for the user to enter their username, this must be called 'username' and the box for the password must be named 'password' The submit button must be named 'submitted'. Go to the coppermine login page and do view source to see what the html needs to look like.
Title: Re: login from html
Post by: fbattikha on April 04, 2005, 06:59:16 pm
here's the code:
<tr>
           <TD height="82" align="left" valign="bottom" ><div align="left">
               <p><span class="style4 style2" style="margin-left:2px"><font size="-2" face="Arial Black">Username:</font></span>
                 <input type="text" style="width:117px; height:16px; margin-left:1px;margin-top:22px;font-family:Arial; font-size:9px">
</p>
                 </div>             <div align="left"><span class="style4 style2" style="margin-left:2px"><font size="-2" face="Arial Black">Password:</font></span>
                <input type="password" style="width:117px; height:16px; margin-left:2px; margin-top:7px; margin-right:0px;font-family:Arial; font-size:9px">
            <a href="forum/login.php"><img src="images/go_01.gif" alt="Login" width="23" height="26" border="0" align="absbottom"></a></div></TD>
        </tr>

please note that the go_01.gif is the login button.... can u check where it's gone worng... :\'(
Title: Re: login from html
Post by: kegobeer on April 04, 2005, 07:32:22 pm
Instructions on how to code forms and how they should be used in tables:

http://www.w3schools.com/html/html_forms.asp
http://www.cs.tut.fi/~jkorpela/forms/tables.html#nesting
Title: Re: login from html
Post by: snork13 on April 04, 2005, 07:40:25 pm
ok,

here is what i did:

Code: [Select]
<html>
<head>
<title>Gallery.Snork13.Net - Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Pragma" content="no-cache" />
<link rel="stylesheet" href="gallery/themes/simple/style.css" />

<script language="JavaScript">
<!--

function SymError()
{
  return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
  return (new Object());
}

window.open = SymWinOpen;

//-->
</script>
</head>
<noscript><body><div style='text-align:center'>
</div>
</noscript> <center>
</center>
                         <h2>Enter your username and password to login</h2>
        <form action="http://gallery.snork13.net/login.php?referer=index.html" method="post" name="loginbox">
                Username : <input type="text" class="textinput" name="username"><br />
                <script language="javascript" type="text/javascript">
                <!--
               document.loginbox.username.focus();
                 -->
                 </script>
            Password :  <input type="password" class="textinput" name="password"><br />
Remember me <input name="remember_me" type="checkbox" class="checkbox" value="1">
                <a href="gallery/forgot_passwd.php" class="topmenu">I forgot my password</a><br />
                <input name="submitted" type="submit" class="button" value="Login">
</body>
</html>

http://www.snork13.net/login.php <--- example of it

i had help from foulu and kegobeer  ;)

snork

Title: Re: login from html
Post by: kegobeer on April 04, 2005, 09:40:14 pm
Why do you have javascript after the closing html tag?  AFAIK all javascript must be in the head or the body.
Title: Re: login from html
Post by: snork13 on April 05, 2005, 12:15:49 am
Why do you have javascript after the closing html tag?  AFAIK all javascript must be in the head or the body.

thanks kegobeer...if your every in chicago i know some brewmasters ;)
Title: Re: login from html
Post by: fbattikha on May 01, 2005, 06:14:16 am
thanks to Nibbler I've manged to do it :D but the big problem is n the submit button i want to make it a gif... here's the code i used to change it but if i use it the login doesn't work:

Code: [Select]
[color=Red]<INPUT TYPE="image" SRC="images/go.gif" ALT="Log In" input name="submitted">[/color]
does anybody know how to fix this problem??


here's the working login script from Nibbler:

Code: [Select]
<form action="http:yoursite.com/gallery/login.php" method="post" name="loginbox">
Username : <input type="text" class="textinput" name="username"><br />
Password :  <input type="password" class="textinput" name="password"><br />
Remember me <input name="remember_me" type="checkbox" class="checkbox" value="1"><br />
<input name="submitted" type="submit" class="button" value="Login">
</form>
Title: Re: login from html
Post by: Joachim Müller on May 01, 2005, 08:36:52 am
try the html tag <button> instead of <input>, see http://www.w3schools.com/tags/tag_button.asp