Solved

How to keep custom php pages that are outside the template unviewable until logged in?

Posted on 2010-09-11
6
254 Views
Last Modified: 2012-05-10
I have a couple of custom pages in PHP outside of the template. Is there a folder in Joomla that I can put them in so that they cannot be viewed unless a user is logged on to the site? Or something to that effect?

Thank you in advance.
0
Comment
Question by:colonelblue
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 12

Expert Comment

by:Panagiotis S
ID: 33652376
you can create a folder anywhere to your joomla installation
0
 
LVL 4

Assisted Solution

by:Joomstrup
Joomstrup earned 166 total points
ID: 33652562
Joomla! cannot govern access to external php files no matter where you put them in your Joomla! folder structure. To use Joomla! for access control you need to turn your php files into either a component or a module. Whether it should be a component or a module depends on the functionality of your files.

As an easy start you can take one of the modules that allows inclusion of php or plug ins like JIncluder or DirectPHP, add your code there and see if that works. You can find the extensions at the JED (http://extensions.joomla.org)
0
 
LVL 12

Expert Comment

by:Panagiotis S
ID: 33652697
you can use joomi
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 1

Accepted Solution

by:
slatton earned 167 total points
ID: 33656570
Change the permissions to the individual pages and documents that are outside of the Joomla management system by going into Dreamweaver and:
  1. Select your website ("Remote View")
  2. Right click the document that you want to limit view of
  3. "Set Permissions..."
  4. Type in 700, 600, or 200
  5. Save
0
 
LVL 13

Assisted Solution

by:StormITSolutions
StormITSolutions earned 167 total points
ID: 33656643
Alternatively

You could create articles which are viewed only by logged in users

then use the inbuilt {loadposition  x} code within your article
this enables modules to be included within articles

YOu can enable this via the plugin admin in the backend

NExt copy your php files directly into a custom code module
allowing you to run the php directly from a module

Then assign the module to position X within your article

Then you can have php scripts with the joomla registration in effect so external non logged in users cant see them or view them

Storm
0
 

Author Comment

by:colonelblue
ID: 33657725
Thank you.
Hey guys, I went into my web host files manager.
Made a folder.
Gave it a 700 permissions.


Now when you try to access any files in that folder you get a:
403 Permission Denied

But the pages work as include in Joomla when the user is logged on.
This should be secure enough right?
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question