mariovaldez.net

MV.net forums
It is currently 14 Jul 2016, 00:47

All times are UTC - 7 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: Existing PHP pages
PostPosted: 22 Dec 2004, 13:33 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: 22 Dec 2004, 21:01 
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


Report this post
Top
  
Reply with quote  
PostPosted: 24 Dec 2004, 19:43 
User avatar

Joined: 06 Mar 2003, 03:21
Posts: 447
Location: Monterrey, NL, Mexico
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Thanks
PostPosted: 24 Dec 2004, 22:49 
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.


Report this post
Top
  
Reply with quote  
PostPosted: 25 Dec 2004, 12:28 
User avatar

Joined: 06 Mar 2003, 03:21
Posts: 447
Location: Monterrey, NL, Mexico
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Thank You.
PostPosted: 25 Dec 2004, 23:12 
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


Report this post
Top
  
Reply with quote  
 Post subject: Works great
PostPosted: 26 Dec 2004, 08:46 
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


Report this post
Top
  
Reply with quote  
 Post subject: yep
PostPosted: 26 Dec 2004, 08:53 
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


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group