Page 2 of 2

Re: Login Redirect not working

PostPosted: October 21st, 2011, 1:53 pm
by denvert
Thanks Jason,

Sorry for all the confusion, we can use a temporary fix, hopefully you'll be able to integrate with next update. Thanks again for all your help.

Best, Chris

Re: Login Redirect not working

PostPosted: October 30th, 2011, 4:15 pm
by denvert
Hi Jason,

Were you able to address this issue in the new updates?

Thanks

Re: Login Redirect not working

PostPosted: October 31st, 2011, 11:26 am
by Jason Caldwell
No, so sorry. This did NOT make into the release of s2Member Pro v111029. However, I've got this on my list for today/tomorrow. When I have it completed, I'll post a patch file in this thread with instructions so you can obtain this functionality early.

Re: Login Redirect not working

PostPosted: October 31st, 2011, 11:31 am
by denvert
Thanks Jason.

Re: Login Redirect not working

PostPosted: October 31st, 2011, 8:25 pm
by Jason Caldwell
This functionality is now available in the development copy, coming soon in public release. Until then, if you'd like this functionality right away, please upgrade to the development copy of s2Member. Get it here:
http://downloads.wordpress.org/plugin/s2member.zip

Then patch your existing installation of s2Member Pro v111029 with the attached file:
Override your existing copy of /s2member-pro/includes/classes/login-widget.inc.php
login-widget.inc.php.zip
(4.79 KiB) Downloaded 10 times

Re: Login Redirect not working

PostPosted: November 1st, 2011, 8:42 pm
by denvert
thanks Jason. I'll see if I can get it working.

Re: Login Redirect not working

PostPosted: November 1st, 2011, 9:06 pm
by denvert
Hey Jason,

I tried these two things you said to try before,

"login_redirect" => $_GET["previous"],

"login_redirect" => "$_SERVER["HTTP_REFERER"],

and am still just getting the page that the login form is set up on. It seems like the page that is getting re-directed to the login page never gets recognized to go back to.

Re: Login Redirect not working

PostPosted: November 3rd, 2011, 11:02 am
by Jason Caldwell
Thanks for the feedback on this. I see what the issue is, and I'll have this corrected asap and follow-up with you here. Thanks for your patience.

Re: Login Redirect not working

PostPosted: November 5th, 2011, 4:28 pm
by Jason Caldwell
This has been corrected in the development copy, coming soon in public release.

Re: Login Redirect not working

PostPosted: November 6th, 2011, 2:25 am
by denvert
Thanks Jason for your great Customer Support.

Code below can be pasted into the page that members get redirected to and after logging in they will be directed to the page they were trying to visit that is membership protected.

Code: Select all
<?php
$options 
= array(
"title" => ""
"signup_url" => ""
"login_redirect" =>  "%%previous%%",
"profile_title" => "",
"display_gravatar" => "0"
"link_gravatar" => "0"
"display_name" => "0"
"logged_in_code" => ""
"logout_redirect" => ""
"my_account_url" => "0"
"my_profile_url" => "0" 
);
$args = array (
"before_widget" => "<div class=\"member_login_widget\">",
"after_widget" => "</div>",
"before_title" => "<h5>",
"after_title" => "</h5>"
);
echo 
s2member_pro_login_widget($options$args);
?>

Re: Login Redirect not working

PostPosted: November 6th, 2011, 11:29 am
by Jason Caldwell
Very welcome. That's it. s2Member v111105 is now available.

Changelog excerpt related to this issue.
http://wordpress.org/extend/plugins/s2member/changelog/
(s2Member Pro) Improvement. The s2Member Pro Login Widget now has improved handling of its %%previous%% Replacement Code for login redirections.