Zubrag.com
October 21, 2018, 07:43:41 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: add a banner to the password_protect.php  (Read 3301 times)
thorax
Newbie
*
Posts: 1


« on: April 16, 2011, 07:01:10 AM »

I want to add my banner to the password_protect.php file. So when someone goes to login, my banner will be in the login form.
What I have done so far is to copy and paste the password_protect.php code into my site template and resave it as password_protect.php. But i get the "can not modify header error".

Is it possible to add my banner to the password_protect.php file?

Logged
EddieStevens
Newbie
*
Posts: 2


« Reply #1 on: April 18, 2011, 01:07:51 AM »

The password protect code must proceed everything else on the page. It must be encountered before the header is written since a header cannot be changed once written. The password protect script alters the header, so if you have already written a header, it will not work. Instead of putting the password protect script into your site template, try incorporating a modified version of your site template into the password protect script. Despite what it says, you can actually modify the code in the section labeled (do not change code below.) You can put whatever you want between the <HTML> and </HTML> tags including page banners, references to CSS pages, etc. Just make sure to include the key functional elements of that section which would be the META tags, the form-related lines, and the PHP code. Here are two sites that I have posted that display the Password Protect Login Page using the existing site template. The first is a demo site, so you can download the code that I used. Just click on EDIT at the bottom of the page to see how the Password Protect Prompt is displayed using the same website framework as the rest of the site.
Demo URL: http://www.iwonderifthiswillwork.com/cms-demo
Working Example URL: http://aprs.ohioares10.org
Logged
Pages: [1]
  Print  
 
Jump to:  

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