latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Group redirects using S2? Educational.

Home Forums Community Forum Group redirects using S2? Educational.

This topic contains 5 replies, has 3 voices. Last updated by  Bruce 3 years, 10 months ago.

Topic Author Topic
Posted: Monday Feb 4th, 2013 at 2:18 am #40585

I’ve been hunting for a solution to my problem for a while, and after hacking at several plugins, I came across S2, and so far, I’m blown away!

Planning on purchasing Pro to support the development, but a few questions first. I’m working my way through the training videos (which have been vary helpful). I also searched the forum and found several questions similar to mine, but none that address my specific needs.

I’m experimenting with a multi-organization, small group based educational site. The short version of it is, that I have lots of content pages, each containing a weeks worth of daily lessons. I need to way to “assign” these pages to different groups each week.

So for example: I have 2 organizations (#1 and #2), each with 3 groups (A, B, C). I need to be able to direct group #1.A to content page “science intro”, #2.B to “chemical reactions”, #1.C to “genetics”.

The “front page” for the site I’m building as a general overview of what the site is and how it operates. So I need a “portal” link within my menu that users click on which initiates the redirect process. The problem I’ve found with other WP plugins (like Peter’s Login/Logout) is that the redirect ONLY happens on login. Most of my users remained logged in, and I haven’t found a good solution for redirecting them.

Question #1 – Is this possible? I’d love for it to work based on custom user roles (as each user will be assigned one like this: Orgname_group#1

Question #2 – How easy would it be to change the content page assigned to a particular group? I’ll be changed them each week, and will have a growing number of groups starting with about 10. I don’t see a way to automate this, but I’m open to suggestions

I know that S2 isn’t designed for groups, but my current plan is to have different subscription plans, which offer a set number of users (#1 -> 10, #2 -> 25, #3 -> 50), then I’ll manually provide the subscribing group with a list of invitation codes for them to use to allow their users to register.

Question #3 – I currently use an Invitation Code plugin, which seems to work fine with S2, however, I don’t want the “organizational leader” to have to have an invitation code to subscribe. Is it possible to have an alternate registration for? One for the organizational leader, and another for the individual users?

Thanks for taking the time to answer these. If something doesn’t make sense, let know and I’ll provide more details. My brain is a little fuzzy at the moment (my son was born yesterday!).

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Tuesday Feb 5th, 2013 at 3:35 am #40818
Staff Member

Thanks for your inquiry. ~ We appreciate your patience :-)

I’m sorry but the business model that you’ve laid out seems to include many aspects that would require a custom configuration and integration of s2Member® that would go well beyond what it’s designed to do right out-of-the-box. I don’t see anything in your list that couldn’t be accomplished with s2Member and a few hacks, but it’s not something where I can say “oh yes, s2Member® does that!” — and provide you with support for those features.

I will say that s2Member comes equipped for scenarios like this, where you really want to dig and customize things nicely. Much of what you’ve described could be accomplished with Simple Shortcode Conditionals. In some cases (like with redirects), you could implement some of s2Member’s Advanced PHP Conditionals.

Please see: Knowledge Base » Simple Shortcode Conditionals
See also: Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals
See also: Dashboard -› s2Member® -› API / Scripting -› Advanced Query Conditionals

Posted: Tuesday Feb 5th, 2013 at 4:42 pm #40874

Thanks for the helpful response. That has given me a lot to think about, but has also impressed me all the more with S2!

My most immediate need is to redirect logged in users to specific pages. Some of the conditional bits seem helpful for displaying different content, but I’m not seeing how they would handle the page redirection. All users can have access to the content, but I need to direct them to different pages as I’m “curating” lesson plans.

Could you help steer me towards the specific bits that would allow me to get this functionality up and running? Then I can spend the time to get familiar. I don’t even need to allow subscriptions for another month or so.

Posted: Thursday Feb 7th, 2013 at 4:27 pm #41055
Bruce
Username: Bruce
Staff Member

Could you help steer me towards the specific bits that would allow me to get this functionality up and running? Then I can spend the time to get familiar. I don’t even need to allow subscriptions for another month or so.

For setting up an organization type structure, I would recommend giving access to dynamically-generated Free Registration Forms (only available with s2Member Pro) to create Users with specific Custom Capabilities, such as are set up in this video tutorial:

Video » s2Member (Custom Capabilities)

You can then have users sign up with these Custom Capabilities to differentiate between the different students of users. These Custom Capabilities can be as simple as the organization’s leader’s username.

See: Dashboard -› s2Member® -› PayPal® Pro Forms -› Free Registration Forms
See Also: Knowledge Base » Using Variables In A Shortcode

My most immediate need is to redirect logged in users to specific pages. Some of the conditional bits seem helpful for displaying different content, but I’m not seeing how they would handle the page redirection. All users can have access to the content, but I need to direct them to different pages as I’m “curating” lesson plans.

s2Member already redirects to the Login Welcome Page that you have set up on your site. If you’d like to use s2Member’s Advanced PHP Conditionals on your Login Welcome Page to decide where a User should be redirected to on Login, you can do this. s2Member also supports dynamically-created Login Welcome Page URLs, which may be useful in this case.

See: Dashboard -› s2Member® -› General Options -› Login Welcome Page
See Also: Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals

…but I need to direct them to different pages as I’m “curating” lesson plans.

If you are dealing with lesson plans, you may want to use s2Member’s Content Dripping to display certain lessons after a specific amount of time. Users in the past have used this functionality for this.

See: Dashboard -› s2Member® -› API / Scripting -› Content Dripping

Let us know if you have any further questions/concerns. :-)

Posted: Thursday Feb 21st, 2013 at 6:25 pm #42767

Bruce,

Thanks for the great response, and sorry my reply has taken so long. It’s been a wild 3 weeks!

I’m really digging into this issue now.

I’m trying out custom capabilities right now, and so far I think I like that as an option. I’m trying to iron out some redirect options for the Login Welcome page. I was using the dynamic login page redirection with the domain.com/r/%%current_user_ccaps%% This relies on WP Redirect to send them to the appropriate page.

My brain is so fried right now, I can’t remember why I needed to move to conditionals within the Login Welcome Page itself, but I know I ran into a small issue somewhere!

So, here’s what I’m trying to do right now:

<?php
// Check current user level and set purchase page       
if (current_user_is("s2member_level1")) {
	$ao_page = "http://ao.thriveym.com/r/%%current_user_ccaps%%";
}

// Use JavaScript to redirect to the correct content page
?>
<script type="text/javascript">
<!--
window.location = "<?php echo $ao_page; ?>";
//-->
</script>

So, %%current_user_ccaps%% doesn’t work (I borrowed that from the options within the Login Welcome settings. What should I have here to pull in that ccaps value?

As a side question, right now I’m just assigning one ccaps per member, but if in the future I add multiple, I’m assuming that will break this functionality?

I’m setting all individual users to level1, and all group leaders to level2. But level1 and level2 users within the same organization will have the same ccaps value.

Make sense? Thanks for the help, let me know if I need to clarify anything.

Posted: Saturday Feb 23rd, 2013 at 7:25 am #42997
Bruce
Username: Bruce
Staff Member

Thank you for your inquiry. ~We appreciate your patience.

So, %%current_user_ccaps%% doesn’t work (I borrowed that from the options within the Login Welcome settings. What should I have here to pull in that ccaps value?

This replacement code will list out ALL Custom Capabilities that the User has here. Because you’re already kind of “hacking” this redirect, I would recommend just getting the User’s Custom Capabilties the old fashioned way with current_user_can() here. You should be able to find out if the User has a Custom Capability, and redirect them appropriately that way.

See: Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals
See Also: http://codex.wordpress.org/Function_Reference/wp_redirect.

As a side question, right now I’m just assigning one ccaps per member, but if in the future I add multiple, I’m assuming that will break this functionality?

As I mentioned, this is listing out ALL of the User’s Custom Capabilities, so it wouldn’t really “break” this, if you have it set up correctly. But I’d still recommend just using s2Member’s PHP Conditionals here.

Viewing 5 replies - 1 through 5 (of 5 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.