08-21-2007, 03:39 PM
For those of you looking to add a login / logged in box to the front of your site follow these steps:
1) First your index page needs to be index.php
2) Add to the very top of the index.php file (no blank lines at the top). Make sure the path in the quotes is to the correct installation folder.
1) First your index page needs to be index.php
2) Add to the very top of the index.php file (no blank lines at the top). Make sure the path in the quotes is to the correct installation folder.
Code:
<?php
require_once("install_folder/login_require.php");
?>
3) Add this line where you would like the login box to be displayed. Be sure to again have the correct path to the install folder --> /interface/
Code:
<? include("install_folder/interface/login_box.php") ?>
4) Make a few modifications to the "/interface/login_box.php" file to correctly link the form action to the control_panel.php file & the redirect path:
This includes:
Code:
<form action=\"/install_folder/control_panel.php\" method=\"post\">
&
Code:
<input type=\"hidden\" name=\"redirect\" value=\"/protected_folder/\">
Lastly you can customize the HTML to configure the login box to match your site design.
Note: View Screen Shot Attachment
Thats it!
i2