modifying registration form & blog creation

Hi, I'm currently using the 2.1 beta 2 version of the Membership plugin

A couple of questions:

1. Is it possible to make changes to the registration form without hacking the core file? (registration.form.php) Perhaps similar to the way child themes work. I would like to make some changes but don't want to have them overwritten with future changes.

2. I have a bit of a dilemma regarding blog/site creation. If "Logged in users may register new sites" is turned OFF on my multisite installation settings, then no user can create a new blog. I do want however, certain users to be able to create sites. So this must stay on for now.

Under the membership plugin options, I also want “Enable incomplete signup accounts” ON. This is so that after a user creates an account, but accidentally navigates away from the form for any reason, they just need to login to the site visit the subscription page, and select a subscription. If “enable incomplete signup accounts” is turned off, and they don’t choose a plan for whatever reason, come back later, they are locked out and will get the “account is not active message” on the wp login screen. Not only that, but they can’t sign up again using their email address on the registration form because their email is already in use. So this must also stay ON, or we might lose potential members.

The downfall to having the combination of "logged in users may register new sites" and "enable incomplete signup accounts" is that now any user can simply sign up, NOT select a subscription and go ahead and sign up for a site/blog. Not exactly ideal, as the membership level should determine who can get a site. For example on a "pro" level, I have an associated role, and I want JUST that WP role to be able to create a new. I'm using the "blog creation" rule in the positive area to achieve this.

Am I overlooking something? Could the membership plugin somehow determine the site creation, rather than WP?

  • Steven
    • Site Builder, Child of Zeus

    Ok I solved my #2. I completely forgot about the "stranger" setting. Now anyone that doesn't have a subscription is added to the "visitor" level, which has the blog creation rule in the negative section. Job done. Any ideas on making easy edits to the form?

  • DavidM
    • DEV MAN’s Mascot

    Hi Andrew,

    The registration form is actually separated into two parts, the initial registration form and the subscription form. The subscription form is handled through the following:
    membership/membershipincludes/includes/subscription.form.php

    In that file you'll see the following actions you can tie into to make things simpler:

    membership_subscription_form_before_subscriptions
    membership_subscription_form_before_paid_subscriptions
    membership_subscription_form_after_paid_subscriptions
    membership_subscription_form_after_subscriptions

    Those filters are ultimately the best way to customize the process without touching the base code. You can use them in your own plugins too and here's a nice guide on that process.
    http://codex.wordpress.org/Writing_a_Plugin

    The registration form, the first part of the process, is a bit different and is handled via:
    /membership/membershipincludes/includes/registration.form.php

    There's only one filter mentioned in that file:
    membership_subscription_form_registration_presubmit_content

    And the following filter is mentioned in /membership/membershipincludes/classes/membershippublic.php

    membership_subscription_form_before_registration_process

    You could also look at /membership/membershipincludes/plugins/simple.invitecodes.php for an example of how to achieve this all.

    Hope this helps!

    -David

  • Steven
    • Site Builder, Child of Zeus

    Thanks David. I love the way how the membership plugin is separated into smaller chunks. I see there's only that one filter you mentioned on the registration form itself, so it looks like I'll just make some hard edits to the form. It would be awesome though for this form and other bits to be overridable with some sort of hook/filter/action, or whatever is best.

  • Steven
    • Site Builder, Child of Zeus

    Actually, going through the membershippublic.php in the classes folder, there are 2 calls to the registration.form.php. Maybe I can just make my own registration form by copying the existing one, put it in my theme directory and changing these 2 paths. Might give it a go. Either way though, I'm making hard edits which I want to avoid.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.