Evening everyone,
I have a question,
I have a site that is not completely built yet. It is not built in Joomla but will be in the future. There is a folder on the server that contains a Joomla based site however. What I want to happen is there is going to be a php login on the root directory that once you login you are redirected to for example: http://www.mysite.com/joomlasite/ . My question is how can I do this so that if anyone goes to http://www.mysite.com/joomlasite/ they are prompt with you must be logged in and a link back to the login page in the root directory.
I am guessing a session variable to be pushed when redirected to the http://www.mysite.com/joomlasite/ and the template for the Joomla based directory to contain a way to look for this variable and if it exists show the site if not show you must be logged in to view this resource.
Any help would be great.
Thanks,
-Mike
Site under a site
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
Forum rules
Re: Site under a site
Hi,
I presume that your "login script" somehow stores the status of a successful login, either in a cookie, the standard $_SESSION or a database.
You didn't mention what version you use.
The best way to implement this in Joomla! 1.5 would be a system plugin or an authentication plugin. They run first in chain and you could probably just copy the code that validates the login for the "root" into that very plugin. At this stage nothing big has happend yet inside Joomla! and you can happily redirect via PHP header() to that initial login page.
I presume that your "login script" somehow stores the status of a successful login, either in a cookie, the standard $_SESSION or a database.
You didn't mention what version you use.
The best way to implement this in Joomla! 1.5 would be a system plugin or an authentication plugin. They run first in chain and you could probably just copy the code that validates the login for the "root" into that very plugin. At this stage nothing big has happend yet inside Joomla! and you can happily redirect via PHP header() to that initial login page.
You can have programs written fast, well, and cheap, but you only get to pick 2 ...
"I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams
"I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams
Re: Site under a site
Currently, the one that will sit under the http://www.mysite.com/joomlasite/ is setup as 1.0.13. The one that will be in the root will most likely be 1.5. For 1.5 what plugin would you suggest and for the time being with just a standard php database/session what login would you suggest.
Just an FYI,
Database Version: 4.1.22-standard
PHP Version: 4.4.7
Session auto start: OFF (this is for the http://www.mysite.com/joomlasite/)
Session save path: /tmp (this is for the http://www.mysite.com/joomlasite/)
Thanks for the input,
-Mike
Just an FYI,
Database Version: 4.1.22-standard
PHP Version: 4.4.7
Session auto start: OFF (this is for the http://www.mysite.com/joomlasite/)
Session save path: /tmp (this is for the http://www.mysite.com/joomlasite/)
Thanks for the input,
-Mike