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 :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Login return to the page you were on.. [message #646] Wed, 20 February 2002 19:09 Go to next message
seang is currently offline  seang   Australia
Messages: 5
Registered: February 2002
Location: Australia
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 10: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
add to buddy list
ignore all messages by this user
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 17:48 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Sean, the feature you were talking about has been implemented in latest CVS.

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

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

Current Time: Tue Oct 17 07:35:13 EDT 2017

Total time taken to generate the page: 0.00717 seconds