How to add a login box on your site

So what happens if you want your clients to be able to login to see their proofs directly from your home page?  It's actually pretty easy with just a little bit of HTML.

All we need to do is create an HTML form and point it towards the login script.  The login script lives in the /user/ folder under where you installed ProofBuddy and is called user-script-login.php.  Assuming you installed ProofBuddy in the /proofs/ folder under your web root you'll insert HTML like this into your page to create the form. 

<form action="/proofs/user/user-script-login.php" method="post">
<input type="text" name="passcode"> <input type="submit" value="Login">
</form> 

And that's it.  The form should show up and allow your users to login.

Questions?  That's why the comment fields are here.

10 comments on this post

  1. Is there a way to center this? I can't figure out what code to use. Thanks!

  2. Judy - Probably the easiest way would be to wrap it in a div. Something like...

    <div style="margin:auto;text-align:center;">....the code from up above...<div>

    I haven't tested this to make sure it would work, but it should.

  3. Can you have both the passcode and username and password with a form like this. I'm not sure how I would login to add stuff with out both on the page. plus others who might make a user name. Thanks Misty.

  4. Misty - This is more for when you have a page on your primary site and want it to login to your ProofBuddy site. For example, you could use this code to make a passcode login form on your home page. If you go to yoursite.com/proofs/ without being logged in you'd still get the ProofBuddy login page.

  5. Does anyone know if this will work with Flash Pallet templates?

  6. Jessica - The site you linked to is your FlashPallette site, correct? It looks like you should be able to get it working. Open up your main.html file and look for <div id="flashcontent">. Add the code in the gray box above right before the <div id="flashcontent"> and it should work. Not 100% sure though since I've never tried it, so be sure to copy a backup of main.html somewhere just in case.

  7. I'm trying to add it to my website. I got into user file but user-script-login.php says unable to read file. File not supported.
    It says its a Broderbund Quick program?
    -Regina

  8. Ok I was trying it wrong. I now tried it on my website page (under proof tab)the same way I add my other scripts and its not showing up at all. What am I doing? Or NOT doing?

  9. You don't need to edit the user-script-login.php file. It's the primary file for your site, usually index.htm or index.html in your web root.

    And I've never been able to get the script to work from within a Flash page like it sounds like you're trying. My assumption is that Flash doesn't allow normal HTML, or at least doesn't allow every part of HTML.

  10. For some reason this particular page seems to be getting more by spammers than any other page on our site. So I'm going to close off comments on it. If you have a question, head over to the forum by clicking on the link on the top right of the page.