Page 1 of 1

Can membership levels be configured for Author roles?

PostPosted: July 17th, 2010, 4:45 pm
by mkrank
I'd like anyone who signs up for the site to have the Contributor role, and then have the ability to modify users on a one-off basis to the Author or Editor role so that members can contribute to the site. I'm sure this has something to do with Custom Capabilities, but if someone could point me in the right direction that would be AWESOME.

Thanks again for such a great plugin. Finally finished configuring everything (but the above question) and I'm incredibly happy with it.

Re: Can membership levels be configured for Author roles?

PostPosted: July 18th, 2010, 3:39 am
by Jason Caldwell
Thanks for the great question, and for the kudos.

s2Member was NOT originally designed for administrative access protection, it was designed for Member/Customer access. However, you can certainly extend s2Member in this way.

Inside the functions.php file for your WordPress theme, you can add this snippet:
Code: Select all
<?php
add_filter("ws_plugin__s2member_force_default_role", "default_role");
function default_role($default = "contributor"){
    return "contributor";
}
?>

If you'd like to upgrade a Contributor to an Author, or to an Editor, you can log into your WP Dashboard, and go to the "Users" menu. Find the User in the list, and click "Edit".
Change their Role to Author or Editor.

Also, please be aware of the following:

* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 & 3.
* A Member with Level 3 access, will also be able to access Levels 0, 1 & 2.
* A Member with Level 2 access, will also be able to access Levels 0 & 1.
* A Member with Level 1 access, will also be able to access Level 0.
* A Subscriber with Level 0 access, will ONLY be able to access Level 0.

* WordPress® Subscribers are at Membership Level 0. If you're allowing Open Registration, Subscribers will be at Level 0 ( a Free Subscriber ).

Most importantly, given your request...

* WordPress® Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched.

If you'd like to modify the way s2Member treats Roles/Capabilties,
you can use a plugin like the Capability Manager.

Re: Can membership levels be configured for Author roles?

PostPosted: December 17th, 2010, 6:59 am
by Nehalem2010
Hi Jason,

first of all thanks for this wonderful plugin. Great work. And it is nice to see that the lead developer of a plugin takes the time to answer questions in the forum. That is awesome and shows how support should be.

Now I have a question. I basically have kind of the same situation like "mkrank" from abover here.
I have a website that has free content and some stuff is protected. The users can only apply to be registered, which if approved, is free for them.

As soon as they are approved the get the user name and password sent via email.

So here comes the question. How would you set this up and what do I have to do in order to give all registered members auther priviliges so that they can contribute to the site.
If I go to Users to change the role of one of my members to author or contributor, he or she can access the wordpress backend and write posts but at the same time they get Level 4 priviliges, which means they can see everything now. But they should only see posts that are free for Level 1 (or 2 or whatever. That doesn't make a difference her, since we only have two levels at all. Visitors and Members who should be able to write articles as well and see the blocked content.)

In your answer above, you wrote
"Most importantly, given your request...
* WordPress® Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched."

But I don't understand why is that? Could it be possible to give a user the Level: s2member Level 1 so that he/she only sees what is free for Level 1 and at the same time give them ability to write articles.

Or why not organize it like that:

s2member Level 0 <=> Subscriber
s2member Level 1 <=> Contributor
s2member Level 2 <=> Author
s2member Level 3 <=> Editor
s2member Level 4 <=> Administrator

I hope you understand what I mean.
Sorry for my english, but I am German.

Thanks for your answer and help in advance.

Daniel