mariovaldez.net
http://www.mariovaldez.net/webapps/forums/

Existing PHP pages
http://www.mariovaldez.net/webapps/forums/viewtopic.php?f=11&t=172
Page 1 of 1

Author:  Guest [ 22 Dec 2004, 13:33 ]
Post subject:  Existing PHP pages

Hi,

I am looking forward to trying your script. My site is currently in php using common a header and footer. How does this change the setup instructions? I am just a little confused on how it all comes together.

Please note I am using a content management system that uses php and mysql (to store the data). So the index.php gets referenced all the time, as well as other php files that our part of modules ie faq.php etc.

When it comes to hacking scripts I know very little.

Any help/pointers would be great.

Here is my site if it helps http://panyshrm.org

I am looking to use the script for access to the members only site.

Thanks
Mark W

Author:  Guest [ 22 Dec 2004, 21:01 ]
Post subject: 

ok, great script.

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. Here is the situation.

maindir/ is my index.php file and other login scripts
maindir/themes/red_black/ is where my header and footer files are located.

how could i mod the script to make the header/footer work?

Any help would be greatly appriciated.

Thanks
Mark W

Author:  mvaldez [ 24 Dec 2004, 19:43 ]
Post subject:  Testing with dB Masters Content Manager...

Mark:

> ...I am using a content management system that uses php and mysql
> (to store the data). So the index.php gets referenced all the time,
> as well as other php files that our part of modules ie faq.php etc.
> ...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. Here is the situation.
> maindir/ is my index.php file and other login scripts
> maindir/themes/red_black/ is where my header and footer
> files are located. how could i mod the script to make the
> header/footer work?


I'll test the dbmasters content manager to give you a proper answer. :)


Regards,

Mario A. Valdez-Ramírez.

Author:  Guest [ 24 Dec 2004, 22:49 ]
Post subject:  Thanks

Thanks,

I am looking foward to it.

If you have a chance or interest check out db masters form mailer.

It is pretty slick.

Merry Christmas
Mark W.

Author:  mvaldez [ 25 Dec 2004, 12:28 ]
Post subject:  dbmasters content manager and SiTeFiLo integration...

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.

Author:  Guest [ 25 Dec 2004, 23:12 ]
Post subject:  Thank You.

Mario,

thank you!!! I will look forward to test this in the am.

I will keep you posted on this.

Yes, dBmasters is working on a all new CMS that will have member log in feature with optional password procted pages and an ingergrated message board.

His CMS is prettly neat. Great for the end user.



Thanks
Mark

Author:  Guest [ 26 Dec 2004, 08:46 ]
Post subject:  Works great

Mario,

Thank you. I works great. It intergrated very well. Just a note ... it appears I will need to add the login code to each module page.

Check out http://www.wasiewicz.com click on the photo gallery. You just enter.

I will keep you posted.

Thanks
Mark

Author:  Guest [ 26 Dec 2004, 08:53 ]
Post subject:  yep

Mario,

Yes, I put the code you gave me for the index file and pub it in the gallery.php file it worked perfect.

Thank you.

Mark

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/