Zubrag.com
June 27, 2017, 02:49:28 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: inserting into my webpage design  (Read 60219 times)
asirish
Newbie
*
Posts: 4


« on: February 07, 2007, 11:59:43 AM »

is it possible to insert the password request page into my web page template? When i try to do this none of my images show up. my page is in html format, does this have something to do with it? thanks for your help.

Logged
zubrag
Administrator
Hero Member
*****
Posts: 785


WWW
« Reply #1 on: February 07, 2007, 12:14:20 PM »

Yes, it is possible.

Look how password protector was implemented into site design:
Design Brand  - Product Design Consultancy in Wellington, New Zealand
Lives for Sale


Login form in the password_protect.php is:

Code:
<html>
<head>
  <title>Please enter password to access this page</title>
  <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
  <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
</head>
<body>
  <style>
    input { border: 1px solid black; }
  </style>
  <form method="post">
    <h3>Please enter password to access this page</h3>
    <font color="red"><?php echo $error_msg?></font><br />
<?php if (USE_USERNAME) echo 'Login:<br /><input type="input" name="access_login" /><br />Password:<br />'?>
    <input type="password" name="access_password" /><p></p><input type="submit" name="Submit" value="Submit" />
  </form>
  <br />
  <a style="font-size:9px" href="http://www.zubrag.com/scripts/password-protect.php" title="Download Webpage Password Protect">Powered by Password Protect</a>
</body>
</html>


Instead of above code insert your custom html code, and insert following in the place where you want login form:

Code:
  <style>
    input { border: 1px solid black; }
  </style>
  <form method="post">
    <h3>Please enter password to access this page</h3>
    <font color="red"><?php echo $error_msg?></font><br />
<?php if (USE_USERNAME) echo 'Login:<br /><input type="input" name="access_login" /><br />Password:<br />'?>
    <input type="password" name="access_password" /><p></p><input type="submit" name="Submit" value="Submit" />
  </form>
  <br />
  <a style="font-size:9px" href="http://www.zubrag.com/scripts/password-protect.php" title="Download Webpage Password Protect">Powered by Password Protect</a>

also insert following code somewhere between <head> and </head> tags:
Code:
  <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
  <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">


You may also need to add following tag if you have relative paths for images or urls in html code.
Code:
<BASE href="http://www.site-name-here.com/">
Logged
asirish
Newbie
*
Posts: 4


« Reply #2 on: February 07, 2007, 06:28:50 PM »

thank you so much...this is REALLY GREAT!!!!

Logged
Vikestart
Newbie
*
Posts: 4


« Reply #3 on: November 24, 2007, 01:49:11 PM »

Okey, I have seen tha the login form has comed, but how to add users with the passwords. And is it possible that the visitors can register without that the WebMaster have to write it up. When they register, the account comes auto...
Logged
zubrag
Administrator
Hero Member
*****
Posts: 785


WWW
« Reply #4 on: November 26, 2007, 04:59:09 AM »

If you want user sign up then use advanced password protect instead of this simple one.
Logged
themikeyd
Newbie
*
Posts: 1


« Reply #5 on: December 15, 2007, 05:23:19 PM »

Hi guys,
Awesome script, been using it for ages and passed it to many other (brown nose etc)

I saw this thread and had ago but can't get it to work.I have an home page with the sign up form on, but when I click on the protected page it still asks me for the user name and password from the original form. I have probably messed up or misinterpreted ur instructions, but I would love some advise.

Mike
Logged
okay
Newbie
*
Posts: 1


« Reply #6 on: January 27, 2008, 02:51:57 PM »

I'm trying to understand the example above for integrating the form into my web page but it doesn't make sense to me?? I've tried many different ways to get it to work but nothing seems to do it.

I have the (or want) the login form in my header. I have an includes calling the header into my pages.

Anyone who got it to work this way care to explain?


tnx
Logged
julianrob77
Newbie
*
Posts: 3


« Reply #7 on: February 01, 2008, 04:01:32 AM »

hi guys

got all this working nicely as well but there is one thing missing.

ive integrated the login using iframe (i found its easier to control it that way) but all i want is a new window to open onsubmit of the login. thus far ive tried using java and HTML commands in the script at that point, and no new window opens with my members page. bit of a puzzle

if you can help that would be great. otherwise i will re-program the site as you have suggested and get rid of iframe, its just nice to have it there- on my old site, this means that the members area is integrated into the site the way we wanted, but now im after something different.

J
Logged
dsimk2002
Newbie
*
Posts: 1


« Reply #8 on: October 17, 2008, 02:57:59 PM »

Use <form method="post" target="_new">.....</form>
Logged
andrewr
Newbie
*
Posts: 1


« Reply #9 on: May 13, 2010, 08:22:14 PM »

Has anyone else had formatting issues with internet explorer?  All other browsers look okay. 

I can't seem to figure out what is going on, it seems like there is an additional border around each of my graphics that I am unable to remove.  Also my centering div using margin-left: auto; margin-right: auto; isn't working.

Any help would be greatly appreciated.

here is the example page, it displays correctly in every browser except IE:

http://www.greatroofingcentral.com/test.php
Logged
camado
Newbie
*
Posts: 2


« Reply #10 on: June 18, 2010, 03:35:08 PM »

I got this to work by inserting the html from my login page into the password_protect.php file and using an external style sheet. My login page is very simple and has very little html. What is the recommended solution for a complex page with a login? Is there a way to call the password_protect file from the homepage so that I can insert the login form into my webpage?

An earlier post had mentioned having a login in the header of his page. Was a solution found for this?
Logged
mnkhaki
Newbie
*
Posts: 1


« Reply #11 on: December 21, 2011, 12:28:10 AM »

Hi Zubrag

I need to insert the form into the website I am creating - however, if I place the code you mention, where do I call the secure page or have it directed to the secure page(s)?

Thank you!

mnkhaki
Logged
zubrag
Administrator
Hero Member
*****
Posts: 785


WWW
« Reply #12 on: December 28, 2011, 04:08:44 AM »

You don't have to call or redirect to secure page. The only thing you do is add protection line of code (the one you'll get when open script with help parameter, like password_protect.php?help=1) to all pages you'd like to protect.

When a user opens your protected page in a browser, the first thing it does is verifying login/password (because your protected page has protection code added at the top). At this point it either shows login form (if not logged in), or gives control back to your page (if already logged in).

So every page you'd like to be protected must have protection code at the top, and password_protect.php will either show your page or login form.
Logged
wedesignstudio
Newbie
*
Posts: 1


« Reply #13 on: May 11, 2012, 02:57:59 PM »

Zubrag,

Thanks you for the great script.

My question is does the above integration apply to the advanced script. I have set up the advanced the same way on my index page, when logged in with the user/password I am directed to a blank page, still on the index.

If I set an "action=" to the secured page, if the user clicks the submit button with blank user/pw it forwards to login.php. I would like to remain at the index page. If the user/pw are filled correctly it forwards to the secure page.

Could you let me know if I am missing something, let me know if you need more info... thanks
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC