This topic has 4 replies, 2 voices, and was last updated 10 years by 4bservices.

  • Author
  • #22469
     4bservices
    Participant

    I have looked at this thread: https://archived.seventhqueen.com/forums/topic/extra-membership-restrictions-how-to I am still confused.

    I’d like to add a couple of fields that on one it’s grayed out showing it’s not included and on the other it’s highlighted just like the rest showing it’s included.

    Exclusive Forums
    Member Search
    Special Prizes and Contests

    Where do I add the code?

    #22745
     Catalin
    Moderator

    Hello,

    Please take a look at this link:

    https://archived.seventhqueen.com/forums/topic/membership-levels-price-page

    Thank you,
    Catalin

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #22761
     4bservices
    Participant

    Now even more confused.

    #22977
     4bservices
    Participant

    Okay I got the other fields to show but I can not get the “free” account to go gray.

    http://jeepedin.com/membership-account/membership-levels/

    http://jeepedin.com/beta (bypass coming soon page)

    Here is the code

    The membership id for the free level is 2 and the paid is 1 I want the extra fields to show for 2 but want them to be dark for 1

    // restrict profile area – Messages page
    add_action(‘kleo_pmro_extra_restriction_before_my_profile’,’kleo_my_custom_restrict1′);

    function kleo_my_custom_restrict1()
    {
    //full current url
    $actual_link = kleo_full_url();
    //our request uri
    $uri = str_replace(untrailingslashit(home_url()),””,$actual_link);

    //restrict messaging page url
    if(preg_match(“/^\/”.bp_get_members_root_slug().”\/”. bp_get_loggedin_user_username().”\/messages\/?/”, $uri))
    {

    $my_restrictions = array(‘message’ => array(
    //2 – restrict certain levels. 0 -restrict none; 1 – restrict all
    ‘type’ => 2,
    //levels that you apply the restrictions to
    ‘levels’ => array(2,-1),
    //’not_member’ => 1, //restrict users without a membership level
    //’guest’ => 1 // restrict not logged in users
    )
    );
    //We use the name “message” from the new restriction added above
    kleo_check_access(‘message’,$my_restrictions);
    }
    }

    //Restrict Shop page
    add_filter(‘kleo_pmpro_match_rules’, ‘kleo_my_custom_restrict2’);

    function kleo_my_custom_restrict2($restrictions) {
    //regular expression for shop page
    $restrictions[“/^\/shop\/?$/”] = array(‘name’ => ‘shop’);
    return $restrictions;
    }

    I don’t need to actually restrict pages I did that else where so di I need to remove some of this code??? But how do I get it to recognize it on the pricing table???

    #22978
     4bservices
    Participant

    Okay I see I need to go into the Sweetdate settings to make it happen.

    Whew – I’ve been at this too long and making this harder then it needs to be! Sorry to be a bug.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Add fields to Membership Pricing Table’ is closed to new replies.

Log in with your credentials

Forgot your details?