Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: (Simple) How to integrate login form into your website using only forms  (Read 2794 times)

0 Members and 1 Guest are viewing this topic.

skullz

  • Coppermine newbie
  • Offline Offline
  • Posts: 3

OK, so I kept trying to find out how I could integrate login process of coppermine into my website without installing mods, plugins etc... allowing me to do so.

here is what I came up with...

when you click login on your gallery you can view the source and hunt for the login box form and stuff...

to get things to work with your website ( not gallery but your root site or where ever you want to display it on.... )

it goes something like;
Code: [Select]
                    <form action="login.php?referer=index.php" method="post" name="loginbox">
<!-- Start standard table -->
<table align="center" width="600" cellspacing="1" cellpadding="0" class="maintable">
        <tr>
                <td class="tableh1" colspan="2">Enter your username and password to login</td>
        </tr>
                 
                 
                  <tr>
                        <td class="tableb" width="40%">Username</td>

                        <td class="tableb" width="60%"><input type="text" class="textinput" name="username" style="width: 100%" tabindex="1" /></td>
                  </tr>
                  <tr>
                          <td class="tableb">Password</td>
                        <td class="tableb"><input type="password" class="textinput" name="password" style="width: 100%" tabindex="2" /></td>
                  </tr>
                  <tr>
                    <td colspan="2" align="center" class="tableb">Remember me <input name="remember_me" type="checkbox" class="checkbox" value="1" tabindex="3" /></td>

                  </tr>
                  <tr>
                    <td align="center" class="tablef"><a href="forgot_passwd.php" class="topmenu">I forgot my password</a></td>
                    <td align="left" class="tablef"><input name="submitted" type="submit" class="button" value="Login" tabindex="4" /></td>
                  </tr>
</table>
<!-- End standard table -->

</form>

The above code isn't modified part... this is the one that login form uses within coppermine gallery itself..^


here is what I did to include it into my main site;

<form action="[folder you installed coppermine to goes here]/login.php?referer=index.php" method="post" name="loginbox"><input type="text" class="textinput" name="username" size="13" />
  <input type="password" class="textinput" name="password" size="13" />
  <input name="submitted" type="submit" class="button" value="Login" />
            </center></td>
</form>

You can add or modify it as you see fit, I've yet to find out how captcha works, once I find that out I may try to implement it as well...
Then find a way to output if you are logged in already or not on the main site...
Logged

chris.h

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 38
    • Zookx Design
Re: (Simple) How to integrate login form into your website using only forms
« Reply #1 on: September 05, 2007, 01:32:31 pm »

Works a treat!

Many thnakd for this, was searching for anoter problem but this was something I wanted to do also.

Did notice theres some code form a table in the script that most people might not need, I think it should read...

Code: [Select]
<form action="login.php?referer=index.php" method="post" name="loginbox"><input type="text" class="textinput" name="username" size="13" />
  <input type="password" class="textinput" name="password" size="13" />
  <input name="submitted" type="submit" class="button" value="Login" />           
</form>

Thanks
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: (Simple) How to integrate login form into your website using only forms
« Reply #2 on: September 05, 2007, 01:58:26 pm »

1) Not related to bridging
2) How to come up with a custom login form on non-coppermine-driven pages has been discussed many times over
3) Main drawback: the login form will display even if the user is already logged in. Not recommended.

Moving from bridging sub-board.
Logged

chris.h

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 38
    • Zookx Design
Re: (Simple) How to integrate login form into your website using only forms
« Reply #3 on: September 27, 2007, 11:58:12 am »

After installing this I found this thread, which offed a much better solution for myself...

http://forum.coppermine-gallery.net/index.php?topic=37311.0

 ;D
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.