Membership plugin RC3

Hi all

Finally I am happy to announce the (hopefully final) release candidate for the membership plugin.

This version has a *lot* of changes and updates, and introduces a ton of new hooks and filters for developers to extend and customise the operation of it. In fact, there are so many that this post would be far to long if I where to list them all here, so I shall just go over the more pertinent things and will expand later on.

Table names


The plugin should take care of the renaming of the tables it uses as part of the upgrade, but in case it doesn’t you should rename the tables as follows:

wp_membership_levels becomes wp_m_membership_levels

wp_membership_news becomes wp_m_membership_news

wp_membership_relationships becomes wp_m_membership_relationships

wp_membership_rules becomes wp_m_membership_rules

wp_subscription_transaction becomes wp_m_subscription_transaction

wp_subscriptions becomes wp_m_subscriptions

wp_subscriptions_levels becomes wp_m_subscriptions_levels

You get the format by now :slight_smile: The name change was due to a conflict with another plugin using the subscriptions table name, so the addition of the m_ prefix should keep us out of trouble from this point onwards.

Gateways


I’ve added a “free” gateway to this version – which basically looks for subscriptions that don’t have prices assigned and allows users to sign up to them. This means that you can now have a free trial membership and a number of paid ones, etc.

Helper functions


More details on these in a later post / doc, but for theme and other plugins there are a few new functions that you can use to determine if a user is a member or on a particular level or subscription.

New rules


I’ve added some new rules for wp_nav menus and a capital P filter :slight_smile: as well as enhanced a few of the others.

404 override


This version will override the 404 page for non-logged in users with your no-access page, so make sure you put a message on that page that the content hasn’t been found because they are not members – remember that page is your main up-sell page for people that are following links to your site.

More


Lots more as well, including hopefully, a lot of bug fixes and issues resolved that we’ve been having with previous versions. Again, shout if I’ve missed anything or you find a problem.

The plugin is available from here:

https://premium.wpmudev.org/project/membership

  • webgroup
    • Flash Drive

    I’ve been testing out this plugin and am really liking it so far. However, my primary concern is being able to protect downloads. For example, if a user knows the direct location of the file, they will be able to download it.

    Do you plan on adding either htpasswd or new_rewrite to protect specific folders on where the actual download is located? Basically like aMember.

  • Barry
    • DEV MAN’s Mascot

    @webgroup at the moment no, though there is nothing stopping you adding a htaccess file to prevent direct access to that directory. The membership plugin access the file directly through the file system on your server and then serves the image / file via the plugin – so with the plugin enabled no one should need to access the image directly.

  • David Payne
    • Site Builder, Child of Zeus

    @Barry So I loaded the new membership plugin and I still have that blank list. So now for the frustrating part. Because I’m so naive when it comes to databases I’m really not sure where to go. I went to phpmyadmin to look at the names of my databases. I found again, as before, that all of the titles you mention in the introductory post for this thread don’t have numbers whereas all of mine do (e.g. you have wp_membership_levels becomes wp_m_membership_levels, wp_membership_news becomes wp_m_membership_news). When I look at my database tables they have titles such as wp_1_m_membership_levels and wp_1_m_membership_news.

    So here’s the first question… am I supposed to have numbers in there? And also, am I supposed to have a set of these tables for every blog or something like that?

    Now for the second part, after it goes past the first set, none of the tables have the new table title with the “m.” For example, the next set of tables I see follow the pattern as follows: wp_2_membership_levels and wp_2_membership_news, and so on.

    So now, assuming that I am supposed to have dozens upon dozens of these membership tables (there is a set for every number up through “34”:wink:, does this mean I need to go and change all of these dozens of tables to the new naming convention, essentially adding in the lone “m”?

    Thanks for your help in advance. Sorry for being such a “noob”

    Dave

  • Barry
    • DEV MAN’s Mascot

    @david – if you upgraded from wpmu then you should have the number 1 in the initial tables (if you started from wp or are using the plugin on standard wp then you’d not have the 1 in the main blogs tables.

    Now you have the tables renamed, in your case you need to remove the content of them that was in there when you had the table name conflict. So it may be worth going through each of your membership tables and removing all of the content and then starting with the plugin from scratch.

    With regards to the other table names – as soon as someone logs into each site the table names will be renamed for that site before the plugin continues.

  • Barry
    • DEV MAN’s Mascot

    @gsojourner – there certainly should – can you try removing the plugin completed (delete the entire directory if you can) and redownload and upload the latest version again.

    I removed all checks from this version of the plugin, so even though it’s not as slick, the buddypress rules should be available even if you don’t have it.

  • Artsblurt
    • Flash Drive

    This new version looks good. The free membership works well which was on of two features I need. I think my question might be similar to @leo:

    I have three membership levels and I only want the top level to be able to create blogs. Can I either restrict the lower level users from being able to see the My Sites option on the dashboard menu or provide a 404 no access if clicked on by these users?

    It seems to me to be a basic requirement missing from wordpress mu to restrict certain users from creating blogs whilst allowing others.

    Maybe I am missing something…?

    Dan

  • Artsblurt
    • Flash Drive

    Almost forgot…I am assuming the feature isn’t included because I can’t find it but please correct me if I am wrong.

    For the next version on the membership plugin it would be good to have the option to direct logged in users to a specific landing page, welcome page or members page where they can be given specific instruction or messages.

    There’s probably a more appropriate place to post this?

    Dan

  • David Payne
    • Site Builder, Child of Zeus

    @Barry So when you say as soon “as someone logs in to each site” I’m not quite sure what you mean. The problem is probably with the way that I’m seeing things. Let me explain. I have a single site called http://www.physicianassistanted.com. I don’t use the supporter plugin because I’m not interested in people developing blogs on their own. What I’m doing is creating a blog network with various themes. For example, I’ll create a blog for each medical specialty such as “Jackie’s Emergency Medicine Blog” or “Joel’s Travel & Wilderness Medicine Blog” and on and on. I may also have some special features blogs such as “Public Health Blog” or “PA Current Student Blog.” With each of these blogs I find a main author/administrator. What I was thinking the membership plugin would do is allow me to restrict content based upon the category structure you set up across the entire blog network. Is this the case? In other words, if I create the category “Supporter” for every blog in the network will the membership function recognize that across all blogs?… or will it just recognize this function for the main blog? Is this making sense? So when you mentioned “as someone logs in to each site” I got confused because for my site they would only log in once for the entire site, even though there are around 20 blogs thus far.

  • David Payne
    • Site Builder, Child of Zeus

    @Barry so I cleared the content from the “1” table set. I then went and checked out the membership administrative area and that long blank list was gone. I smiled. Then I went through the process of setting everything up again. When I got to the “Edit subscriptions” part I created a subscription, hit the add button and then now nothing shows up in the menu. This is despite a yellow box above confirming that the subscription was added.

    Would it be reasonable to uninstall the plugin, then delete all of the tables throughout the entire database, and then reinstall the plugin. Might that work?

  • David Payne
    • Site Builder, Child of Zeus

    @Barry I thought I was on to something with that last post, so I went and took out the membership.php and the membershipincludes folder which of course took away the membership functionality. Then I went and dropped all of the membership and subscription tables in the database. I then downloaded a new version of the membership plugin and installed as previously. I went back to the back end and the membership functionality was there. I went through the edit options section and saved changes. Then I went through and tried to create a membership level and when I saved, nothing showed up. So naturally I went back to the database to see if the tables were created and none of the tables were there. See what happens when a “noob” has too much power.

    So now for my questions… was I wrong to assume that reinstalling the plugin would recreate the tables? Is there anything I can do to easily recreate the tables or am I going to have to have my web host pull up a saved version of my entire site prior to my adventures in dropping them myself?

    Please help.

    Dave

  • Barry
    • DEV MAN’s Mascot

    @david have a look in the options table for that particular blog (wp_1_options) and remove any lines with a name of membership (I’m not at my computer at the moment, but I think there is one called membership-installed which is the key one).

    Once those are removed, it will create the tables again for you.

  • Barry
    • DEV MAN’s Mascot

    The default rules are in the file default.rules.php in the includes directory, the bp rules are in the default.bprules.php file in the plugins directory.

    Have a look at how they are structured (each rule extends a core rule class and overrides the methods it needs to do it’s job / present the admin interface).

  • Artsblurt
    • Flash Drive

    @Barry, thanks for the pointer. I think this may be a little beyond my current skill or coding knowledge.

    Has anyone written any new rules that do anything similar, either restricting URIs access or restricting blog creation for different membership levels?

    Not sure what else I can do

  • Barry
    • DEV MAN’s Mascot

    @ddtheme – the main reasons for the beta and RC releases is to try to iron out as many problems with the core membership code as possible, now we are getting very close to a stable core I can start adding in new rules and gateways ready for the full v1.0 release.

    An authorize.net is most definitely going to be developed, though I may shout for some testers for it as I have very little experience with that particular gateway (other than going through the api docs).

  • ddtheme
    • Site Builder, Child of Zeus

    @Barry Thank you so much for your reply and all the hard work put into this plugin. I’m new to using payment gateways myself but I am going to have to figure it out. So I would be more then willing to share any knowledge I obtain, as well as testing it with this plugin.

    I didn’t realize that this plugin was not fully released yet. Excited for the full v1.0 release.

  • Moonworks
    • Code Wrangler

    Is there a way to only show a part of the WP admin only to members of a certain level?

    I have a section where users can join a level to advertise their holiday cottages, and there is a section at the bottom of the create/edit post admin where they can add the days that are no longer available (see screenshot).

    This section is of no use to any other member level, and would look out of place being there, so it would be good to not show it at all to anybody else.

  • Barry
    • DEV MAN’s Mascot

    @wp3 the members levels aren’t loaded on the admin side of wordpress as the plugin is designed to protect content rather than functionality initially. If you have access to the plugeins code then you may be able to wrap the add meta box function with a membership helper function to check if they are either a member or a member of a specific level /subscription.

  • David Payne
    • Site Builder, Child of Zeus

    @Barry so I’ve now had a little bit of time to start working with the Membership Plugin and I have a question. It appears that the rules with the shortcodes and more tag can only be applied to the single blog with which one sets up the membership through. Is this correct? I was envisioning being able to utilize these rules across the entire blog network. Unlike many other sites, my community is not designed to be driven by people creating their own blogs. Rather, I generate themed blogs and then invite authors to contribute. For example, we have several medical specialty blogs… emergency medicine blog, public health blog, rural medicine blog. In conjunction with question number 1: how difficult would it be to create an add-on plug that allows one to utilize the “more” tag rule across an entire network. I would love for the free user to be able to see teaser content from every blog in the network without being able to see the entire posts.

  • David Payne
    • Site Builder, Child of Zeus

    @Barry: Membership Plugin Group Restriction Problem?

    One of my goals with the Membership plugin was to be able to restrict certain groups to members only. My first test was to restrict all groups to see what would happen for the "free user."

    When a free user clicks on the groups link in the nav bar, he sees pic #1 below. Essentially, he receives a message that "There were no groups found." What would be nice is if it actually showed the groups but showed that these groups were restricted to "members only." Furthermore, if clicking on the "All Groups" tab, every group will be displayed and there are options shown for joining the groups. If the free user clicks on "join group" he becomes a member of the group (see pic #2) below. Now, at this time he'll be really confused because even though he's a member of the group, he can not gain access. If he clicks on the link or icon to get into the group, he's shown a blank screen (I couldn't find anywhere in the plugin where I could provide a message to the user explaining that he was not eligible for access and therefore he should subscribe, does this function exist?)

    Is this what other users have been running into? Am I doing something wrong? I'm running WP3, BP1.5.2, and BlogsMu theme.

  • Artsblurt
    • Flash Drive

    I have worked out how to solve the issue of having free subscribers who can’t create new blogs and paid subscribers who can (and can only create a limited number of blogs).

    It involves a number of other plugins to do the job but absolutely no coding. It has not been at all straight forward to find the right working solution so I am happy to share, to help remove the pain for otheres if anyone is interested.

  • Tammy
    • Site Builder, Child of Zeus

    Hi there –

    I’ve a bit of a problem since upgrading to RC3 — my login box is invisible! I’ve been using the sidebar login plugin because I want users to land on the front end when they login, not the backend (my members are not bloggers — they’re subscribers to my content).

    Since I upgraded to RC3, there’s just blank white screen where the login box used to be, though when I view source, it’s clearly there.

    I’ve not futzed with css at all — the only difference seems to be RC3 upgrade.

    Too weird. Don’t have a clue what to do about it. Any ideas?

  • ddtheme
    • Site Builder, Child of Zeus

    @Barry

    I am trying to setup the membership plugin and want to temporarily disable it. The plugin doesn't fully disable when I select disable and I keep getting the following message on my pages. I have also try to deactivate it and it does work either. Please see attachment.

  • Artsblurt
    • Flash Drive

    @Barry

    The installation guide suggests creating a page with a ‘no access’ message and for potential up-selling. I can’t find a point at which this page can be referenced in any of the set-up options in the plugin. Any pages that are restricted for a membership level are given a standard 404 not found message.

    can you advise please?

  • swissroller
    • Flash Drive

    Artsblurt,

    I am interested in learning more about your solution for restricting access to blog creation functions to senior members of my site.

    We want to restrict blog building activity to Gold level membership and above. We also have free, silver and platinum membership levels.

    Like you I don’t want anyone to have the ability to build a blog on our network without having paid already and being a committed part of our community. Membership has it’s privileges…LOL !

    We are using Wishlist member which, by the way, solves almost all of the problems that folks are experiencing here.

    I’m very new to WPMU and appreciate any assistance I can get. In return I will offer whatever small insights or wisdom that I can, to this community.

    Thanks in advance to everyone here.

    Evelyne

  • Artsblurt
    • Flash Drive

    @swissroller @ddtheme

    Ref: restricting certain member levels from creating blogs and allowing others

    To bake this cake you will need:

    5 plugins:

    New Blog Default

    Limit Blogs per User

    Membership

    Peter’s login Redirect

    WP Hide Dashboard

    a) Find your New Blog Defaults under Super Admin. Set up the Role on Other Blog(s) as ‘contributor’

    and limit your blogs to however many/few you like. I am allowing each member to create one blog only at the moment.

    b) Set your registration setting (Super Admin > options) to ‘Logged in users may register new sites’.

    c) Create a welcome page (a landing page) to be re-directed to when users log in. Configure the new welcome page in Peters Login Redirect plugin for this page. This way whenever someone logs in you can give provide them with inforamtion relevant to their level, upsell, whatever

    d) Use the Membership level config to display a link to http://yoursite/wp-signup.php to the membership level subscribers that you want to be able to create blogs, using shortcodes in the welcome page.

    e) You also need to provide a link to the user profile (where they can also “potentially” access the dashboard to manage and create further sites, profile etc)

    This is how it works: New members of any level have a main site user role assigned to them which is not affected by the membership plugin (which is the simple and clever part of that plugin imo – other member plugins try to inetegrate with the user roles) i.e. any registered user will be given the default main site user role of ‘subscriber’. WP hide Dashboard plugin prevents a user (in the role of ‘subscriber’:wink: from seeing anything in the backend apart from their own profile information, so they can’t access ‘My sites’ on the dashboard and create one.

    Here’s the good part…your member level user who you allow to create blogs accesses the link to http://yoursite/wp-signup.php from the welcome page (remember you have only allowed certain member levels to see this link) to create their own blog (if a user is logged in they can create a blog using this front-end form). The user creates their intial blog and the New Blog Default settings you configured earlier re-assigns the main site user role of that user to ‘contributor’.

    Users with main site role other than ‘subscriber’ can access their own dashboard via a link to their profile, settings or dashboard and administer their blog(s). When they now login and land on their welcome page they can access the dashboard

    It’s not the most elegent of solutions and not as secure as I would like.

    Hope that makes sense. If not I am happy to clarify.

  • Nit3watch
    • Design Lord, Child of Thor

    @Barry my topic isn’t getting much attention, so maybe Im posting in the wrong place.

    I need to add a redirect or error msg if Negative rules are applied to a group. Because the group will still show up in newest widget or if they find it some other way, as for now it just shows a blank content area. Thus I’d rather have it redirect to a different page if the group isn’t viewable.

    couldn’t it just be ‘if’ nothing to show ( no groups to show ), ‘else’ show this, show a msg.

    Like with whats happening with Shortcode protected content.

    “No access message:

    This is the message that is displayed when the content protected by the shortcode can’t be shown.”

    even if I could use the same 404 replacement msg being used by “Protected content message” I’d be happy.

    Ive had a look and tried playing around in default-bprules.php but Im not getting anywhere.

    Could you please help me out?

  • gsojourner
    • Design Lord, Child of Thor

    How do I block the access to Activities and Members on the the Menu? I can keep non-members out of the Groups and Blogs but they still can see the Activities and Members. I set up a Free for people who are strangers to the website in the Membership “Edit Options” but if I log out and refresh as a stranger, I cannot accesss groups or blogs which is great. But I can seen the Activity stream and Members list.

    WP 3.0, BP 1.2.5.2 and Membership Plug in RC3.

    Thanks

  • swissroller
    • Flash Drive

    hi Artsblurt,

    thank you for your help. I appreciate this. I will try this straight away and report back.

    I am assuming that this function could also, in theory be used to limit access to other aspects of a site. eg: the ability to list goods in the store for instance.

    Anyway, it’s good to meet you and I look forward to hearing from you again.

    cheers,

    Evelyne

  • swissroller
    • Flash Drive

    Hi gsojourner,

    one of the challenges I am observing right across this thread is the need to protect different areas of the site from various levels of membership who you don’t want to let in there.

    Here is a possible solution !

    By building a membership site inside of your membership site using fantastico you can effectively regulate who sees what. I haven’t used this before on a site with a membership site plugin but Have used it effectively.

    Here is a link to a video that shows how to do this. Simply change the password system shown in the video to the WPMU members plugin and away you go.

    Here’s the link and yes it’s a primitive system BUT it works

    http://www.continuityblueprint.com/12minute.html

    Cheers,

    Evelyne

    PS This comes from a cheesey internet marketer so remember not to buy anything

  • Artsblurt
    • Flash Drive

    @swissroller.

    I put Peters Login Redirect and WP Hide Dashboard as standard wordpress plugins. I use Plugin Commander for fine grain control of who can use plugins across the entire site. It think it only works on any new blogs created from that point forward so you might have to test that out or read the guides (which I only do if I don’t know what it’s doing :wink:)

    Also, now that mu has been integrated into the standard wordpress package as of version 3.0 I am not sure if there will be an mu-plugins folder. I am just in the process of installing it for a new site now and will find out.

    Hope this all works for you

    @james – thanks for the points

  • Artsblurt
    • Flash Drive

    @wp3 – thanks for the pointer. I was also wondering what calendar/event system you are using that you refer to earlier in this thread.

    I am migrating a website from Drupal (I wont go into the reasons right now) and I want a event/booking system if possible.

  • Moonworks
    • Code Wrangler

    I’m using the Resource Booking and Availability Calendar. It is a free plugin available from http://cstart.blogspot.com/2010/05/ajax-booking-availability-calendar.html

    It is only good to use if you have only one booking for each day, but each post/page can have its own calendar.

    I looked all over the place for what I needed (a calendar to show availability of holiday cottages in the UK), and this was the only one that was free and was any good. It is actually better than many of the premium plugins.

  • Barry
    • DEV MAN’s Mascot

    @wp3 – A lot (the majority) of the premium plugins are very bad (especially when it comes to the UI).

    I did a lot of research a while ago in this area, as I will have a competitor due for release soon, and a lot of attention has been spent with the user interface / functionality. But that’s enough of my marketing :slight_smile:

  • Moonworks
    • Code Wrangler

    Good news that you are working on something.

    The great thing about the one above is the ability to have a seperate calendar on each post or page. This means I can have cottage owners easily show availability for each property.

    I’d be happy to be a beta monkey for you.

  • Barry
    • DEV MAN’s Mascot

    @david Payne – The buddypress rules are still a bit, well, weak – I’ve got some time scheduled to sit and go through buddypress and add in all the rules I can. At the moment though there is only so much I can restrict from the membership plugin as a lot of the buddypress functionality (such as the showing or not of the “Join group” button) just doesn’t have a filter or action that I can hook into and override.

    I’m adding an increasing number of helper functions to tap into the membership plugin functionality, but it’s looking very much like some of the more advanced functionality and restrictions on the buddypress side of things are going to need edits to the bp themes.

  • Barry
    • DEV MAN’s Mascot

    @artsblurt – no access page – create a standard page in your WordPress install, and then go to the membership options page and it should show in the drop down in the No access section.

    Select the page your just created and it will hide it from the site except when it needs to display it.

    ps. Good work on the blog creation limits :slight_smile:

  • swissroller
    • Flash Drive

    Hi Folks,

    we’re developing a model whereby seperate functions, as described, are distributed across two sites. One site being a WPMU install with the MU member plugin and the other plugins Arts blurb describes. The second site is a WP3 install using wishlist member plugin.

    NB: Wishlist member does not work on an MU install so save yourself some time and heartache. It does integrate beautifully with WP3….

    I digress.

    The principal is that by setting up restricted functions on the MU site and diverting traffic from there to the wp3 site we can then send them back to the MU for an upgraded blog. Both sites have the same URL except for an additional – in the domain name.

    Yes it’s long winded but it means that we get our traffic to behave the way that we want them to.

    I will report back once it’s all configured and may even ( perhaps ) include a process map for you all.

    TTFN,

    Evelyne

  • Barry
    • DEV MAN’s Mascot

    @arts blurt – it’s (they’re) a personal projects outside of my dev work here, but a beta is coming soon.

    Hopefully when it’s ready I’ll see if I can announce here or on wpmu.org, but feel free to follow my Twitter ( @caffeinatedb ) if you want :slight_smile:

    And now back to our regular scheduled programming.

  • Moonworks
    • Code Wrangler

    Barry, can you send me an email (as I can’t figure out how to send one on here, how to send a direct message on Twitter or find an email on your site – yes I’m useless this aftyernoon).

    I’d lke to speak to you about helping as a beta tester on your own project and also, as a thank you for great plugins, offer you a waived fee on one of our film festivals (I noticed you are an indie film maker).

    joe[AT]moonworks.tv

  • Barry
    • DEV MAN’s Mascot

    @Nit3watch- it’s a tricky one. From memory (and a quick look) you would need to add a empty check towards the end of the add_unviewable_groups function in the BP groups rule. If the group list is empty, then redirect to a page / display a message.

    Then you would need to hook into the no access page (e.g. line 246 of membershippublic.php), but this would depend on whether we are past the per_get_posts hook being called or not yet.

    Hmm, something to think about and certainly would need experimentation in order to see if you can override the page at that point and redirect to 404 (headers / heading may already have been sent).

  • Barry
    • DEV MAN’s Mascot

    @david – as long as you control the sites and can ensure the following :slight_smile:

    1. shortcodes will be common across blogs (not including the membership specific ones which will be).

    2. Categories will be common across blogs (name and id’s).

    3. Pages – this is the tricky one if you want to protect pages – but the id remaining the same for the No access page for all sites is crucial.

    All the other rules (except the posts one) will work fine as they are basically just a positive/negative thing (Ignoring the posts rule as we can control their access via the categories really).

    Right, so assuming the above, then open up the membership-config.php file in the membershipincludes/includes and change the setting:

    define( 'MEMBERSHIP_GLOBAL_TABLES', false);

    to

    define( 'MEMBERSHIP_GLOBAL_TABLES', true);

    Save then upload and activate the plugin sitewide – this will then share the main membership plugins tables across the whole install, and so rules and options will be common across all sites (hence the reason for ensure common id’s for the categories – which are still stored on a blog by blog basis).

    Note, it’s best to do this on a fresh install (or clear out the existing tables and options in the main blog options table beginning with M_).

    Hope that made sense, if not let me know and I’ll see if I can describe it better :slight_smile:

  • David Payne
    • Site Builder, Child of Zeus

    @Barry Just so I’m clear, when you say to activate the plugin sitewide, do you mean to go into each blog and enable it through the membership functions? This is what I’m assuming as the membership plugin is not listed in my plugin directory like many other plugins.

  • Nit3watch
    • Design Lord, Child of Thor

    @Barry, this is to the extent of my coding skills, any advice?

    function add_unviewable_groups($groups, $params) {

    $innergroups = $groups;

    foreach( (array) $innergroups as $key => $group ) {

    if(in_array($group->id, $this->data)) {

    unset($innergroups[$key]);

    $groups–;

    }

    }

    $groups = array();

    foreach( (array) $innergroups as $key => $group ) {

    $groups[] = $group;

    }

    if ( empty($groups) ) {

    echo ‘This is just one of many fabulous entries in the ‘;

    } else {

    return $groups;

    }

    }

    }

  • Barry
    • DEV MAN’s Mascot

    @david – do you mean the plugin isn’t listed in the plugins list (on plugins.php)?

    Have you installed it in the main plugins directory or mu-plugins? If the later then that’s fine you will get the same operation as though you had installed in the plugins directory and clicked on Activate Sitewide on the plugins page.

  • SteveOvens
    • New Recruit

    WPMU 3.01, BuddyPress Default Theme, Membership 1 RC3

    When I create posts / pages with short-code protected content, the content is protected correctly however for users at the right level, the shortcodes are displayed as well as the actual content.

    For example, if my text was

    here is some [member]protected[/member] content

    Then a “free” user sees:

    here is some content

    But a “member” user sees:

    here is some [member]protected[/member] content

    instead of:

    here is some protected content

    Assume this is a glitch

    Steve

  • Artsblurt
    • Flash Drive

    @steveovens

    You may have it set up slightly wrong. You can see the shortcode markup if you are an administrator or if you have not setup the membership level options correctly. I have it working for 4 different user levels successfully.

    Have you set this up as a negative or positive rules in your level options?

  • David Payne
    • Site Builder, Child of Zeus

    @Barry I gave it a shot and it doesn’t seem to be working for me. When going into the membership section for a different blog it has all of the settings the same except in the “Edit Options” section. So I can tell that it’s sharing the tables. However, once activated none of the rules are enforced. For example, a “stranger” can still see all of the content as well as the “Free User”. This is despite making sure that all of the edit options settings are identical as well.

  • David Payne
    • Site Builder, Child of Zeus

    @Barry

    Seeing as how the restrict groups thing is quite weak, is there a potential way to use the “private” setting for groups as a restriction setting? In other words, would there be an easy script to make “private” groups only accessible to members only, or something of that nature? I don’t know, just thinking out loud. I was super excited for this Membership plugin and as of yet I haven’t been able to make one thing that I wanted to do work adequately.

  • Barry
    • DEV MAN’s Mascot

    @david – the options are stored on a blog level (if I remember correctly), so you may have to set them on each blog.

    You are pushing the plugin quite hard in directions it wasn’t originally designed to go. I’m quite happy at that, as you’re both keeping me on my toes and spotting issues that others wouldn’t.

    I hate the BuddyPress integration side of things to be honest, I find it incredibly frustrating that more than half of the things I want to control aren’t pluggable or filterable or are hard coded into the themes.

    It’s looking at the moment like I’m going to have to introduce a rule to stop access to user entered urls in order to control some aspects (and maybe output caching some pages) – not as neat a solution as I’d hoped but at the moment, I can’t see any other approach.

  • Artsblurt
    • Flash Drive

    @Barry – I am wast using the latest version of Contact Form 7 (v2.3) http://wordpress.org/extend/plugins/contact-form-7/

    I decided to try Fast and Secure Contact Form http://wordpress.org/extend/plugins/si-contact-form/ which is a better plugin by the looks of it and integrates well with the Membership plugin. Effectively I don’t have the problem any more.

    I am on the last small bit before I go formally live with my site. I have updated the subscribe button for the paypal gateway without a hitch. The free subscriber gateway doesn’t seem to change the button when updated with a new image URL. I have updated the php code directly to use my own buttons but the alignment is slightly different from the other gateway button positioning.

  • David Payne
    • Site Builder, Child of Zeus

    @Barry Thanks for the response. For us, the business model has to be designed around creating a membership for networking. So the most important things for our website would be the ability to manipulate Buddypress functionality. Restricting the following would be sufficient to allow us to create a model that would be usable:

    1. Restricting the ability to join certain groups (of course this one we’ve already discussed)

    2. Restricting the ability to create groups (this one was interesting, I tried it with a test user who had access restricted and it allowed me to create a group, albeit I couldn’t view it afterward)

    3. Restricting the ability to send private messages (I saw that this function was available in the Supporter plugin. Would it be difficult to get this set up for membership as well?)

    4. Restricting the ability to view pages on the main blog (this one is taken care of it appears)

    Don’t get me wrong, the ability to restrict certain content on all blogs through the network would be great but this is not the most important issue from a business model standpoint for us. If we could have the four features above rock solid we could make it work until further plugins/options were developed down the road.

  • greenplanetfilms
    • Site Builder, Child of Zeus

    Hi,

    I’d like to create separate levels and subscriptions for individual posts (pay-per-view items). Is there any way to use selective shortcodes to create subscription forms that don’t include all possible items? For example, on a certain page I’d like to simply create a form allowing someone to subscribe to that particular item.

    TIA!

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    Pay-per-view is a little different (in my thinking) then a membership. If they have to pay for each post, then I think a separate shortcode would be required for each (one of the devs can possibly correct me on this?)

    You could use categories and have different shortcodes per category. Then only posts in a specific category would be available. This really isn’t “pay-per-view” but a subscription model. Doing a quick google search showed a couple plugins, but nothing in the WordPress repository and nothing recent that let’s you test it out without making a purchase.

  • greenplanetfilms
    • Site Builder, Child of Zeus

    Hi,

    Thanks for the reply. I don’t know if I explained myself well. I know that PPV is a different animal, however a subscription model would work here. For example, each item can be viewed for a week…so that’s essentially a one-week subscription to that item only.

    My problem is that this will result in a lot of subscription levels. I’m wondering if there’s any way to create a subscription form that only includes one level. That way, for a certain individual item, I can make it easy for people to subscribe to that item without having to see all the other items on the form.

    Thanks.

  • Moonworks
    • Code Wrangler

    I am no expert in this, but from testing out the plugin and reading what has been said, I think that the only way to do this on a per-post basis would be to have a seperate shortcode for each post.

    As you have said, this would involve a large number of shortcodes.

  • greenplanetfilms
    • Site Builder, Child of Zeus

    It would be fine to have a lot of shortcodes. However, I’m not sure how to use those shortcodes to create the custom subscription forms.

    Can someone enlighten me? Let’s say that I have a pay-per-view video called “Widget 1”. I’ll have an unprotected preview page/post for that video (which is visible even to strangers). That page/post will have a video preview, and a description of the video. Then, there would be a subscription form allowing people to “subscribe” to this item. But I only want the form to show this item…not all the other dozens of videos. I’m not sure how the per-post shortcodes would be used to create this abbreviated subscription form.

    I know that the plugin allows subscribing to a single item (e.g., a single post). I just don’t know how to make the subscription form manageable in that case. I’m just looking to offer a quick way to subscribe to a single item without having to wade through all the other items to do it.

    Any further enlightenment?

    Thanks.

  • greenplanetfilms
    • Site Builder, Child of Zeus

    To further clarify the above…I know how to create subscriptions to single items. But, for each of those items, I want to offer a subscription form that only lists that particular item. How can I create such a form?

    If it’s just a matter of shortcode syntax (for example something added to [subscriptionform] to limit that form instance to a single item), what is that syntax?

    Thanks!

  • David Payne
    • Site Builder, Child of Zeus

    @Barry I’ve got some great news!… hopefully

    Please refer to this post that you wrote: https://premium.wpmudev.org/forums/topic/membership-plugin-rc3#post-48702

    Originally when I did as you instructed I loaded everything into the mu-plugins folder. I then did a test using the “more tag” rule to see if it would work across multiple blogs. It didn’t… for whatever reason it behaved as if the additional blogs weren’t activating even though I enabled them. Tonight I decided to delete all of the tables from the database and start from scratch. Except this time I loaded it into the standard plugins folder and activated everything sitewide. This time when I activated the additional blogs, it worked! I will continue to work with this. So far I’ve only tested the “more tag” and not when using identical shortcodes. I’ll keep you abreast of my project!

    By the way, how difficult would it be to implement a “no private messages” rule? I’m just wondering because I know that this was developed for the supporter plugin. If this were something that could be relatively straightforward then at least the membership plugin would have some initial buddypress functionality prior to having to deal with all of the group mess.

    Thanks again for all you do!

  • David Payne
    • Site Builder, Child of Zeus

    @Barry So I’ve been playing around with the membership plugin again. I think I may have found an error. This is what has occurred when using the “more tag.” I initially set up the language “To enjoy the rest of this content, become a Supporter now.” Therefore, this was displayed to both strangers and what I set up to be “Free Users,” which is the default level for what a person becomes when they register for the site but do not purchase a paid subscription. Well, I decided I wanted to use the word “post” instead of “content.” So I went and changed this under “edit options” and retested. What I found was this… when a stranger goes back in, the update is not illustrated, the old language remains. However, when a registered user under the “Free User” default level logs in, they see the new language. Is there a chance that the stranger setting doesn’t recognize when changes are made?

  • Barry
    • DEV MAN’s Mascot

    @greenplanetfilms – it’s a tricky one. The only, workable, approach I can think of is having a lot of membership levels (one per item you want to protect) and a custom gateway that allows a user to be assigned to a level on payment on that page – it would require a level to be set up to protect a single post everytime a post is added though – which is still a lot of work.

  • Barry
    • DEV MAN’s Mascot

    @david – re: second post – can you post me a screenshot (or a screenr.com vid) – might help to clarify the problem in my head.

    re: first post – will have a look at the private messages functionality from supporter – should (fingers crossed) be easy to pull through as a membership rule.

  • greenplanetfilms
    • Site Builder, Child of Zeus

    Barry,

    It would be fine to set up a level for each pay-per-view item. All we need is a way to create a subscription form that doesn’t include all levels. So, on the information page for movie XYZ, we just need a subscription form that lets the user order subscription level XYZ. That’s all we need…if we could find a way to do that, this would work fine for our needs.

    Is there any way the plugin could be setup so that we could create such a form with a shortcode, e.g.:

    [subscriptionform level=xyz]

    ???

    Thanks.

  • David Payne
    • Site Builder, Child of Zeus

    @Barry Thanks for working on pulling in the private messages functionality from supporter, I can’t thank you enough!

    Turns out that the “more tag” issue I had told you about earlier fixed itself! It must have been some kind of caching issue and just needed some time to recognize the new settings.

    I have discovered something else however. I have set the “comments” to the negative rules. Registered users who are logged, but who are not subscribers, are restricted from seeing the comments, but they still have the ability to make comments. Furthermore, there is no language that pops up explaining to them that they are unable to see comments because “you must become a ‘insert member term of choice here’ to make comments.”

    Hope you’re having a great weekend!

  • gsojourner
    • Design Lord, Child of Thor

    Hopefully this is the right place to post this about the Membership plugin. It is probably not a problem with the plugin but any help for how to fix this would be helpful. I am getting the error message showing below. When I click on the the other Membership menu items they do not display correctly either. I removed and reloaded the plug in with the same results. Thanks

    Warning: fopen(/home/thislife/public_html/thelowcountrybusinessnetwork.com/wp-content/plugins/membership/membership.php) [function.fopen]: failed to open stream: No such file or directory in /home/thislife/public_html/thelowcountrybusinessnetwork.com/wp-includes/functions.php on line 4165

    Warning: fread(): supplied argument is not a valid stream resource in /home/thislife/public_html/thelowcountrybusinessnetwork.com/wp-includes/functions.php on line 4168

    Warning: fclose(): supplied argument is not a valid stream resource in /home/thislife/public_html/thelowcountrybusinessnetwork.com/wp-includes/functions.php on line 4171

  • Barry
    • DEV MAN’s Mascot

    @gsojourner – it’s suggesting that it can’t find the plugins file in the plugins/membership directory.

    Line 4165 of functions.php is an fopen command for the file, and the other two errors are related to the fopen failing.

    What path / directory do you have the plugin installed in?

  • greenplanetfilms
    • Site Builder, Child of Zeus

    Barry,

    Is there any way to do what we’ve been discussing…creating an instance of the subscription form that only includes a selected item or items?

    Forget that we’ve been talking about pay-per-view. That may have clouded the issue.

    In summary, we want to use the plugin’s ability to protect a single blog post. So let’s call that Post X. We want to give people a preview or teaser of Post X, then the ability to “subscribe” to the full post. But we want to make that easy for them. We want to have a simple form allowing them to subscribe to that item, without them having to sort through every other item we have.

    So we just need some way (shortcode?) to create a subscription form showing a certain item.

    Thanks!

  • gsojourner
    • Design Lord, Child of Thor

    I have some set up questions and I have been wrestling with this all night.

    I have set up a member level and in it I have placed Blogs in the positive area and checked off the blogs to be available to the member level

    I have not set up any subscriptions. I will be but not at this point till I get the level thing figured out.

    I activated the level and then went into my users and gave then the level.

    They still cannot open the blog after signing in.

    Am I missing something? I have gone through the Membership Installation instructions but I just can’t make it happen.

    They are at the subscriber role for the blog.

    I would appreciate any help as quickly as possible. Thanks

  • Barry
    • DEV MAN’s Mascot

    @greenplanetfilms – it would take a bit of coding in a membership based plugin to do it (not huge though) – I’m adding in more actions and hooks to the version in development to make level and subscription creation easier programatically, but it’s still possible with the existing version.

    Assuming the payment gives access to the post content forever (i.e. not time limited) then we don’t need to create a subscription per post only a level so effectively what we’d need to do is the following:

    1. Hook into new post creation and make a new level with access to this post id.

    2. Create a payment gateway that has a shortcode to display a “buy now” button and process the response IPN to add the level to the user on successful payment (and remove it on chargeback etc…:wink:.

  • Philip
    • New Recruit

    I’ve tried installing the membership plug-in for my WP 3.0.1 multisite configuration (subdirectories). I get this error when trying to run it:

    Parse error: syntax error, unexpected ‘}’ in /home/jvm2/public_html/wp-content/mu-plugins/membershipincludes/classes/class.subscription.php on line 38

    I’ve looked at the code of this function, and I can’t even see a ‘}’ on line 38…

    It breaks my whole (network of) site(s). Ouch.

  • David Payne
    • Site Builder, Child of Zeus

    @Barry So I just finished setting up the membership plugin. Quick question… I was under the assumption that once the user pays they would automatically be put into the respective Subscription level so they could access the restricted content right away. Is this not true? In other words, do we have to manually assign them to a subscription level once we’re emailed by Paypal that we’ve received payment? I used a test user account to sign up through the live Paypal gateway and I couldn’t access the restricted content. Additionally, if this is indeed the case, couldn’t the Paypal username, email, and password be different from the username and email being used for the website?

    Finally, again if this is the case. Then the user probably cannot cancel their subscription through the community site but has to do it direct with PayPal, is this correct?

  • rgkeenan
    • WPMU DEV Initiate

    Hi all..

    I have a question.. I have WordPress 3.01 (single site – not MS) Buddypress 1.2.5.2 installed and just installed membership RC3.

    I set up the plugin in the plugin directory (since its not MS there is no mu-plugins) and every thing seems to work except the [subscriptionform] does not seem to add an bp-xprofile information. It created the WP user just fine, however the added fields we have defined in buddypress–> profile field setup or any PB profile info for that matter is is no getting written to the requisite table.

    We have installed and reinstalled and some of the posts here seem to imply there should be BuddyPress specific Membership options (wasn’t the case in RC1).. Are we missing something.. ?

    Does this plugin support writing buddypress xprofile data upon signup?

    Has anyone successfully accomplish this?

    Are we missing something?

    Any help greatly appreciated.. it seems like a great plugin.. all we need is to secure some categories and a few specific pages.. if only the plugin would understand we need a buddypress registration

    Thank in advance..

  • Barry
    • DEV MAN’s Mascot

    It created the WP user just fine, however the added fields we have defined in buddypress–> profile field setup or any PB profile info for that matter is is no getting written to the requisite table.

    The plugin doesn’t create any buddypress profile fields on user creation at present. The current version (and more so in the version currently in development) allows the creation forms to be filter and extra fields displayed / processed – so theoretically the buddypress fields could be shown and added, but it doesn’t do that “out of the box”.

  • Shea Media
    • WPMU DEV Initiate

    Hi Barry,

    This version is running very cleanly for me on the members end. I have run into a small bug on administrative end. Before the update I was able to filter members by level or subscription. After update members are shown listed in full, but filtering returns a “no members found at this level” type message. Could there be a simple explanation. I had a fairly large number of members at the time of the update so filtering is desirable.

    Thanks again for all your hard work on this plugin.

    Evan

  • Barry
    • DEV MAN’s Mascot

    I was under the assumption that once the user pays they would automatically be put into the respective Subscription level so they could access the restricted content right away. Is this not true?

    PayPal sends back the IPN notification when payment is complete and the gateway will then assign the user the relevant subscription / level.

    In other words, do we have to manually assign them to a subscription level once we’re emailed by Paypal that we’ve received payment?

    Nope.

    I used a test user account to sign up through the live Paypal gateway and I couldn’t access the restricted content.

    Did the member get assigned a level in the Members list in the admin interface? Or did the notification show up in the dashboard news widget?

    Additionally, if this is indeed the case, couldn’t the Paypal username, email, and password be different from the username and email being used for the website?

    Yes, the details for the paypal account can be completely different from those the user picked for the website.

    Finally, again if this is the case. Then the user probably cannot cancel their subscription through the community site but has to do it direct with PayPal, is this correct?

    Yes, the subscription is cancelled at the PayPal subscriptions end – I’m looking into the API for PayPal to allow cancellation from the admin area – so this may allow the user to cancel in both locations.

  • David Payne
    • Site Builder, Child of Zeus

    @Barry The member did not get assigned a level in the Members list in the admin interface nor did the notification show up in the dashboard news widget. The only thing that would be different from my install versus most other users was the change I made to the membership-config.php file that you advised to in the attempt to restrict content across several blogs as opposed to just one

    To refresh your memory, this was the change I made:

    define( ‘MEMBERSHIP_GLOBAL_TABLES’, false);

    to

    define( ‘MEMBERSHIP_GLOBAL_TABLES’, true);

    Would this potentially interfere with a user being automatically entered into the system upon payment through Paypal?

  • Barry
    • DEV MAN’s Mascot

    @david – it shouldn’t do, no. Can you login to you PayPal account and check the following:

    Goto Profile -> IPN Preferences

    Click on the IPN history link near the top of that page.

    Have a look and see if there are any IPN attempts listed for your tests that may have failed.

  • Artsblurt
    • Flash Drive

    I have two problems:

    1. is a bug with the members dashboard. The graphical statistics are showing the correct information. The Member counts and Subscriptions only shows the single member I have moved from one level to another (it also counts that single member twice). I now have 23 members in total none of them showing up. I can see them all in the ‘edit members’ page

    2. is much more serious and is stopping me progressing. Every post that I have created and published since installing the membership plugin is broken, in firefox the page defaults to its ‘oops broken page’. I can only see the posts properly as an admin user.

    I am using shortcode filter only for most member levels and an additional category and page filter for non-members. I have use no post filtering

    Not sure what to do now…Have I missed something?

  • David Payne
    • Site Builder, Child of Zeus

    @Barry It appears that the IPN settings weren’t even set up. When I went to where you told me to go it had a description of what IPN is all about and then it stated toward the bottom:

    “To start or stop receiving IPN messages and to decide where to send them, click the Choose IPN Settings button.”

    Then it says, “To start receiving IPN messages, enter the notification URL and select Receive IPN messages below. To temporarily stop receiving IPN messages, select Do not receive IPN messages below. PayPal continues to generate and store IPN messages until you select Receive IPN messages again (or turn off IPN).”

    What do I need to put in for the “notification URL?”

    Thanks for your help on this, it’s much appreciated!

  • Barry
    • DEV MAN’s Mascot

    @david Payne – it doesn’t have to be enabled, as when the plugin generates the payment button, it includes a hidden form field specifically to tell PayPal to return an IPN anyway, regardless of that setting.

    There should still be a history link on that page somewhere though, to show any that it has sent.

    If not, then have a look at the page on your site that displays the Subscribe buttons, if you view the source of that page you should see a few paypal forms on it – have a look for a fields called somthing like “return-notification” (can’t remember off the top of my head) and let me know what the value of it is.

  • Artsblurt
    • Flash Drive

    @Barry – any idea why I might be getting the problem with disrupted posts that have been published after the membership plugin was installed.

    I have disabled the plugin and the posts are fine. They are also ok when I am viewing as an admin user.

    Help needed – I am stuck

    Thanks

  • Barry
    • DEV MAN’s Mascot

    @artsblurt

    2. is much more serious and is stopping me progressing. Every post that I have created and published since installing the membership plugin is broken, in firefox the page defaults to its ‘oops broken page’. I can only see the posts properly as an admin user.

    That is a bit strange, and I haven’t encountered / seen that before – do you have URL that I can look at?

  • David Payne
    • Site Builder, Child of Zeus

    @Barry

    can you have a look in the forms on your subscriptions (payment) page and see what the notification url is set to?

    Not sure if this is what you were looking for… but I went to view source on the subscription page and within the post-content div I found this:

    <input type=”hidden” name=”notify_url” value=”http://physicianassistanted.com/paymentreturn/paypalexpress”>

  • Artsblurt
    • Flash Drive

    I need to move ahead with this – has anyone got any idea what might be going on with my posts being corrupted by the membership plugin (see above postings)? I am fairly sure it the plugin causing the problem. If I deactivate it there are no issues. If I am an admin user there are no issues, and it only affects posts that have been created after the membership install. It is possible that there is a compatibility issue with my theme – I don’t know

    This plugin is so very near to providing what I need. I really want this to work. Any help greatly appreciated

    Thanks

  • Barry
    • DEV MAN’s Mascot

    @david Payne – yep that’s right, but on going to it I get directed to your site, so it looks like the rewrites aren’t working. Can you go to the permlinks page (in the Settings menu) and re-submit the form there.

    Then visit the url you found above – if it’s accepting IPNs properly, then visiting the URL in the browser should give you the message:

    Error: Missing POST variables. Identification is not possible.

  • David Payne
    • Site Builder, Child of Zeus

    @Barry

    Can you go to the permalinks page (in the Settings menu) and re-submit the form there.

    I’m not sure exactly what you mean here. Do you mean to just go and click on the “save changes” button again? Or do I need to change the settings of the permalinks?

    Just so you know, I clicked on the “save changes” button without changing anything. I then went to the url above and I saw my website with the header and sidebar along with the comment… “Sorry, we can’t find the content you’re looking for at this URL. Please try selecting a menu item from above or to the side of this message to get where you’d like to go.”

    I’m assuming this is not what we were looking for.

  • AquaPebble
    • The Incredible Code Injector

    I had a problem with membership plugin making my custom menu’s disappear and when one was logged out messed up my theme layout. I posted this problem about 2 weeks back under the theme section, but it definitely seems to be the plugin. As soon as I add rules to the membership level that limits the view of pages on my menu the menu items disappear, just a blank menu bar is seen.

    Here is the thread with screen shots and more details:

    https://premium.wpmudev.org/forums/topic/bp-daily-guest-display?replies=33#post-51950

  • Barry
    • DEV MAN’s Mascot

    @david Payne – by visiting the Settings -> Permalinks page in your sites admin panel (the clicking the save button is just an extra, unneeded step) – it should create / recreate the permalinks and should (have) added in the ipn settings for your site.

    If you are being directed to a wp not found page, then it isn’t or hasn’t added in the required new parts.

    Ok, can you have a look in the wp_options (or whatever the prefix is for your blog) in the database for an option with the name rewrite_rules – copy and paste the value into a text file and upload it here – it will be a fairly big chunk of text – and I’ll see if a) it’s added it in or not and b) if it’s added, there might be a rule which overrides it earlier on.

    Thanks

    Barry

  • Kenneth Henderson
    • WPMU DEV Initiate

    Just downloaded the latest version…

    [subscriptionform] is NOT working. My subscription page is showing nothing.

    I have the plugin enabled, subscriptions created, subscription page created with [subscriptionform] added. But when I view the page… the form is not showing up.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.