Community Support Forums — WordPress® ( Users Helping Users ) — 2011-09-25T23:13:40-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14211 2011-09-25T23:13:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=39156#p39156 <![CDATA[Re: automatic redirect to members page after open registrati]]>
Guys, sorry, I haven't been able to look into the admin notification and the list servers routine yet. I'll do it as soon as possible. Thanks for your patience!

Statistics: Posted by Cristián Lávaque — September 25th, 2011, 11:13 pm


]]>
2011-09-20T23:07:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=38854#p38854 <![CDATA[Re: automatic redirect to members page after open registrati]]> I mean you can't exactly redirect the user to the /wp-content/mu-plugins/s2hacks.php URL by using the success= in the paypal button shortcode can't we?

Cristián Lávaque wrote:
The default after registration is to have the user login. I wrote a hack to have him logged in automatically after registration and redirected to the page you specify. Here it is:

/wp-content/mu-plugins/s2hacks.php
Code:
<?php
add_action
('ws_plugin__s2member_during_configure_user_registration_front_side', 's2_auto_login_after_registration');
function s2_auto_login_after_registration($vars = array()) {
    wp_set_auth_cookie($vars['user_id'], false, is_ssl());
    wp_redirect(S2MEMBER_LOGIN_WELCOME_PAGE_URL . '?first');
    exit;
}
?>


I hope it helps. :)


Thank a lot for your time.

Claude LaBadie

Statistics: Posted by cexpert — September 20th, 2011, 11:07 pm


]]>
2011-09-14T16:25:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=37223#p37223 <![CDATA[Re: automatic redirect to members page after open registrati]]> Statistics: Posted by bsowards — September 14th, 2011, 4:25 pm


]]>
2011-09-12T00:22:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=34582#p34582 <![CDATA[Re: automatic redirect to members page after open registrati]]> Statistics: Posted by seofeed — September 12th, 2011, 12:22 am


]]>
2011-09-12T00:00:44-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=34581#p34581 <![CDATA[Re: automatic redirect to members page after open registrati]]>
Notice the change from ws_plugin__s2member_during_configure_user_registration to ws_plugin__s2member_during_configure_user_registration_front_side_free

That's what did it.

Code:

add_action('ws_plugin__s2member_during_configure_user_registration_front_side_free', 's2_auto_login_after_registration');
function s2_auto_login_after_registration($vars = array()) {
    if (!is_admin() && $vars['processed'] === 'yes') {
        wp_new_user_notification($vars['user_id'], $vars['pass']);
        wp_set_auth_cookie($vars['user_id'], false, is_ssl());
      wp_redirect('http://domain.com/download-' . $vars['__refs']['level']);
        exit();
    }
}



The only problem I'm still dealing with that process list servers isn't working. I'm guessing it will look something like this in the middle of that above code but I can't get it working:

Code:
add_filter("ws_plugin__s2member_process_list_servers", "__return_true");


Thanks!

Statistics: Posted by seofeed — September 12th, 2011, 12:00 am


]]>
2011-08-31T22:51:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=33583#p33583 <![CDATA[Re: automatic redirect to members page after open registrati]]>
Code:
<?php echo '<script type="text/javascript">window.location = \'http://domain.com/download-' . S2MEMBER_CURRENT_USER_ACCESS_LEVEL . '\';</script>'; ?>

Statistics: Posted by Cristián Lávaque — August 31st, 2011, 10:51 pm


]]>
2011-08-30T20:51:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=33457#p33457 <![CDATA[Re: automatic redirect to members page after open registrati]]> Statistics: Posted by seofeed — August 30th, 2011, 8:51 pm


]]>
2011-08-30T18:19:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=33420#p33420 <![CDATA[Re: automatic redirect to members page after open registrati]]>
And I understand what you mean about goal tracking...

Could you try the hack with the redirection like this?

Code:
        wp_redirect('http://domain.com/download-' . S2MEMBER_CURRENT_USER_ACCESS_LEVEL . '?first');
 


Or how about using a Login Welcome page and there have a redirect to the welcome page for each level?

Code:
<?php header('Location: http://domain.com/download-' . S2MEMBER_CURRENT_USER_ACCESS_LEVEL); ?>

Statistics: Posted by Cristián Lávaque — August 30th, 2011, 6:19 pm


]]>
2011-08-30T11:57:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=33349#p33349 <![CDATA[Re: automatic redirect to members page after open registrati]]> Statistics: Posted by seofeed — August 30th, 2011, 11:57 am


]]>
2011-08-30T11:48:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=33348#p33348 <![CDATA[Re: automatic redirect to members page after open registrati]]> Statistics: Posted by Cristián Lávaque — August 30th, 2011, 11:48 am


]]>
2011-08-29T21:51:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=33317#p33317 <![CDATA[Re: automatic redirect to members page after open registrati]]> Statistics: Posted by seofeed — August 29th, 2011, 9:51 pm


]]>
2011-08-29T12:30:46-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=33241#p33241 <![CDATA[Re: automatic redirect to members page after open registrati]]>
seofeed wrote:
Forget to mention: since no role is assigned they are sent to the pricing options page for the correct download page.


So the user's account is created but no role assigned to it? I just tried the hack for a level 0 user and another at level 1 and both had the role assigned correctly.

Was this problem also happening when you used S2MEMBER_LOGIN_WELCOME_PAGE_URL in the redirection or only after you changed it?

Statistics: Posted by Cristián Lávaque — August 29th, 2011, 12:30 pm


]]>
2011-08-28T10:51:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=33195#p33195 <![CDATA[Re: automatic redirect to members page after open registrati]]>
[s2Member-Pro-PayPal-Form register="1" level="0" ccaps="" desc="" custom="domain.com" tp="0" tt="D" captcha="0" /]

Of course, changed custom to domain.com

Statistics: Posted by seofeed — August 28th, 2011, 10:51 am


]]>
2011-08-28T02:36:15-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=33179#p33179 <![CDATA[Re: automatic redirect to members page after open registrati]]> Statistics: Posted by Cristián Lávaque — August 28th, 2011, 2:36 am


]]>
2011-08-27T23:09:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=33155#p33155 <![CDATA[Re: automatic redirect to members page after open registrati]]> Statistics: Posted by seofeed — August 27th, 2011, 11:09 pm


]]>
2011-08-27T22:50:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=33147#p33147 <![CDATA[Re: automatic redirect to members page after open registrati]]>
Code:
<?php
add_action
('ws_plugin__s2member_during_configure_user_registration', 's2_auto_login_after_registration');
function s2_auto_login_after_registration($vars = array()) {
    if (!is_admin() && $vars['processed'] === 'yes') {
        wp_new_user_notification($vars['user_id'], $vars['pass']);
        wp_set_auth_cookie($vars['user_id'], false, is_ssl());
        wp_redirect('http://domain.com/download-' . $vars['__refs']['level'] . '?first');
        exit();
    }
}
?>

Statistics: Posted by Cristián Lávaque — August 27th, 2011, 10:50 pm


]]>
2011-08-27T14:27:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=33089#p33089 <![CDATA[Re: automatic redirect to members page after open registrati]]> Statistics: Posted by seofeed — August 27th, 2011, 2:27 pm


]]>
2011-08-27T14:26:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=33088#p33088 <![CDATA[Re: automatic redirect to members page after open registrati]]> Statistics: Posted by seofeed — August 27th, 2011, 2:26 pm


]]>
2011-08-27T02:49:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=33051#p33051 <![CDATA[Re: automatic redirect to members page after open registrati]]> S2MEMBER_LOGIN_WELCOME_PAGE_URL is not updated yet with the new level he got during registration.

You could try changing the redirection line in the hack to this

Code:
        wp_redirect('http://domain.com/download-' . $vars['__refs']['level'] . '?first');
 


Let me know if it works. :)

Statistics: Posted by Cristián Lávaque — August 27th, 2011, 2:49 am


]]>
2011-08-27T00:06:44-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=33013#p33013 <![CDATA[Re: automatic redirect to members page after open registrati]]>

I tried this code and it's not working for my special redirection URL for subscribers (level 0).

Code:
add_action('ws_plugin__s2member_during_configure_user_registration', 's2_auto_login_after_registration');
function s2_auto_login_after_registration($vars = array()) {
    if (!is_admin() && $vars['processed'] === 'yes') {
        wp_new_user_notification($vars['user_id'], $vars['pass']);
        wp_set_auth_cookie($vars['user_id'], false, is_ssl());
        wp_redirect(S2MEMBER_LOGIN_WELCOME_PAGE_URL . '?first');
        exit();
    }
}


It works, but it redirects to the URL for S2_Member_Level1. For example purposes, here's what my URL looks like on the Login Welcome Page box:

http://domain.com/download-%%current_user_level%%

Of course, upon login or clicking the Profile link it redirects to the proper page just not after user registration. I looked in s2member/includes/classes/constants.php.inc for another constant that handles the Special Redirection URL but the constant definition for S2MEMBER_LOGIN_WELCOME_PAGE_URL seems to handle that situation.

Not sure how to get this working. Thanks!

Statistics: Posted by seofeed — August 27th, 2011, 12:06 am


]]>
2011-08-17T03:28:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=32106#p32106 <![CDATA[Re: automatic redirect to members page after open registrati]]>
Code:
<p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'kubrick'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?></p>


To this:

Code:
members-area <p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'kubrick'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(members-area())); ?></p>

Statistics: Posted by RJGonzalez — August 17th, 2011, 3:28 am


]]>
2011-08-17T03:22:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=32104#p32104 <![CDATA[Re: automatic redirect to members page after open registrati]]>
Code:
wp_redirect(S2MEMBER_LOGIN_WELCOME_PAGE_URL . '?first');

is that where i have to redirect to

S2MEMBER_LOGIN_WELCOME_PAGE_URL <-- being the original name i gave the page when i created corect

Statistics: Posted by RJGonzalez — August 17th, 2011, 3:22 am


]]>
2011-08-17T03:15:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=32102#p32102 <![CDATA[Re: automatic redirect to members page after open registrati]]>
rwilki wrote:
But it's not filtering anything. It's showing both areas of content regardless of which level content is required. I'm testing this as an unlogged in visitor...


You had a small syntax error in your code. Try this:

Code:
<?php } elseif ($_GET['s2member_level_required'] === '0') { ?>
By registering now...
<?php } elseif ($_GET['s2member_level_required'] === '1') { ?>
Premium Access Pass...
<?php } ?>

Statistics: Posted by Cristián Lávaque — August 17th, 2011, 3:15 am


]]>
2011-08-17T03:14:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=32101#p32101 <![CDATA[Re: automatic redirect to members page after open registrati]]>
I have search and there are many solutions but cant figure it out. It has to do with the login redirect. Here is my code:

Code:
<p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'kubrick'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?></p>


Now where is it that i have redirect to?

Thank you in advance.

Statistics: Posted by RJGonzalez — August 17th, 2011, 3:14 am


]]>
2011-08-17T03:10:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14211&p=32099#p32099 <![CDATA[Re: automatic redirect to members page after open registrati]]>
Am using
Code:
<?php } elseif { ($_GET['s2member_level_required'] === '0') ?>
By registering now...
<?php } elseif { ($_GET['s2member_level_required'] === '1') ?>
Premium Access Pass...
<?php } ?>


But it's not filtering anything. It's showing both areas of content regardless of which level content is required. I'm testing this as an unlogged in visitor...

Statistics: Posted by rwilki — August 17th, 2011, 3:10 am


]]>