Code Monkey home page Code Monkey logo

Comments (6)

 avatar commented on July 20, 2024

Hi, there. When this is setup correctly checks of which membership level a user has will check the DB of the main site. You still need to lock down content on the subsite per level using custom code or by checking levels for "require membership" on pages/etc.

You can add code like this somewhere in the subsite to lock the entire site down:
http://www.paidmembershipspro.com/2011/11/lock-down-everything-but-homepage-for-non-users/

from pmpro-network-subsite.

mentolnet avatar mentolnet commented on July 20, 2024

Hi there, again. So i can use this plugin in conjunction with strangerstudios/pmpro-network to let users create subsites AND give different levels of user access to the created subsites, depending on the type of subscription the user purchased.
Is this correct?

from pmpro-network-subsite.

twicealive avatar twicealive commented on July 20, 2024

@mentolnet

Hello,

The plugins you mentioned can be used together. This plugin doesn't grant user access to sites. You can hide and reveal content on a subsite based on the membership level that a user has on the main site.

That is, users who purchase a membership on your main site will not be enabled to login to one another's subsites merely as function of this plugin.

from pmpro-network-subsite.

fabiobfava avatar fabiobfava commented on July 20, 2024

Hi Jason & Kim! I have one doubt:

When you say to "Make sure that the constant PMPRO_NETWORK_MAIN_DB_PREFIX is properly defined for your main network site in your wp-config.php file", you mean I should add the line to my wp-config.php file?

define('PMPRO_NETWORK_MAIN_DB_PREFIX', 'wp');

Finally, at the end of this line, should I keep 'wp' or change to 'my_db_prefix_' instead? This is not very clear on the Add-On page and I want to implement this on my site (have forums, courses, woocommerce store, on subsites, so I can leverage the whole multisite).

Would you mind to clear that before I can proceed?

Thank you very much and best regards (your software is awesome)!

from pmpro-network-subsite.

ideadude avatar ideadude commented on July 20, 2024

@fabiobfava on this line of your wp-config.php file you'll have your db prefix defined:
https://github.com/WordPress/WordPress/blob/master/wp-config-sample.php#L66

The main DB prefix is usually the same as this (although confusingly, our variable excludes the _ and the WP one includes it). So if your wp-config.php file says "wp_", then you should keep our constant defined as "wp".

That should work. As an added confusion, the "main" site on a network setup usually has the base DB prefix (wp_), but might have been changed to another subsite on the network which has a number in the prefix... so something like (wp_2_ or wp_3_, etc).

from pmpro-network-subsite.

ideadude avatar ideadude commented on July 20, 2024

We've updated our docs over here:
https://www.paidmembershipspro.com/add-ons/pmpro-network-membership/

I'm going to close this issue, but if someone has a specific question still. Feel free to ask. We are trying to improve the documentation and plugin to make this all easier to understand. It's confusing, even for us.

from pmpro-network-subsite.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.