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.

Custom capabilities usage clarification

Home Forums Community Forum Custom capabilities usage clarification

This topic contains 8 replies, has 4 voices. Last updated by  Eduan 4 years, 4 months ago.

Topic Author Topic
Posted: Saturday Aug 11th, 2012 at 7:36 pm #21795
TBguitars
Username: tbguitars

Please forgive me, this is my first time using the ccap functionality and I just want to be sure I am clear. Do I just add the word I specified for the custom capability into the box on my edit page window inside wordpress? Or is there code I need to use there?

Wasn’t sure since the video seems to be from an older version.

Thanks!

List Of Topic Replies

Viewing 8 replies - 1 through 8 (of 8 total)
Author Replies
Author Replies
Posted: Saturday Aug 11th, 2012 at 9:21 pm #21796
cassel
Username: cassel

Hi, i am not support rep, but a user like you. Custom capabilities (ccaps in short) can be used in two main ways:
1- you can enter the ccaps (whatever word you want to use is fine) in the top right box where you see “Require Custom Capabilities?”
This will make the whole page unavailable for any user who does not have that ccaps access.

2- you can use it with conditionals, where you can show part of a page for those who have specific ccaps, and other content for others.

Then, you have to assign the ccaps to the user mainly with the buttons or pro-forms, when a member registers (i think you can assign ccaps with free registration, but i am not sure how, since i dont use it myself).

For an example, on my site (http://scrapbookcampus.com), members can be given the ccap “basic” if they purchased the Basic course, and the pages with the various lessons are protected with that box (on top right). I am also using ccaps for various workshops i have: if the user does not have the ccaps for a particular workshop, they will see a “sale pitch”, but if they do have it, they will see the actual video and link to download the documentation. For the workshops, i have them assigned individually as wjan2012, wfeb2012, etc.

Hope it helps. If you have more questions, don’t hesitate to ask. Someone will surely be here to help.

Posted: Sunday Aug 12th, 2012 at 8:46 pm #21840
TBguitars
Username: tbguitars

Cassel,

Thank you so much for your help, I really appreciate it! So if I specify “music” for example, when I’m making my button, then I just add the word “music” to my post or page in the ccap box so that it will be included, right?

That is an amazingly powerful feature!

Posted: Sunday Aug 12th, 2012 at 9:46 pm #21844
cassel
Username: cassel

Yes, that is right. That will then give access to this page only to the users with that particular ccap. And yes, it is a fowerful feature, even more when you can use conditionals!

Posted: Monday Aug 13th, 2012 at 5:46 am #21859
Todd
Username: toddz88

@cassel — Thanks for the strategy tip. One question: how do you provide the logged-in user with links to the pages he purchased? Does each user have an Account page, that somehow lists all the Workshops he can view? If so, how did you set that up?

-Thanks!

Posted: Monday Aug 13th, 2012 at 7:06 am #21860
cassel
Username: cassel

I am sure there are various methods to do it, but in my case, i am using conditionals:

[s2If !is_user_logged_in() ] – this means, “if the user is NOT logged in”
i put the sale pitch
[/s2If]
[s2If is_user_logged_in() ] – this means “if the user is logged in”
i put the list of links to whatever i want them to access

and you can do the same with ccaps

[s2If !current_user_cannot(access_s2member_ccap_music)] – this means, “if the user does not have the ccap “music”
i put the sale pitch
[/s2If]
[s2If current_user_can(access_s2member_ccap_music)] – this means “if the user has the ccap “music””
i put the list of links to whatever i want them to access or it can be the content itself

Hope it helps.

  • This reply was modified 4 years, 4 months ago by  Eduan. Reason: Modified conditionals, always reflected NOT instead of yes and no
Posted: Monday Aug 13th, 2012 at 12:39 pm #21890
Todd
Username: toddz88

Ahh got it. That’s very helpful, thank you!

Posted: Tuesday Aug 14th, 2012 at 5:33 pm #22031
TBguitars
Username: tbguitars

I set up some ccap packages and it worked great, but I have one more question or you guys;

Do I need to give the page/post a membership level access protection AND the ccap? or just the ccap?

I did it with both the membership level 1 and the ccap, will this give access to the level one members who don’t have the ccap, or will it look for both credentials before it lets someone view the page?

Thanks again!

Posted: Tuesday Aug 14th, 2012 at 9:00 pm #22046
Eduan
Username: Eduan
Moderator

Hello there,

It will look for both statuses I’m afraid, in other words it will require the ccap and the level I believe. You can just protect it with the ccap.

Hope this helps. :)

Viewing 8 replies - 1 through 8 (of 8 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.