Mark:
Hi again. I've tested the the dbmasters content manager. I found an easy way to make it work with your header and footer.
> ...I tested it out on another test site that uses the same
> content manager. and it worked great. Thank YOU! The only problem
> I have is the header and footer. I can not seem to use my existing
> header and footer file with the script...
In your index.php file do the following changes:
Before the line
Code:
ob_start("ob_gzhandler");
Put this code
Code:
session_start();
$slogin_noauthpage = 0;
$slogin_pagetitle = "Page title";
$slogin_path = "./";
include_once ($slogin_path . "/slogin_lib.inc.php");
Before this line almost at the end of the index.php file
Code:
include("themes/".$theme."/footer.php");
Put this line
Code:
echo "<p>To logout <a href=\"index.php?logout=1\">click here</a>.</p>";
Those changes will do the authentication stuff. The slogin_lib.inc.php script will try to include the header.inc.php and footer.inc.php files when displaying the login form. We cannot just include directly the header and footer of dbmasters CM (because it contain some SQL statements that require setting up the connection). So we will modify our header and footer files to do all that SQL stuff and then call the proper header/footer of dbmasters CM.
So, edit our header.inc.php file. It should contain the following:
Code:
<?php
include("config.php");
MySQLConnect($ConnError_Email,$ConnError_Browser);
error_reporting(0);
include("themes/".$theme."/header.php");
?>
Now, edit our footer.inc.php:
Code:
<?php
include("themes/".$theme."/footer.php");
include("agent_inc.php");
ob_end_flush();
?>
That's it. Test it.
As you can see, we didn't included our header/footer in index.php because that is the job of the dbmasters CM code.
Also note that this will secure all the site.
I'm glad it is useful to you. Just keep in mind the following: I think using ths SiTeFiLo script is not the best way to secure a dbmasters CM site. You should ask the authors if there are plans to develop a securing mechanism for the CMS. Please note that the SiTeFiLo script is designed for small sites, it will not scale well if you have lot of users.
> If you have a chance or interest check out
> db masters form mailer. It is pretty slick.
I'll do it.
> Merry Christmas Mark W.
Thanks. Merry Christmas too.
Regards,
Mario A. Valdez-Ramirez.