Need help making custom PHP pages secure under drupal login

mcdonasp - May 9, 2008 - 20:58

I have just been getting involved with php and have been designing pages using dreamweaver. I want to use drupal for most things on my site, but have my own custom php pages I would like included.

This will be a private site as it is intended to provide support for our field technicians. The information is sensitive and I need to have my custom php pages secure through login.

Using dreamweaver and MySQL I know how to use the "restrict access to page" to keep people that are not users from entering the name of the php page in the URL and gaining access.

When I add a link to a drupal page linking it to my custom page, I cannot my custom page secure through the login that drupal secures its basic content in. I want to prevent people from being able to just type the php page name to get access to it.

How do I do this? I have tried the restrict access to page behavior using dreamweaver and it is not picking up the drupal login form as the source to carry out this behavior. Any ideas? I just can't seem to find where to add my pages that make them secure.

=-=

VeryMisunderstood - May 9, 2008 - 21:18

goto administer -> modules
enable the php filter.module

goto create content
add your php code to a page content type
before saving the node, switch to the PHP input format

now your pages will be served by Drupal and the drupal login and role based persmissions will work with your custom pages.

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

Thank you, works great

mcdonasp - May 12, 2008 - 15:40

Thank you very much. That was exactly what I was looking for.

If the whole site is

Rowanw - May 9, 2008 - 23:44

If the whole site is intended to be kept restricted from anonymous users, you can go to User management > Permissions, and disable access to content for anonymous users.

If you only want to make some pages restricted you'll be able to find the appropriate modules at http://drupal.org/project/Modules/category/69 or http://drupal.org/project/Modules/category/74.

--
How to override HTML in Drupal 6

 
 

Drupal is a registered trademark of Dries Buytaert.