jesseainskeep
09-27-2007, 01:54 PM
I'm having my first experience with iFrames and need some help.
I'm using the Joomla CMS and I created an application outside of Joomla that I want to display within Joomla (If that makes any sense).
The iFrame does work to show the project in Joomla, but I only want users to be able to look at the project through Joomla. To say it another way, I only want users to be able to look at this project through an iFrame. If they try to go straight to the URL, it would display an error message that this is not available.
I put this code at the top of the index file of the project which kind of worked:
if ($_SERVER['HTTP_REFERER'] != 'http://mysite.com/index.php?option=com_wrapper&Itemid=105'){
echo 'You are not authorized to view this directory';
exit();
}
If I view the directory directly (http://www.mysite.com/project) then I get the message. If I view the project through the link on the site, using iFrame, I can see the first page. The problem comes in when I click on a link in the iFrame. It pops this up in a new page, and since it comes from the iFrame instead of the Template, it puts the HTTP_REFERRER as something else, not letting me view the file.
Any ideas?
I'm using the Joomla CMS and I created an application outside of Joomla that I want to display within Joomla (If that makes any sense).
The iFrame does work to show the project in Joomla, but I only want users to be able to look at the project through Joomla. To say it another way, I only want users to be able to look at this project through an iFrame. If they try to go straight to the URL, it would display an error message that this is not available.
I put this code at the top of the index file of the project which kind of worked:
if ($_SERVER['HTTP_REFERER'] != 'http://mysite.com/index.php?option=com_wrapper&Itemid=105'){
echo 'You are not authorized to view this directory';
exit();
}
If I view the directory directly (http://www.mysite.com/project) then I get the message. If I view the project through the link on the site, using iFrame, I can see the first page. The problem comes in when I click on a link in the iFrame. It pops this up in a new page, and since it comes from the iFrame instead of the Template, it puts the HTTP_REFERRER as something else, not letting me view the file.
Any ideas?