Page 1 of 1

Special Redirection URL

PostPosted: May 14th, 2010, 6:21 pm
by entourage
I am trying to figure out what script would redirect a user when they login to their own user profile page?

So I would Like to create a new page, Iframe in their profile and some other data specific to that user and every time a person logs into their account they go directly to that page (their profile page).

I see information about "Special Redirection URL" and a "Stand Along Page" both of which seem to incorporate feature that I am trying to us, I just cannot figure out how to get them to work together.

Thank You

S

Re: Special Redirection URL

PostPosted: May 19th, 2010, 6:46 am
by Jason Caldwell
By default, s2Member asks you to choose an existing WordPress® Page, that will be used as the Login Welcome Page ( the first page a Members hits after logging in ). However, s2Member also makes it possible for you to enter a Special Redirection URL, which will be used instead of the standard Login Welcome Page.

In either case, when a Member logs into your site, they will always be directed immediately to your Login Welcome Page ( and/or Special Redirection URL ) if you provided a Special Redirection URL. The Special Redirection URL takes precedence over the Login Welcome Page.

Depending on where you are redirecting Members after logging in, you will want to embed the Stand-Alone Profile Editing panel into the Page that a Member lands on. So that will either be your Login Welcome Page, or the Page you are redirecting them to, using a Special Redirection URL.

Re: Special Redirection URL

PostPosted: May 27th, 2010, 11:54 pm
by nodrugads
Is there a way for a new profile page to be created dynamically? The way I have it setup the member would be redirected to nonexistent page. Alternatively is there a way to require admin approval of new accounts? That way a new page could be created manually.

Re: Special Redirection URL

PostPosted: June 23rd, 2010, 10:53 pm
by Jason Caldwell
Hmm. Not yet. I'll accept this as a feature request though.
~Thanks for your input on this topic.

Re: Special Redirection URL

PostPosted: July 21st, 2010, 6:07 pm
by Guest
I can't find any specific information on how to use the Special Redirection URL to send members to a welcome page for their specific level.

Can you give an example?

Thanks

Tim Carter

Re: Special Redirection URL

PostPosted: July 22nd, 2010, 8:15 am
by Jason Caldwell
Hi Tim. Thanks for the great question.

In your WP Dashboard, under: s2Member -> General Options -> Login Welcome Page
you will find a link that says "replacement codes", that is the only documentation on this feature.

Here is an example that should help you.

1. Create Pages inside WordPress for each Level, giving each Page a slug that contains a Level number.
Code: Select all
http://mysite.com/login-welcome-page-level-0
http://mysite.com/login-welcome-page-level-1
http://mysite.com/login-welcome-page-level-2
http://mysite.com/login-welcome-page-level-3
http://mysite.com/login-welcome-page-level-4


2. Set your Login Welcome Page option to a Special Redirection URL:
Code: Select all
http://mysite.com/login-welcome-page-level-%%current_user_level%%

Understanding Replacement Codes:

%%current_user_login%% = The current User's login ( their Username, lowercase ).
%%current_user_ID%% = The current User's ID.
%%current_user_level%% = The current User's s2Member Level.

For example, if you're using BuddyPress, and you want to redirect Members to their BuddyPress Profile page after logging in, you would setup a Special Redirection URL, like this:
Code: Select all
http://www.s2member.com/members/%%current_user_login%%/profile/

Or ... using %%current_user_level%%, you could have a separate Login Welcome Page for each Membership Level that you plan to offer. BuddyPress not required.

Additional Replacement Codes can be added through custom programming. Use:
Code: Select all
add_filter('s2member_fill_login_redirect_rc_vars', 'my_filter');

Re: Special Redirection URL

PostPosted: July 22nd, 2010, 11:39 am
by Guest
That isn't working because subscriber member level is coming up as -1 always when using the variable %current_user_level%%

Re: Special Redirection URL

PostPosted: July 22nd, 2010, 12:38 pm
by Guest
Maybe that description wasn't clear.

The variable %%current_user_level%% returns a -1 no matter what the user level is. So this function isn't working.

Thanks

Tim Carter

Re: Special Redirection URL

PostPosted: July 22nd, 2010, 6:18 pm
by Jason Caldwell
Hi Tim. Thank you VERY much for reporting this.
~ This will be corrected in v3.1.5+ ( to be released later this evening ).