After some offlist discussion, bringing this back onlist.
> > >> > >> >> >> > The problem that I neglected to mention is that the
> > >> plugin fires
> > >> > >> >> on a
> > >> > >> >> >> > hook in the login page, so you get an endless loop. It was
> > >> > >> >> originally
> > >> > >> >> >> > intended to point the browser to a custom page without that
> > >> > >> hook in
> > >> > >> >> >> > it. I have now changed the plugin so that it will NOT
> > >> redirect
> > >> > >> >> if the
> > >> > >> >> >> > target URI is the same as the current one. Sending
> > >> offlist.
> > > Wait, you mean on the error page? The point is supposed to be that it
> > > is fixed on the login page instead. Do you lose too much context in
> > > the error page uri ?
> > I think your plugin should overrule the sqm_baseuri function that is
> > defined in strings.php. I think that that is the only way to get the URL
> > right on every location that it is used. Something like sqm_baseuri =
> > custom_login_URI
>
> There is no hook there, and I don't think any need to do that. It's
> definitely not related to the job of this plugin. Instead, as I
> mentioned in my last email, try setting "base_uri" in vlogin *instead*
> of the custom login URI. If that does not work, it also might be very
> possible to get it to work by setting "config_location_base" in
> vlogin.
>
> Oh, wait, I just looked at 1.4.8 and it's not got the flexibility that
> 1.5.2 does. Ugh. Try setting "base_uri" in vlogin (you are using
> $useSessionBased in vlogin, right?), and if that doesn't work, we will
> have to hack the source for you.
Without feedback from Jan yet, my tentative tests showed that this
will not work (using vlogin to override "base_uri"). Instead, I have
proposed a slight change to the logout_error hook for the STABLE
stream, which should be applied as follows:
diff -u -r1.57.2.22 display_messages.php
--- functions/display_messages.php 14 May 2006 17:45:29 -0000
1.57.2.22
+++ functions/display_messages.php 27 Oct 2006 04:09:02 -0000
@@ -71,7 +71,10 @@
$color[8] = '#000000'; /* black Normal text */
}
- list($junk, $errString, $errTitle) = do_hook('logout_error',
$errString, $errTitle);
+ $logout_link = $base_uri . 'src/login.php';
+
+ list($junk, $errString, $errTitle, $logout_link)
+ = do_hook('logout_error', $errString, $errTitle, $logout_link);
if ( $errTitle == '' ) {
$errTitle = $errString;
@@ -99,7 +102,7 @@
'<tr><td align="center">' . $errString . '</td></tr>'.
'<tr><td bgcolor="'.$color[0].'" align="center">'.
'<font color="'.$color[2].'"><b>'.
- '<a href="'.$base_uri.'src/login.php" target="'.$frame_top.'">'.
+ '<a href="'.$logout_link.'" target="'.$frame_top.'">'.
_("Go to the login page") . '</a></b></font></td></tr>'.
'</table></td></tr></table></center></body></html>';
}
Then use the latest version of login_redirect plugin which I will send
offlist as needed.
- Paul
|