Here are step by step instruction on how to modify your default 1.5.9 joomla install to longin members and then send them to the page they requested.
I fumbled through most of it, so the code could probably be improved. If you can improve it, Post it here! Hopefully joomla will incorporate something like this into its default install.
First. Modify the /templates/system/error.php.
Find the line:
and the place the following code after the code above:defined( '_JEXEC' ) or die( 'Restricted access' );
Second. Modify the /components/com_user/views/login/tmpl/default_login.php$ReferTo = $_SERVER['REQUEST_URI'];
$ReferTo = base64_encode($ReferTo);
if ($this->error->code = '403') {
header('Location:index.php?option=com_user&view=login&ReferTo='.$ReferTo); die();
}
Search for:
And replace it with:<input type="hidden" name="return" value="<?php echo $this->return; ?>" />
There you have it. You should be all modified! I have included the 2 files in this message, so you can just overwrite the last ones as well. It might be easier then opening and modifying the code. But beware you are using the same version of joomla. ONLY modify the code yourself if you are using a different version.<input type="hidden" name="return" value="<?php if ($_GET['ReferTo']) echo $_GET['ReferTo']; else echo $this->return; ?>" />
Dr. Sassafras