PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
<?php
$options = array(
"title" => "",
"signup_url" => "http://xxx.xxxxxx.org/register/",
"login_redirect" => "%%previous%%",
"profile_title" => "",
"display_gravatar" => "0",
"link_gravatar" => "0",
"display_name" => "0",
"logged_in_code" => "",
"logout_redirect" => "http://xxx.xxxxxx.org",
"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);
?>
"login_redirect" => "%%previous%%",
This is unrelated to the %%previous%% Replacement Code. Is s2Member activated Network-wide on your installation? Or is it activated only on specific Blogs? In either case, is Open Registration enabled for all sites in your Network, or only for the Main Site?If i'm on this page, /wp-login.php and click the register link it re-directs to the home site's login page which gives an error message stating registration is turned off. This all worked before.
* Can you elaborate just a bit further for me please?user is sent to re-directed to login page that has code generated from the document you give link to, specifically,
$redirect_to = preg_replace ("/%%previous%%/i", $_SERVER["REQUEST_URI"], ($redirect_to = $options["login_redirect"]));
Jason Caldwell wrote:There is one exception that s2Member treats differently though, and that is your Membership Options Page. If a Customer attempts to log into your site from your Membership Options Page, the %%previous%% Replacement Code is ignored, and instead the Customer will be returned to your Login Welcome Page by default. This is the intended behavior, in this one special scenario, because returning a logged-in User to a set of Membership Options is not intuitive.
"login_redirect" => $_SERVER["HTTP_REFERER"]
"login_redirect" => $_SERVER["HTTP_REFERER"],
Right, but since you're redirecting Visitors to your own custom "Login Page" constructed with the s2Member Pro Login Widget, you need to record the page they came from "before" they were redirected to your custom "Login Page", which is not the same thing as %%previous%%. You can read more about $_SERVER["HTTP_REFERER"] here: http://php.net/manual/en/reserved.variables.server.phpI'm not trying to return them to the page they logged in from but the page that directed them to the page they logged in from. Does that make sense?
<?php
$options = array(
"title" => "",
"signup_url" => "http://xxx.xxxxxx.org/register/",
"login_redirect" => "$_SERVER["HTTP_REFERER"]",
"profile_title" => "",
"display_gravatar" => "0",
"link_gravatar" => "0",
"display_name" => "0",
"logged_in_code" => "",
"logout_redirect" => "http://xxx.xxxxxx.org",
"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);
?>
"login_redirect" => "$_SERVER["HTTP_REFERER"]",
"login_redirect" => $_SERVER["HTTP_REFERER"],
<?php echo $_SERVER["HTTP_REFERER"]; ?>
http://example.com/my-custom-login-page/?previous=<?php echo urlencode($_SERVER["REQUEST_URI"]); ?>
"login_redirect" => $_GET["previous"],
denvert wrote:I'm depending on the re-direction that s2member does.
Users browsing this forum: Exabot [Bot] and 0 guests