How to build a membership site with different capabilities?

Hi - new to the community here!

Not sure if this is the right place to post about this, but here goes...

Basically, I'm trying to build a membership site for a client (a friend) -- and while I've done basic BuddyPress sites before, I've never dealt with different member levels, and I'm having a hard time figuring out how to do exactly what my client wants.

He needs a community site that offers a free membership level, and at least one paid level. All members should have the ability to upload media (I'm using rtMedia for now, but willing to use something else if there's a better alternative) -- but my client would like it so that free members can ONLY upload/view photos, while paid members have the additional capability of uploading/viewing videos. Is that possible (splitting capabilities of a plugin according to member level) with any combination of plugins here?

I tried Protected Content, but not sure I'm using it correctly -- or if it can even be as fine-tuned as I'd like. I created free and paid membership levels, and under "Protected Content">Custom Post Types, I see "rtmedia_album" there -- and I assumed that changing the "Who Has Access" for that to the paid level membership only would then DENY free members to uploading anything via rtMedia at all. But in my test with a free membership role, I was still able to upload photos and video.

So I can't even figure out how to hide the use of a plugin altogether, let alone split the plugin's capabilities (photos/videos) between member levels. Anybody know what I may be doing wrong, or have suggestions to get the kind of site I'm trying to build?

I also wanted to see if the Chat plugin (which I have installed) could be hidden for the free membership level, but I don't even see that as an option to protect!

Any help/suggestions/advice would be greatly appreciated! Thanks.

  • Michael Bissett

    Hey @Anton, welcome to the WPMU DEV Community, good to have you here! :slight_smile:

    Right out of the box, looking at what rtMedia provides here, it seems like you'd want to create a pair of pages (one for free, and one for premium), and employ their [rtmedia_uploader] shortcode. For the free page, you'd want to have it set up like this:

    [rtmedia_uploader media_type=photo]

    And for the premium page, you'd want to have it set up like this:

    [rtmedia_uploader]

    As for hiding the default button that shows up in BuddyPress, you can try inserting this into Simple Custom CSS:

    #buddypress .rtmedia-upload-media-link {
        display: none;
    }

    I also wanted to see if the Chat plugin (which I have installed) could be hidden for the free membership level, but I don't even see that as an option to protect!

    Regarding this, I'd want to try using this plugin to create a custom user role (you could duplicate the Subscriber role):

    https://wordpress.org/plugins/user-role-editor/

    Now, how the chat box was being displayed for users wasn't specified, but say you had the chat box embedded in a page, you'd want to go to:

    Chat -> Settings Page -> Authentication

    And then choose your custom user role as a user that can access the chat.

    Then, inside of Protected Content, you'd want to go to:

    Protect Content -> Add-ons

    And after enabling the "Member Capabilities" add-on, you should then be able to assign your custom user role to your premium membership, by going to:

    Protect Content -> Protected Content -> User Roles

    That should allow your premium users to be able to access the chat. :slight_smile:

    Hope this helps!

    Kind Regards,
    Michael

    • Anton

      Thanks for the reply, @Michael Bissett!

      That's actually a pretty decent way to get different member levels to have access to the different media types of rtMedia (that I didn't think of).

      Unfortunately that means separate "free-for-all" media pages that ALL members would contribute to, rather than personal media albums for each user (which is what my client is really looking for). I've been researching different membership and user role editor plugins, and none seem to have exactly what we're looking for, which is a real bummer. If anyone has any ideas on how to get this done with users keeping their personal media albums, I would really appreciate it!

      As for Chat, that solution did the trick, thanks!! (Took me a while in the Authentication panel to figure out I had to click off ALL the user roles -- including stuff like "Spectator," -- and keep only the Premium member role checked).

      Awesome, awesome...almost there!

  • Michael Bissett

    You're welcome @Anton, glad to be of help here! :slight_smile:

    As for this part:

    Unfortunately that means separate "free-for-all" media pages that ALL members would contribute to, rather than personal media albums for each user (which is what my client is really looking for).

    ...hmm. Well, I do see that rtMedia has the "rtmedia_plupload_files_filter" available, that may help to allow you to manage which filetypes are allowed for users. I also see a few do_action hooks inside of:

    /buddypress-media/templates/upload/uploader.php

    Perhaps a function could be written that would tie into one of those? It'd be something that the folks that made rtMedia would be best able to answer though, I'd want to reach out to them if I were you.

    If going the more programmatic route isn't quite your thing though, you may wish to hire someone to cook up a solution for you. You'd definitely be welcome to post a job for this on our Jobs Board:

    https://premium.wpmudev.org/wordpress-development/

    For what it's worth, hope this helps! :slight_smile:

    Kind Regards,
    Michael

  • Anton

    Thanks again, Michael!

    I DID end up reaching out to rtMedia in the end!

    On whether or not I could hide certain media for certain users, they said:

    You can use rtmedia-model-where-query filter in your theme or plugin and in that filter, you can check if current user is allowed to view the gallery or not. If he's allowed than simply return the query as it is and if not just put an 'AND' condition with SQL query which will result into false all the time for example 2=3. That way, SQL query won't be able to fetch any media if user is not set for required WP role.

    On whether or not I could DENY said user to upload certain media (videos), they said:

    rtMedia stores allowed upload types into $rtmedia global variable. You can access them as following.

    global $rtmedia;
    $rtmedia->allowed_types

    You can hook into WordPress init action and can unset video from that if user does not fulfill required WP role.

    Granted, I have absolutely NO idea what any of that means, or what to do with that info... :wink:

    So, yeah....I may need to reach out for help on the jobs board. Thanks for pointing that out!
    Not sure if I'll have any budget for this, though.... what's the usual rate someone would pay for this kind of work? I have no idea! Sounds like it would be relatively simple for someone who definitely knows what they're doing. I'd love to take a stab at figuring it out myself, but I'm worried of making a mistake. (Especially one I might not discover until waaaaay later, after it's too late...)

  • Michael Bissett

    Hey @Anton, you're welcome, glad to help! :slight_smile:

    So, yeah....I may need to reach out for help on the jobs board. Thanks for pointing that out!
    Not sure if I'll have any budget for this, though.... what's the usual rate someone would pay for this kind of work? I have no idea!

    That's really going to depend on the developer you hire, makes me thing of this comment over here (on a bit of a different topic, but still some useful info to consider):

    https://premium.wpmudev.org/forums/topic/whats-the-average-csot-to-develop-a-plugin#post-24289

    Kind Regards,
    Michael

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.