Membership 1.1 beta

Hi gang

Attached to this post is the initial v1.1 beta version of the membership plugin. It has some nice new functionality included, some more radical changes to functionality and some bug fixes. It doesn't have the full feature set I want to get into the v1.1 release - but as a bit of the plugins behaviour has changed, I thought it wise to get some feedback on that.

Changed functionality:
1. The plugin will now work with supporter and non-"admin" users. It detects who initially activates the plugin on a site and will give them permissions to administer the plugin. If you do not want this behaviour to occur - then add the following line to you wp-config.php file:
define( 'MEMBERSHIP_SETACTIVATORAS_ADMIN', 'no');

2. Persistent configuration - you can now add configuration defines in your wp-config.php file so that they will persist after updates.

3. No Access page now redirects - rather than replacing a pages content with the no access message, it will now redirect to the no access page - in my opinion this is nicer behaviour and more search engine friendly.

4. URL Groups settings and rule - this is the most powerful rule in the new membership plugin. It allows you enter individual urls or regular expressions that you want to allow (or restrict) access to - even BuddyPress pages.

5. Getting started steps - A new helpful little box on the Membership admin dashboard to guide you through the set up.

I've got some more special bits and pieces to go in the final version (some you may find hints at in this version) but do let me know what you think so far.

  • DavidM
    • DEV MAN’s Mascot

    Wow! I can't believe you just took the thought right out of my head with the number 4 item! I was working through the Buddypress Page rules with a member and realized a URL access rule would work perfectly! I'll give it a try right now!

    Thanks,
    David

  • DavidM
    • DEV MAN’s Mascot

    Absolutely beautiful! I just overwrote the previous version and it was perfectly seamless. Created a Buddypress URL Group and applied it to the Visitor level in my test rig and it worked perfectly!

    For anyone interested, the following works for restricting access to Buddypress pages (but could perhaps use a bit more refinement).

    Navigate to Membership > Edit URL Groups.
    Call the Group name "Buddypress" (or whatever else you might want).

    Enter the following for Page URLs:

    domain.com/activity/.*
    domain.com/groups/.*
    domain.com/members/.*

    From the Regular Expression drop-down, select "Yes".

    Press the Update group button.

    Navigate to Edit Levels. Select the level you'd like this rule to apply to. Then drag and drop the URL Group rule where you'd like it (likely in the Negative rules area) and select the new Buddypress item and press Update.

    Thanks again Barry! This thing is amazing!

    [EDIT: Had some troubles getting the regex to display initially. Just adjusted all the urls for clarity]

    Cheers,
    David

  • J.
    • WPMU DEV Initiate

    Great stuff Barry!

    At the moment with the Membership plugin you are able to give
    the stranger signups a default role.

    But could you make it so that when a user upgrades to Supporter,
    you also are able to select a Membership level voor the Supporter role.
    So that it will automatically upgrade the Membership level too,
    witch will enable a lot of features automatically!
    Would really let the Membership and Supporter plugin work together!

    Great number 4 indeed!

    Keep up the good work!

    Cheerio!

  • Barry
    • DEV MAN’s Mascot

    But could you make it so that when a user upgrades to Supporter

    The difficulty is knowing which user to upgrade - supporter is a blog/site level thing and membership is user level - at the moment there is no easy way within WordPress to know which is the "main" user or "owner" of the site - but any suggestions are more than welcome.

  • J.
    • WPMU DEV Initiate

    At the moment on the membership options page you can define the 'Stranger settings'.
    There you can select 1 membership level that you have created.

    The same thing I would like with Supporter. So let's say now theres the following optionspage of membership plugin:

    ==========================================================
    Stranger settings

    A "stranger" is a visitor to your website who is either not logged in, or does not have an active membership or subscription to your website.

    Use membership level : Dropdown list with your created membership levels, where you can just select one of them to assign automatically to the 'Stranger Role'.
    ==========================================================
    Then add this underneath it:
    ==========================================================
    Supporter settings

    A "Supporter" is an upgrade for your website for someone who want's premium features.
    Would you like to automatically add a Membership Level to this 'Supporter':

    Use membership level : Dropdown list with your created membership levels, where you can just select one of them to assign automatically to the 'Supporter Role'.

    =====================================================

    So I would say, a code like something like this:

    if (is_supporter()) get userrole from Supporter settings page.
    It's not really that it has to be a user, just when an account is upgraded to supporter level
    it just select that membership role we defined on the Membership Options >> Supporter Settings page created above.

    What you think?

  • invasion
    • New Recruit

    I didn't really like the membership plugin and I'm now using tipsandtricks-hq.com plugins which provides everything I wanted and more. I'm using estore, emember, and affiliates which all work flawlessly together. wpmudev should take notes. :]

  • lightbeam
    • Design Lord, Child of Thor

    Just getting into Membership and testing the released version not beta, but had these two suggestions:

    1) Clone on membership level didn't seem to work, all it cloned was the title

    2) It would be very helpful to be able to "Add All" of the options on the right of the screen with one click. One click per section would be nice also.

    I'm just setting up two levels, very simple and I wanted to allow some stuff for the first and everything for the third, but I saw no way to add everything besides dragging each bar over one by one which is a tad time consuming and annoying.

    Great work though! I look forward to the new version once I've gotten a handle on the release one!

    Best Regards,

    Justin

  • UNIIMI
    • The Incredible Code Injector

    Great plugin!

    Running a Multisite with BuddyPress 1.2.7 and Membership 1.1 Beta on WP 3.0.5. Theme: Blogs.MU.

    From the Edit Members page I'm trying to filter by level or by subscription.Maybe I'm doing something wrong here but I can't figure it out.

    I select a subscription and click filter and - no users found. I select a level and click filter and - no usrs found.

    Also, perhaps for a future release, it would be awesome if one could filter by membership status as well (active/inactive).

  • UNIIMI
    • The Incredible Code Injector

    FYI:

    Running a Multisite with BuddyPress 1.2.7 on WP 3.0.5

    Activated plugins: BuddyPress, Automessage, BackWPup, Fast Secure Contact Form, Google Analytics, MarketPress, New Blog Templates, WPMU Dev Update Notifications, Anti-Splog, Popover, and Supporter

    When I upgrade to Membership 1.1 beta I get WSOD.

    Troubleshooting:
    Restored database from backup
    Deactivated everything
    Reactivated BuddyPress first, fine
    BuddyPress and Membership 1.1 beta - WSOD
    Reactivated one-by-one without Membership 1.1 beta, fine
    Checked error log, nothing to report

    It is definitely Membership 1.1 beta causing WSOD.

  • Justin
    • New Recruit

    Could we get it so we can use URL groups on both positive and negative in the same rule?

    That way I can block say domain.com/media/ but show domain.com/media/something-non-private/

    Right now with regular expressions enabled it's just blocking everything that has /media/ in it.

  • UNIIMI
    • The Incredible Code Injector

    It is definitely Membership 1.1 beta causing WSOD.

    After all this I uploaded the old Membership files and everything worked fine and last night I uploaded the 1.1 files again and the Plugin seems to be working fine now.

  • klagreca
    • WPMU DEV Initiate

    I'm testing with WP 3.0.5. Created a simple member, non-member levels. Non-member has one negative rule, deny access to "test page." Associated non-member with stranger user.

    In testing, it doesn't deny access to the page. The "more" tag works in denying access after the more tag, but not the negative page rule to deny access to the entire page.

    Checked, made sure all the appropriate member settings are correct, active.

  • Pete T
    • Site Builder, Child of Zeus

    I have a similarly strange problem.

    I've been working on this for days now on a Wordpress Multisite test site. I have Buddypress 1.2.8 and Membership Premium 1.05 installed and they are the only plugins active. I also have the Buddypress default 1.2.7 theme activated.

    I made a membership level called "no-access" and chose it as the default membership level for "Stangers" accessing the site. I added "Buddypress pages" to the negative rule and checked all pages (groups, activity, etc).

    I also made a default subscription.

    I enabled the membership plugin, activated the no-access level, and my default subscription.

    When I navigate to the test site as a stranger in Firefox, all Buddypress pages are visible and accessible. I can protect actual wordpress pages (by adding them to a negative rule in the "no-access" level) without any problem but not Buddypress pages.

    So today, I saw that the Membership 1.1 beta was available so I installed it (overwriting current version) and gave it a whirl. I added a URL group for buddypress and put in the URLs to http://mydomain.com/groups, http://mydomain.com/members, and http://mydomain.com/activity. At first, it seemed to work although when navigating to a buddypress page (from the URL) I got a blank white page (sorry forgot to view HTML and see what's up). I then set the Protected content page redirect to my "Home" page (which is a static front page) and as a result all buddypress pages were again visible. At this point, I decided to set the stanger settings to "None - No access to pages" and when I navigated to a buddypress page Firefox reported a redirect error. Surely the site was getting stuck in a redirect loop (which was a good sign that it was working again). I went back into the Protected content page redirect and set the page to a static page called "login." Now everything works as expected. I also removed the URL group from the "no-access" negative rules and left just the buddypress negative page rules in there.

    After performing the above steps, I can now set the stranger access to my "no-access" level and it appears to work as intended. But I had to go through the rigmarole of the above before it worked. It almost seems like the settings are not saving properly unless you go through specific steps in a specific order. Or my membership settings are screwed somehow from the upgrade process or other issues. I have been tinkering with various buddypress plugins and the membership invite code plugins but have since deactivated all for testing.

    Is there something I need to know as far as which order to activate levels and subscriptions, or set options? What is the best way for me to purge the existing membership plugin tables and options and start over?

    BTW, I was using the free membership 1.02 plugin for months now on another site so I guess I have some idea of intended functionality.

    Thanks!

    P.S. Sorry for the long post, I didn't have time to write a short one!

  • Pete T
    • Site Builder, Child of Zeus

    @Barry - Yes I can. I just created a "No Access Test" page and set it in the "Protected content page" settings in Membership. When I try to navigate to the Buddypress pages it redirects to "No Access Test" as expected. Everything appears to work as intended after that initial "glitch."

  • Pete T
    • Site Builder, Child of Zeus

    @Barry - I'm on to something here. When trying to replicate the issue I think I stumbled upon the problem. It seems that if you have pages whose slugs are "activity," "members," etc the same at Buddypress slugs, the Membership plugin breaks. Try creating some pages with those slugs. Now setup your no-access membership level with the negative rules "Buddypress pages" with all pages selected and use that level as your default stranger access. If you draft the pages created above, Membership behaves as intended. But if you publish them, it breaks. Seems like this could be a potential security issue since if you have any authors on your site with the ability to change page slugs or publish new pages, they could maliciously or inadvertently change a page slug to any of the buddypress slugs and open the site.

    For grins, I also tried adding the those created pages as a negative rule in addition to the BP pages to see if they would be locked. Turns out it had no effect.

    Hope this info helps!

  • vibhutijaya
    • New Recruit

    Man, I'm glad Barry's posts are on here. I'm psyched about the beta, yet reluctant because of the serious roadblock I've encoutered. New user to WPMUDEV. I joined for the purpose of outfitting my site: WP 3.1 , BuddyPress 1.2.8 , using theme Jukt Micronics (BuddyPress BuddyPack) 1.2 with the capability to hide most BuddyPress content (i.e. GROUPS, MEMBERS, ACTIVITY, FORUMS, etc.) from the prying eyes of strangers. I have been back and forth with trying to make sense of why things are generally being shielded from the view of my logged in users regardless of what membership level, subscription or Membership Options--> Stranger setting I choose. I have broken every conceivable rule of troubleshooting in the last 24 hours of my angst and I am really hoping for someone to respond who can direct me quickly. Time is of the essence, of course.

    What I hope to accomplish is not complex. I need only to distinguish between authenticated users, who will have access to BuddyPress in its entire functionality as a "social network" and strangers, who will essentially see only minimal informational content, but remain locked out. This is an invitation only site that does not need to recruit new members via its web presence. My authenticated users don't necessarily even need to be able to create new blog posts, they just need to be able to interact using BuddyPress. The main reason for installing Membership is to privatize the site and to give the client an opportunity to scale towards paid renewals when their membership's one year intro period concludes.

    I think this plugin is brilliant, but for whatever reason, the drag-and drop aspect of the screen that determines the positive and negative rules that impact the membership levels is either:

    1. Not really working as stated (i.e. posts that confirm "cloning" has been a culprit of sorts)
    2. Beyond my comprehension

    I am however, humble and teachable and eager to transform this experience from epic failure to success. Anyone who can offer expert guidance (and some more detailed or updated support / install docs, the screen shot in the current documentation says 1.0 RC1?)

    What in the world do I do next? Thanks in advance.

    --VJ

  • Barry
    • DEV MAN’s Mascot

    HI VJ
    The screenshot is from an older version yep, but the screens haven't really changed much since then.

    You should be able to set up a level with a negative rule that limits access to the buddypress pages (maybe using a URL group with the settings David highlighted a few posts up) and set that as your stranger level.

    Normal members can have their own level, which doesn't really need much in it, so could just have a positive rule giving them access to the same URL group.

    Assign the members level to a subscription for your members to sign up to and as long as you have your subscription page and no access pages set up you should be good to go.

  • vibhutijaya
    • New Recruit

    Barry, I'm so relieved to have gotten your fast, fast response. Would you be willing to take a peek at it? If so, you can hit me via e-mail. The address is my username here on this forum @gmail. I'm wondering if there's any way that the theme I've chosen could have introduced some incompatibilities.

    Is that possible?

    While I am waiting to hear from you again, I will test with a default theme and see...

    QUESTIONS:

    Can I just choose Edit Options--> Choose Membership Level: None-No Access...

    and then have only two memberships for my users (which I am establishing accounts for myself, and I intend to pre-populate them into their respective initial groups as well).

    My memberships are:

    Introductory
    VIP

    Intro should have access to everything but the ability to create blog posts
    VIP should have access to the known universe

    I just don't want my members, groups or other "social networking" content visible from outside the login. Seems like a simple requirement, right?

    For now, members will not even self-register, this first user group will simply be testing so they are getting to participate free. But I do have registration all set up, and I actually used it as the mechanism through which I created the existing users.

    I left the box marked Enable incomplete signup accounts checked throughout that process.

    I sure could use a hand figuring this out.

    What you suggested above regarding URL groups, is that a function of the beta version you posted in .zip here, or does that functionality exist in production too?

    Thanks in advance for your support. You rock.

    --VJ

  • UNIIMI
    • The Incredible Code Injector

    I'm running a multi site with WP 3.1, BP 1.2.8 and Membership 1.1 beta

    It seems like there is something weird happening with Membership 1.1 and WP 3.1. If I remember correctly, with Membership 1.0.5 if I left rule options in the right column and did not put them in either positive or negative then that content is not affected by the Membership plugin but now it seems that some content gets blocked unless I put it in the positive rules. That is a pain!

    Biggest problem right now is that the Membership plugin is preventing strangers from seeing content that they are supposed to be able to see.

    If you go to uniimi.com and search for, let's say, digifoto and then click the resulting link http://uniimi.com/artists/digifoto/ it takes you to a page that asks you to create an account.

  • UNIIMI
    • The Incredible Code Injector

    Level 1 -

    Positive Rules -
    -Private Messaging
    -BuddyPress Pages (All selected)

    Negative Rules -
    -Group Creation
    -Blog Creation
    -Main Menu (all but Users)
    -Sub Menu (all but Your Profile)
    -Plugins (all selected)
    -Favorite Actions (all selected)

    Level 2 -

    Positive Rules -
    -Blog Creation (1 blog)
    -Private Messaging
    -BuddyPress Pages (All selected)

    Negative Rules -
    -Group Creation
    -Main Menu (Membership, Plugins, Tools, Automessage)
    -Sub Menu (Membership, Plugins, Tools, Automessage)
    -Plugins (All selected)

    Strangers set to Level 1
    -Cannot see users profiles - why?

  • Barry
    • DEV MAN’s Mascot

    @UNIIMI - thanks - what do you have set for the rest of the options though :slight_smile: (edit options on the membership menu).

    If you can do a screenshot (or two it's a long form) and post them, that would be great (png format is best for clarity of the text).

  • CreativeZen
    • New Recruit

    Hi guys,

    I'm wondering how to integrate the signup form with Gravity forms. Essentially I want to use a gravity form to control the sign up page for the Membership plugin. How can I go about that?

    I've added the Gravity forms shortcode plugin, but can't see how this helps my dillema.

    I'd appreciate a steer on this.

    thanks

  • dseason
    • Flash Drive

    Hi Barry,

    I'm trying to use URL groups to deny access to /login?action=profile for strangers and it does not appear to be working. I followed David's guide above. Is this something that the stranger group will not be able to benefit from?

  • Barry
    • DEV MAN’s Mascot

    I'm trying to use URL groups to deny access to /login?action=profile for strangers and it does not appear to be working.

    Can you try the URL group with the Strip query strings from URL set to Yes and the query string removed from the url you are trying to restrict to check it is detecting the /login part?

  • georgef
    • The Incredible Code Injector

    I've activated the plugin in a subblog as a member, not super admin.

    The membership admin area does not appear.

    In a previous version you had to manually set that, but according to this no more:

    1. The plugin will now work with supporter and non-"admin" users. It detects who initially activates the plugin on a site and will give them permissions to administer the plugin. If you do not want this behaviour to occur - then add the following line to you wp-config.php file:
    define( 'MEMBERSHIP_SETACTIVATORAS_ADMIN', 'no');

    I cant seem to find that setting in wp 3.1. Just checking if I'm missing something?

    EDIT: All sorted! logged out and in and its there now.

  • georgef
    • The Incredible Code Injector

    I had this problem last time round...

    If a user activates the plugin on a subblog to create their own membership site (and I have Buddypress installed), the user still has access to restrict buddypress features from the main site.

    Is there a way to restrict that?

  • dseason
    • Flash Drive

    Hi Barry,

    For now I have:

    ($_SERVER['REQUEST_URI'] == '/login?action=profile') ? (!is_user_logged_in()) ? wp_redirect("/login") : null : null;

    sitting in the header, but if I could get membership URL groups to work that would be great.

  • transparencia
    • Design Lord, Child of Thor

    Hi Barry!

    I just noticed that the Download Protection is not working using WP 3.1 in MU mode in my users blog. I have a Free user level with negative acess to a Premium download group called "premium". The "stranger" is set to the Free user level.

    My original url is:
    http//user.mynetwork.com/files

    My masked URL:
    http//user.mynetwork.com/downloads

    In the media manager, when I set the file to the "premium" Protected Content Group and insert into post. The url of the file actually reads:

    http//user.mynetwork.com/files/2011/04/file.zip

    If I try to manually use

    http//user.mynetwork.com/downloads/file.zip

    It shows a 404 error!

    Any suggestions?

  • Aaron
    • CTO

    dseason, you would need to add something like this to your functions.php:

    add_action('template_redirect', 'block_login');
    function block_login() {
    if ($_SERVER['REQUEST_URI'] == '/login?action=profile') {
       if (!is_user_logged_in()) {
        wp_redirect("/login");
        exit;
       }
      }
    }

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.