collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 388
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

Author Topic: Redirecting user to the previous/last visited page url after login  (Read 8735 times)

0 Members and 1 Guest are viewing this topic.

Offline ROZA

  • Semi Newbie
  • *
  • Posts: 7
  • SMF Version: None
  • SP Version: 2.3.6
I asked this on smf community but they told me should ask it here!
 After users login to my site successfully(whatever way they choose/forced to login, including using original Login form from menu or filling the quick Login box on top of every pages etc) , I want to redirect them to their previous viewed page where they logged in from instead of homepage or board index.In this case the simple machines site itself has this feature I'm looking for. I use smf 2.0.11 and simple portal 2.3.6 and several other mods.
Thanks in advance for your comments and sorry for my poor English!

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Redirecting user to the previous/last visited page url after login
« Reply #1 on: October 26, 2015, 05:34:26 PM »
ROZA,

Please check "Administration Center" - "SimplePortal" - "Configuration" - "General Settings" - "Disable Portal Redirection"

Regards
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline ROZA

  • Semi Newbie
  • *
  • Posts: 7
  • SMF Version: None
  • SP Version: 2.3.6
Re: Redirecting user to the previous/last visited page url after login
« Reply #2 on: October 27, 2015, 01:38:02 PM »
Dear Ninja, That setting just determines which one of these two pages(portal homepage or forum index)will be shown to users after they login not the page they visited before login.
Quote
Consider a situation where user access a specific page which requires login to proceed. If the user is currently not logged in he will be redirected to the login page. Once user logs in successfully with valid credentials, web site redirects a user to one of those mentioned pages. User has to go through a menu or search in order to go to the page where he was trying to access before login. This is not user friendly since user wants to automatically redirect to the page he was trying to access before login.

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Redirecting user to the previous/last visited page url after login
« Reply #3 on: October 27, 2015, 06:07:35 PM »
Well, automatic redirect to the last seen page is a standard SMF feature and the only way SimplePortal can alter it is the one I mentioned. I just tried what you quoted and works perfectly fine on my forum, it redirects to the previously visited page (my case, an hidden section), not on Board Index.

So to summarize:
1) This is actually a typo within the Help text of that checkbox, because it switches between redirecting on portal and no redirect, which is totally different from what it claims to be doing.
2) Your issue is not within SimplePortal if that box is already checked, if it isn't... Check it.

I am currently investigating further about that checkbox. Thanks for your report and sorry for the inconvenience.
EDIT: My thesis is that I when you go to the Login area then it goes to BoardIndex or Portal, and always on Portal if it's unchecked. However, the description is still wrong and needs to be fixed.

Best regards
« Last Edit: October 27, 2015, 06:10:52 PM by ♦ Ninja ZX-10RR ♦ »
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Redirecting user to the previous/last visited page url after login
« Reply #4 on: October 27, 2015, 06:28:39 PM »
Hello,

The reason for this behavior is because custom pages do not have login_url set.

You can do change this behavior by opening /Sources/PortalPages.php

Find:
Code: [Select]
$page_id = !empty($_REQUEST['page']) ? $_REQUEST['page'] : 0;
Replace with:
Code: [Select]
$page_id = !empty($_REQUEST['page']) ? $_REQUEST['page'] : 0;

$_SESSION['login_url'] = $scripturl . '?page=' . $page_id;

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Redirecting user to the previous/last visited page url after login
« Reply #5 on: October 27, 2015, 06:31:20 PM »
Further investigation (with Sayaka) showed that it's actually a little bug with pages, and only happens with ***SimplePortal custom pages*** (to make it clear). If you login from any custom page it will always redirect to BoardIndex or Portal no matter what you do, I will add this to the bug tracker for the following version.
EDIT: added to the bug tracker.

And thanks Sayaka for the fix ;)
« Last Edit: October 27, 2015, 07:00:01 PM by ♦ Ninja ZX-10RR ♦ »
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline ROZA

  • Semi Newbie
  • *
  • Posts: 7
  • SMF Version: None
  • SP Version: 2.3.6
Re: Redirecting user to the previous/last visited page url after login
« Reply #6 on: October 28, 2015, 03:35:53 AM »
Thank you very much for your replays Ninja and Sayaka,
 I did check the disable redirect setting and also I changed the code you mentioned in PortalPages.php but still the problem persists. For me It does not happen only with  SimplePortal custom pages But for all pages/posts/topics. actually I do not have any custom page yet. I tried different ways to log in, but always be referred to the forum index. When you Ninja are saying:
Quote
I just tried what you quoted and works perfectly fine on my forum, it redirects to the previously visited page (my case, an hidden section), not on Board Index.
So IMO It means that maybe this issue just exists on my forum.But why? How do I figure out where the problem has arisen? Please if you know something about it, do not hesitate to tell. I would be grateful.

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Redirecting user to the previous/last visited page url after login
« Reply #7 on: October 28, 2015, 12:12:06 PM »
Hmm, please provide your mod list, I have around 140 of them and it's not happening, so I should be able to give you some hints about it.

Regards
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline ROZA

  • Semi Newbie
  • *
  • Posts: 7
  • SMF Version: None
  • SP Version: 2.3.6
Re: Redirecting user to the previous/last visited page url after login
« Reply #8 on: October 29, 2015, 03:44:21 AM »
Thanks for your support. The list of my installed mods:

1.   Similar Topics   0.6   
2.   Custom Action Mod   3.2   
3.   Custom Copyright   1.0.4   
4.   SMF 2.0.11 Update   1.0   
5.   MDLT: Manage Default Linktree   1.2   
6.   Pretty URLs   1.1.2   
7.   SA Chat   1.0a Rev120   
8.   Default Avatar   2.3   
9.   Like Posts   2.0.5   
10.   Board Icons   1.0   
11.   Responsive Curve   1.0 Beta 5   
12.   httpBL   2.5.1   
13.   SimplePortal   2.3.6


And also I have these mods uploaded:

1.   Site Integration Mod   1.41   
2.   Menu Editor Lite   1.0.5   
3.   SMF Articles   3.0.2   
4.   SA KB   1.2   
5.   Stop Spammer   2.3.9   
6.   Simple ImgBR Upload Image in CSS - upload by URL   1.0   
7.   SMF Links   3.0.5   
8.   Downloads System   2.5   
9.   Breeze   1.0.8   
10.   Forum Firewall   2.0.0   
11.   Bakers Dozen Pages   1.2   


In addition, the language of my website is right to left if that matters.
« Last Edit: October 30, 2015, 09:27:11 AM by ROZA »

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Redirecting user to the previous/last visited page url after login
« Reply #9 on: October 29, 2015, 04:55:15 PM »
Oh, PrettyURLs. With all due respect to its developers it's one of the worst mods around, it is known to cause a *lot* of problems (without being useful either - ref: http://www.simplemachines.org/community/index.php?topic=427913.10) and most likely this one as well because I have all of your other mods installed, excluding the linktree (I personally recoded that entirely to make it responsive) and also SAChat which has been banned by my host because a bug in it was causing *major* server overloadings.

Sorry if this was not exactly what you wanted to read, but I'd rather be frank about it than throwing some excuses :/

Disclaimer: in no way I (nor SP team) am attacking Pretty URLs developers, I am just basing myself on facts, sadly.

Regards
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline ROZA

  • Semi Newbie
  • *
  • Posts: 7
  • SMF Version: None
  • SP Version: 2.3.6
Re: Redirecting user to the previous/last visited page url after login
« Reply #10 on: October 30, 2015, 05:19:36 AM »
Well, actually that was what I wanted to read! I uninstalled PrettyURLs and also SAChat(I don't know why but nobody was using this one on my forum!)   and yes! the problem has been solved and now smf redirect me to the my last visited page after login!
 Thank you Ninja ZX-10RR I really appreciate your help.

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Redirecting user to the previous/last visited page url after login
« Reply #11 on: October 30, 2015, 07:45:41 AM »
Glad you got it fixed, I am marking the topic as solved seeing your reply, in case you have further problems feel free to mark it as unsolved by clicking the relative button ;)

And... You're welcome. I said that because usually people that have it installed tend to stick a lot to PrettyURLs mod, but apparently you are an exception to that ;D
All in all awesome topic, the problem got fixed and we found something that can be improved as well, very nice.

Best regards
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis