On the manage redirects page it says to leave blank to redirect to the most recently visited page. For login and registration this does not seem to work, it seems to send you to the homepage.
How can I set it up so that when someone logs in or registers, they are sent back to whatever they were doind before they log in or register?
Tested a login and it sent me back to pgk-desktop/60/wsnlinks/ind...?action=displaycat&catid=4 which is the category I was viewing when I logged in. Tried again from the submit link page and it sent me back to the category instead. So it depends on where you are. Certain locations shouldn't be returned to, like the login page itself. I guess returning to the submit link page was a problem in some way though I can't think of how at the moment. Which pages do you need to return to that aren't currently being returned to?
Problem is, if you leave the redirect for after submitting a listing or rating blank, it's supposed to go to the page you were on before that -- and not to the listing or rating page itself. So if I track those pages in the cookie it breaks things for others. Handling both cases would require a new system that records multiple recent locations and checks the order of progression to make decisions about which to use. Looking into that possibility but I don't know how practical it's going to be how quickly.
Looks like it's requiring a lot of fundamental changes. I don't want to introduce all these new bug possibilities to 5.1 so it'll be in 6.0.
Meanwhile, you could use <?php if (!$_REQUEST['filled'] && (currenturlcontains('suggest.php') || currenturlcontains('vote.php'))) { echo '<input type="hidden" name="returnto" value="{CURRENTURL}">'; } ?> in the the wrapper login form, <?php if (!$_REQUEST['filled'] && $_REQUEST['action'] == 'userlogin' && $_REQUEST['returnto']) { echo '<input type="hidden" name="returnto" value="'.$_REQUEST['returnto'].'">'; } ?> in the login template, and <input type="hidden" name="returnto" value="{CURRENTURL}"> in the submit listing and rating templates to force a return to those locations.
Could be that I'm blind, but I can't find an option for "After a user submits a category, send them to", and right now I am always transferred back to index.php, which is really annoying. The parent category would be a lot more convenient. Maybe you could add that in one of the upcoming versions?!?
Comments on Redirects
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
On the manage redirects page it says to leave blank to redirect to the most recently visited page. For login and registration this does not seem to work, it seems to send you to the homepage.
How can I set it up so that when someone logs in or registers, they are sent back to whatever they were doind before they log in or register?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Tested a login and it sent me back to pgk-desktop/60/wsnlinks/ind...?action=displaycat&catid=4 which is the category I was viewing when I logged in. Tried again from the submit link page and it sent me back to the category instead. So it depends on where you are. Certain locations shouldn't be returned to, like the login page itself. I guess returning to the submit link page was a problem in some way though I can't think of how at the moment. Which pages do you need to return to that aren't currently being returned to?
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
Particularly... The submit page and the rate link page
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Problem is, if you leave the redirect for after submitting a listing or rating blank, it's supposed to go to the page you were on before that -- and not to the listing or rating page itself. So if I track those pages in the cookie it breaks things for others. Handling both cases would require a new system that records multiple recent locations and checks the order of progression to make decisions about which to use. Looking into that possibility but I don't know how practical it's going to be how quickly.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Looks like it's requiring a lot of fundamental changes. I don't want to introduce all these new bug possibilities to 5.1 so it'll be in 6.0.
Meanwhile, you could use
<?php if (!$_REQUEST['filled'] && (currenturlcontains('suggest.php') || currenturlcontains('vote.php'))) { echo '<input type="hidden" name="returnto" value="{CURRENTURL}">'; } ?>
in the the wrapper login form,
<?php if (!$_REQUEST['filled'] && $_REQUEST['action'] == 'userlogin' && $_REQUEST['returnto']) { echo '<input type="hidden" name="returnto" value="'.$_REQUEST['returnto'].'">'; } ?>
in the login template, and
<input type="hidden" name="returnto" value="{CURRENTURL}">
in the submit listing and rating templates to force a return to those locations.
Forum Regular
Usergroup: Customer
Joined: May 11, 2003
Total Topics: 64
Total Comments: 199
Just the topic I wanted to start -
Could be that I'm blind, but I can't find an option for "After a user submits a category, send them to", and right now I am always transferred back to index.php, which is really annoying. The parent category would be a lot more convenient. Maybe you could add that in one of the upcoming versions?!?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Looks like it just went missing from the template, I'll add back into the manage redirects template.
Forum Regular
Usergroup: Customer
Joined: May 11, 2003
Total Topics: 64
Total Comments: 199
great, thanks :-)