baadayakazi
asked on
Show Joomla Login Module on Restricted Pages Instead of Error Message
I'm running Joomla on my server and I want for people to have to login in when the reach a restricted page. I only want to show the login module on the restricted pages. I also don't want it to throw up the "you are not authorized" words. I'd rather put in my own instructions telling them to register and/or login.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry, that should have said you can get *JACL* here.
ASKER
I just looked at this component and since it requires major hacking of the core Joomla files (according to the download agreement), I'd rather not take my chances.
Is there something I can do to change the way the current installation responds to users who are not logged in? Instead of showing text that says to log in, it show a module...the login one.
Is there something I can do to change the way the current installation responds to users who are not logged in? Instead of showing text that says to log in, it show a module...the login one.
Not without hacking the core Joomla files!
ASKER
I don't mind going in and altering a few lines of code in the core Joomla files, especially since I can easily make backups. I'm just afraid of installing a component that will alter a bunch of files automatically that I may have to go track down if/when there's a problem. It's about control ;)
I had to do this too for Joomla 1.5 - I wrote my own template and component which basically centered around these lines of code:
if ( $user->guest) {
include('div-login-require d.php');
} else {
include('div-contentarea.p hp');
} ?>
The contentarea is the usual content that you'd see.
if ( $user->guest) {
include('div-login-require
} else {
include('div-contentarea.p
} ?>
The contentarea is the usual content that you'd see.