want to logout and leave forum with one click [message #8408] |
Mon, 27 January 2003 16:54 |
kowitsch
Messages: 10 Registered: January 2003 Location: Germany
Karma: 0
|
Junior Member |
|
|
Hello FUD community,
I am looking for a way to logout and jump to another page outside the forum with the same click.
I thought I could use the "returnto" variable for that, but for whatever reason it didn't work. Logout works fine by submitting:
&logout=1 in a link in my header-template, but redirecting seems to be ignored:
<a href="{ROOT}?t=login&{DEF: _rsid}&returnto=%2Findex.html&logout=1">leave forum</a>
Do I miss something.
I didn't find explaination on the "returnto" var here at the support forum.
Thank you very much in advance
Kowitsch
|
|
|
|
Re: want to logout and leave forum with one click [message #8413 is a reply to message #8408] |
Mon, 27 January 2003 19:54 |
kowitsch
Messages: 10 Registered: January 2003 Location: Germany
Karma: 0
|
Junior Member |
|
|
Hello Prottoss,
you are super fast in answering - thank you.
I just tried the above at home on my test server (W2K/Apache/PHP/MySQL/Perl). The following line works fine
http://myserver/forum/index.php?t=login&rid=1&S=ffc73dad92d5bb605ba ed62dda4ecaeb&returnto=%2Findex.html%3Ft%3Dindex%26rid%3D%26S%3Dffc73da d92d5bb605baed62dda4ecaeb&logout=1
and calls file /index.html which directs to my apache root as desired.
The "real" web-server is based on Linux/PHP/MySQL/Perl. It correctly logs out, but always returns to the forum/index.php file.
Why could this difference be?
Kind regards
Kowitsch
[Updated on: Mon, 27 January 2003 19:58] Report message to a moderator
|
|
|
Re: want to logout and leave forum with one click [message #8414 is a reply to message #8413] |
Mon, 27 January 2003 20:39 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
The return to code can be found inside
return.inc.t, specifically the check_return() function.
It works by breaking up the passed URL and passing it to index.php which then loads an appropriate page.
In your case the solution is to create a simple PHP script and place it in the forum directory.
That script will redirect the user to any URL you desire and then call exit().
FUDforum Core Developer
|
|
|
|
Re: want to logout and leave forum with one click [message #8423 is a reply to message #8422] |
Tue, 28 January 2003 01:30 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
your PHP script will never be touched unless for some reason a forum script under the same name is created. The modified header.tmpl will also remain untouched unless the source template is modified which very rarely happens.
FUDforum Core Developer
|
|
|