Rachel –
I am doing something similar, only for groups of people. I am doing this at the Free Membership (Level 0), but it is applicable to all levels. Here’s one way that you would implement the content access part. And I realize you posted this in the “pre-sales” area, and my answer is very hands-on how-to technical. In case you start playing with it, you can use this… :)
1. Determine the full set of capabilities that you want to extend to people. For example, one or more people get access to a calendar, one or more people get access to “training video 1”, certain others get access to “instructional PDF file 5”. You get the idea, now you have a list of these capabilities.
2. Assign a short mnemonic to each of these capabilities; e.g. from the examples above, you might end up with the mnemonics “pcal”, “trvid1”, “instp5”.
3. Now go to your users table through S2 or WordPress (e.g., Users->All Users), find the person you want to have access to, say, a calendar and instructional PDF 5 and click on their user name or the “Edit” link.
4. Scroll down to the bottom of that page under “s2Member Configuration & Profile Fields”, and find the field named “Custom Capabilities” and in there, type the following: pcal,instp5 and then click “Update User” at the bottom. You just added a comma-separated list of your mnemonics describing the custom capabilities that you want that person to have.
5. Now go to the members-only page, whatever that is for you – perhaps defined under the S2Member control panel heading “s2Member->General Options->Login Welcome Page”, and add code like this…
Hello [s2Get constant="S2MEMBER_CURRENT_USER_FIRST_NAME" /], and welcome to your membership area. You have been here [s2Get constant="S2MEMBER_CURRENT_USER_LOGIN_COUNTER" /] times before.
<?php if (current_user_can("access_s2member_ccap_pcal")){ ?>
<a href="http://link-to-calendar-page">Click Here</a> to access your calendar.
<?php } ?>
<?php if (current_user_can("access_s2member_ccap_trvid1")){ ?>
<a href="http://link-to-training-video-1">Click Here</a> to access training video 1.
<?php } ?>
<?php if (current_user_can("access_s2member_ccap_instp5")){ ?>
<a href="http://link-to-instructional page pdf file">Click Here</a> to download instructional document 5.
<?php } ?>
Do you see your mnemonic at the end of the “access_s2member_ccap_” constant? It’s just your word tacked onto the end of the constant.
Of course, you need to create the actions necessary for your website when a “custom capability” is set for a person; the above code example just takes them to a specific page (which you should have protected at level 0) or downloads the PDF. It’s worth noting that in the code above, if the person does not have a particular capability that nothing will be displayed for them on the page. They won’t even see the link, say, to training video 1.
It’s certainly not all-inclusive, and only one approach. s2member has tremendous flexibility that becomes more and more apparent as you use it. I hope that gets you thinking about how you might approach the problem.
Randy
-
This reply was modified 4 years, 5 months ago by Randy King.