News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Redirect back to page

Started by ~DS~, March 19, 2010, 02:05:13 PM

Previous topic - Next topic

~DS~

Does SMF have a way to redirect user back to page they are before they logout or the log timeout instead of home page. I was writing in the middle of a thread and it log me out asked me to login again because I got timeout and have to re-write the thread. i know there's "Always stay logged in" but it would be great to have the last url in the sessions.
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Kill Em All

It doesn't do that automatically for you? It does on my test install, just doesn't keep the text.

Also if you get that message, just hit the back button, copy your message, then login again if its a problem.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

~DS~

Ugh. I can click back and copy the message that way but it's annoying when it goes to the home index if you are logged out. I tried to log back in it does not go to the last url session.
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Kill Em All

It is working perfectly fine on my test install.

Admin>Config>Cookies and Sessions

If you don't mind, please take a screenshot of that page. or just fill in the info here, such as ticked and unticked :
Cookie Name
• Default login cookies length
• Enable local storage of cookies
• Use subdomain independent cookies
• Use database driven sessions
• Allow browsers to go back to cached pages
• Seconds before an unused session timeout


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

~DS~

"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Arantor

No, there is nowhere in the system for that, on login/logout it always redirects to front page. It's not a huge modification to stuff the URL into the session and reuse it (or shouldn't be) but it's at the cost of filling the DB up.

Kill Em All

Arantor, that isn't true, in SMF 2.0, I am perfectly able to reproduce the redirect to the page I was on before by either going to the login page or just using the login box provided on the top left.

Shadow, your settings look like mine btw.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Arantor

Quote from: Kill Em All on March 19, 2010, 05:47:04 PM
Arantor, that isn't true, in SMF 2.0, I am perfectly able to reproduce the redirect to the page I was on before by either going to the login page or just using the login box provided on the top left.

Logging out will always redirect you back to the front page without fail which is what the OP was talking about. The code used in login/logout is virtually the same and is actually in LogInOut.php.

Kill Em All

Ok, true, when purposely logging out, it will always redirect them to the home page, but if you visit a topic and then login, it will redirect you to that topic automatically. And if you are looking at a topic but your cookie length times out, and you have to log back in again, it will still redirect you to the page you were at before.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Arantor

The OP was discussing logging out, and forced log out does often do the same thing, on an unmodded installation.

Kill Em All

Quote from: Dismal Shadow on March 19, 2010, 02:05:13 PM
I was writing in the middle of a thread and it log me out asked me to login again because I got timeout and have to re-write the thread.
I personally take that as them not logging out by choice. I get the same results on my live site(which is modded) and my test site, which has no mods.

Please let me know if I'm missing something. :(


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Arantor

QuoteDoes SMF have a way to redirect user back to page they are before they logout or the log timeout instead of home page

Same code is used in both places.

~DS~

Quote from: Kill Em All on March 19, 2010, 06:04:28 PM
Quote from: Dismal Shadow on March 19, 2010, 02:05:13 PM
I was writing in the middle of a thread and it log me out asked me to login again because I got timeout and have to re-write the thread.
I personally take that as them not logging out by choice. I get the same results on my live site(which is modded) and my test site, which has no mods.

Please let me know if I'm missing something. :(
Not by choice, no but by "Minutes to stay logged in" and "Always stay logged in:"
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Kill Em All

When I logged into my test forum, set the min to stay logged in for 2 min, went to create a topic, let it time out, it brought me to the login page, I then logged back in and it redirected me to the create a topic page.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Arantor

I just hit this very issue on SimpleDesk. We haven't modified the code at all in question concerning the authentication.

I was mid way through commenting on a bug report, was logged out, when I was logged back in I was on the front page.


It actually depends on where you were as to whether it will log you out or not. Let me guess... the board was visible to guests?

~DS~

Quote from: Kill Em All on March 19, 2010, 07:11:12 PM
When I logged into my test forum, set the min to stay logged in for 2 min, went to create a topic, let it time out, it brought me to the login page, I then logged back in and it redirected me to the create a topic page.
O.O How?
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Kill Em All

#16
Yeah, the board is visible to guests, let me try blocking it.

Shadow, I really don't know, it just has always done that for me.

Edit: I limited the board to just admins, and it still redirects.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Arantor


Kill Em All

FF 3.6
add-ons for FF:
Quote
adblock plus
adobe dlm
bitdefender antiphishing
downloadhelper
firebug
greasemonkey
ms .net framework
skip screen
wot

Also note that I have it clear my cookies, history, etc whenever I close it.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

~DS~

Let's say, I found a interesting thread which is buried in the 8th page of that section, I found something I want to say and quote a post so I login my username and password, it redirect me to the damn front of homepage instead to that thread/page or post that I was about to reply. Only walk around is login then back, back, hit refresh.
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Advertisement: