PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Level specific access only???

s2Member Plugin. A Membership plugin for WordPress®.

Level specific access only???

Postby mrnic3guy » August 5th, 2011, 9:32 am

Hi. I love your plugin, but before I purchase s2member, I just wanted to see if s2member supports the ability to create level specific pages upon login. In the free version, I'm able to restrict access to different levels such as "level 3 or higher." My question is, can I restrict level 3 content to just level 3 users? I don't want level 4 to be able to access level 3 at all. Also, is there an ability within s2member to also restrict the sub-pages of level 3?

I've searched the forums, but haven't found what I'm looking for.
User avatar
mrnic3guy
Registered User
Registered User
 
Posts: 1
Joined: August 4, 2011

Re: Level specific access only???

Postby Cristián Lávaque » August 5th, 2011, 10:47 pm

Protection for pages won't include their child-pages unless you protect them too.

A way to do level specific protection is with conditionals, but those won't bounce the person to the Membership Options Page like Page Access Restriction does. WP Admin -> s2Member -> API / Scripting -> Simple/Shortcode Conditionals -> Example #3

You could use Custom Capabilities, they aren't incremental as levels are and will bounce the person if that's what you want. http://www.s2member.com/custom-capabilities-video/

I hope that helps. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Level specific access only???

Postby ZebEl » August 9th, 2011, 10:23 am

Using shortcode is working perfectly thanks to s2Member. :) The only problem is that admin himself can not access all content but only the public one. I hope that this kind of capabilities will be solved in the future to be able to link member levels to existing user capabilities in Wordspress, like: level1=contributer, lever2=author, levels 3-4 authors+cutom capabilities, etc.

However, I solved it like the following:

[s2If current_user_is(s2member_Level 4) OR current_user_is(administrator)]
Some premium content for Level 4 Members.
[/s2If]

[s2If current_user_is(s2member_Level 3) OR current_user_is(administrator)]
Some premium content for Level 3 Members.
[/s2If]

[s2If current_user_is(s2member_Level 2) OR current_user_is(administrator)]
Some premium content for Level 2 Members.
[/s2If]

[s2If current_user_is(s2member_Level 1) OR current_user_is(administrator)]
Some premium content for Level 1 Members.
[/s2If]

[s2If current_user_is(s2member_Level 0) OR current_user_is(subscriber)]
Some content for Free Subscribers.
[/s2If]

[s2If !current_user_can(access_s2member_Free)]
Some public content.

[/s2If]
User avatar
ZebEl
Registered User
Registered User
 
Posts: 13
Joined: July 14, 2011

Re: Level specific access only???

Postby Cristián Lávaque » August 9th, 2011, 1:28 pm

Admins should be able to see anything s2Member is protecting without you needing to do anything else.

There is in the current version a bug where he can't see content protected with custom capabilities that he doesn't have, but that's fixed for the coming release.

If you want to set up restrictions for existing WordPress roles, using the conditionals is perfectly fine.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Level specific access only???

Postby ZebEl » August 9th, 2011, 1:53 pm

Thanks Cristián,

Regarding the bug, I'll reverse the code when a new release is available.
User avatar
ZebEl
Registered User
Registered User
 
Posts: 13
Joined: July 14, 2011

Re: Level specific access only???

Postby Cristián Lávaque » August 9th, 2011, 1:57 pm

:)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron