FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Suggestions » Login return to the page you were on..
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Login return to the page you were on.. [message #646] Thu, 21 February 2002 00:09 Go to next message
seang is currently offline  seang   Australia
Messages: 5
Registered: February 2002
Location: Australia
Karma: 0
Junior Member
Hi there,

I think this would be a nice feature....

(Sorry about my messy code...but I am sure you will get the Idea)

On the page you detect the incorrect login:
$url = sprintf("%s%s%s","http://",$HTTP_HOST,$SCRIPT_NAME);
if !logged in then forward them to the login and send the url where you were at and and imporant info.

echo "<html><head><meta http-equiv=\"Refresh\" content=\"0; URL=".$root_dir."login.php?url=".$url.$query_string1."\ "><script language=\"JavaScript\">\n<!-- setTimeout(\"window.location = unescape('".$root_dir."login.php?url=".$url.$query_string1.& quot;')\",2000);\n //-->\n</script>\n</head>";

Header alway screw up for me incertain instances....and the meta redirect has trouble with one of the Opera browsers.

When you are at the login, set the default page if empty..

if (!($url_send) or ($url_send == "http://www.webdesigners.net.au/login.php")) {$url_send = $root_dir."community.php";}

In the login form have the old url and any important info:
<input name="url_send" type="hidden" value="<? echo $url ?>">
<? echo $query_form ?>

Then when every thing is ok again send them back
echo "<meta http-equiv=\"Refresh\" content=\"0;url=".$url_send."?".$query_string1."\& quot;><script language=\"JavaScript\">\n<!--\n setTimeout(\"window.location = unescape('".$url_send."?".$query_string1."')\",200 0);\n //-->\n</script>\n</head>";

Hope this is useful

Regards

Sean

Re: Login return to the page you were on.. [message #655 is a reply to message #646] Thu, 21 February 2002 15:13 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Good idea, we already have a built in refering url tracking, I'll see what needs to be done to allow the forum to redirect the person from the login form to the page they came from.

I suspect it will be working in latest CVS sometime tonight.


FUDforum Core Developer
Re: Login return to the page you were on.. [message #664 is a reply to message #646] Thu, 21 February 2002 22:48 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Sean, the feature you were talking about has been implemented in latest CVS.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Multi-linual input
Next Topic: installation suggestion
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Jul 27 03:52:35 GMT 2024

Total time taken to generate the page: 0.02212 seconds