Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2010-09-11
6
Medium Priority
?
257 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 664 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Accepted Solution

by:
slatton earned 668 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 14

Assisted Solution

by:Allan Nisbet
Allan Nisbet earned 668 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

597 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