Zubrag.com
October 20, 2019, 09:07:39 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]
  Print  
Author Topic: Changin background colour of Password protect  (Read 8412 times)
Ginger
Newbie
*
Posts: 7


« on: May 12, 2008, 11:55:12 PM »

Hello clever people.

How do I change the background colour to black and box+type to white in Password_protect?

Ginger

Logged
PapaBearPW
Newbie
*
Posts: 15


« Reply #1 on: May 13, 2008, 04:33:26 AM »

You should be able to change the look of the login page inside password_protect.php. Just go to the html section in that file. There you should also be able to add in your own css in order to make it have the same look and feel as the rest of your site.

password_protect.php lines 98-119:
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>
  <div style="width:500px; margin-left:auto; margin-right:auto; text-align:center">
  <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; color: #B0B0B0; font-family: Verdana, Arial;" href="http://www.zubrag.com/scripts/password-protect.php" title="Download Password Protector">Powered by Password Protect</a>
  </div>
</body>
</html>

For my purposes I simply added my css file to the head section like so:

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">
  <link rel="stylesheet" href="head/mycss.css">
</head>

If you aren't using an external css file, you can alternatively add the css info like this:

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">
  <style type="text/css">
    body {
      color: #ffffff;
      background-color: #000000;
      font-family: tahoma,helvetica;
    }
  </style>
</head>

I personally prefer to use css, but you could also change the appearance changing the following html attributes:

Code:
<body bgcolor="black">

or

Code:
<body bgcolor="#000000">

Then enter whatever font colors you wish for the text by wrapping the text in font tags like this:

Code:
  <form method="post">
    <h3><font color="#ffffff">Please enter password to access this page</font></h3>
    <font color="red"><?php echo $error_msg?></font><br />
<?php if (USE_USERNAME) echo '<font color="#ffffff">Login:<br /><input type="input" name="access_login" /><br />Password:</font><br />'?>

Good Luck
Logged
Vilice
Newbie
*
Posts: 8


« Reply #2 on: July 14, 2008, 11:20:22 PM »

Many thanks .It's so kind of you  Tongue
Logged

Hostmonster special promo Discount link $4.95/mth - Unlimited storage space, unlimited bandwidth transfer
http://hostmonster.co.in
Sky
Newbie
*
Posts: 2


« Reply #3 on: May 31, 2009, 06:48:22 AM »

thank you very much Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

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